|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gnu.glib.Struct org.gnu.glib.GObject org.gnu.gtk.TextBuffer frysk.gui.srcwin.SourceBuffer
public class SourceBuffer
This class is a wrapper around TextBuffer, it allows for extra functionality needed by the SourceViewWidget. It will need to be retrofited to use correct model objects once these are set, instead of SourceCodeLine and so on.
Constructor Summary | |
---|---|
SourceBuffer()
Creates a new SourceBuffer |
|
SourceBuffer(DebugInfoFrame scope)
Creates a new SourceBuffer with the given scope |
|
SourceBuffer(DebugInfoFrame scope,
int mode)
|
Method Summary | |
---|---|
void |
addComment(int lineStart,
int colStart,
int lineEnd,
int colEnd)
Adds a comment to be highlighted in the text |
void |
clear()
|
void |
clearAnchorAtCurrentLine()
Removed the anchor created by createAnchorAtCurrentLine() |
org.gnu.gtk.TextChildAnchor |
createAnchorAtCurrentLine()
Creates the anchor at the current line that will to which the inlined code will be attached. |
void |
disassembleFrame(DebugInfoFrame frame)
|
boolean |
findNext(String toFind,
boolean matchCase,
boolean findAll)
Find the next instance of toFind in the buffer. |
boolean |
findPrevious(String toFind,
boolean matchCase)
Finds the previous entry of toFind in the buffer and highlights it. |
int |
getCurrentLine()
|
List |
getFunctions()
|
DOMInlineInstance |
getInlineInstance(int lineNumber)
|
int |
getLastLine()
|
int |
getLineCount()
Returns the number of lines in the given file, with the option to include inlined code in that count |
int |
getNumberOfAssemblyLines(int sourceLine)
Returns the number of lines of assembly code for each line of source code. |
DebugInfoFrame |
getScope()
|
org.gnu.gtk.TextIter |
getStartCurrentFind()
|
Value |
getVariable(DOMTag tag,
DOMLine line)
Searches for a variable at the location specified by tag and line and returns a VariableLocation if a variable was found there. |
String |
getVariable(org.gnu.gtk.TextIter iter)
Searches for a variable at the location specified by iter, and returns a VariableLocation if a variable was found there. |
boolean |
hasInlineCode(int lineNumber)
|
boolean |
isLineBroken(int lineNo)
Returns true if the given line has a breakpoint set. |
boolean |
isLineExecutable(int lineNo)
Returns true if the given line is executable. |
void |
setLineBroken(boolean breakpoint,
int lineNo)
|
void |
setMode(int mode)
|
void |
setScope(DebugInfoFrame scope)
|
boolean |
toggleBreakpoint(int lineNum)
Toggles the breakpoint on line lineNum, returning the previous state of the breakpoint on that line. |
Methods inherited from class org.gnu.gtk.TextBuffer |
---|
addClipboard, addListener, applyTag, applyTag, backspace, beginUserAction, copyClipboard, createChildAnchor, createMark, createTag, cutClipboard, deleteMark, deleteMark, deleteSelection, deleteText, deleteTextInteractive, endUserAction, getCharCount, getEndIter, getEventListenerClass, getEventType, getInsert, getIter, getIter, getIter, getIter, getLineIter, getMark, getModified, getSelected, getSelectionBound, getSelectionEnd, getSelectionStart, getSlice, getStartIter, getText, getTextTagTable, getType, inserChildAnchor, insertPixbuf, insertRange, insertRangeInteractive, insertText, insertText, insertText, insertText, insertTextInteractive, insertTextInteractive, markExists, moveMark, moveMark, pasteClipboard, pasteClipboard, placeCursor, removeAllTags, removeAllTags, removeClipboard, removeListener, removeTag, removeTag, selectRange, setModified, setText |
Methods inherited from class org.gnu.glib.GObject |
---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceBuffer()
public SourceBuffer(DebugInfoFrame scope)
scope
- public SourceBuffer(DebugInfoFrame scope, int mode)
Method Detail |
---|
public boolean isLineExecutable(int lineNo)
lineNo
- The line to check
public boolean isLineBroken(int lineNo)
lineNo
-
public void setLineBroken(boolean breakpoint, int lineNo)
public boolean toggleBreakpoint(int lineNum)
lineNum
- the number of the line to toggle the breakpoint for,
starting at 0
ArrayIndexOutOfBoundsException
- thrown if the line number given does not correspond
to a valid line numberpublic int getCurrentLine()
public boolean findNext(String toFind, boolean matchCase, boolean findAll)
toFind
- The string to locatematchCase
- Whether to do a case sensitive searchfindAll
- Whether to locate all instances
public boolean findPrevious(String toFind, boolean matchCase)
toFind
- The string to findmatchCase
- Whether to do a case sensitive search
public org.gnu.gtk.TextIter getStartCurrentFind()
public String getVariable(org.gnu.gtk.TextIter iter)
iter
- The location to look for a variable
public Value getVariable(DOMTag tag, DOMLine line)
tag
- The DOMTag to examine for a variableline
- The DOMLine containing Source information
public List getFunctions()
public void addComment(int lineStart, int colStart, int lineEnd, int colEnd)
lineStart
- The line the comment starts oncolStart
- The offset from the the start of the line that the
comment starts onlineEnd
- The line the comment ends oncolEnd
- the offset from the start of the line that the comment
ends onpublic int getLineCount()
getLineCount
in class org.gnu.gtk.TextBuffer
includeInlindes
- Whether to include inlined code in the line count
public int getLastLine()
public boolean hasInlineCode(int lineNumber)
lineNumber
- the line to check
public DOMInlineInstance getInlineInstance(int lineNumber)
lineNumber
- The line number to get Inline information from
public void setScope(DebugInfoFrame scope)
public void setMode(int mode)
public void disassembleFrame(DebugInfoFrame frame)
public org.gnu.gtk.TextChildAnchor createAnchorAtCurrentLine()
public void clearAnchorAtCurrentLine()
createAnchorAtCurrentLine()
public DebugInfoFrame getScope()
public int getNumberOfAssemblyLines(int sourceLine)
sourceLine
- The line of source code
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |