|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.DummyOpenDefDoc
public class DummyOpenDefDoc
Field Summary | |
---|---|
protected SwingDocument |
_defDoc
|
Fields inherited from interface javax.swing.text.Document |
---|
StreamDescriptionProperty, TitleProperty |
Constructor Summary | |
---|---|
DummyOpenDefDoc()
|
Method Summary | |
---|---|
int |
_getIndentOfCurrStmt(int pos)
Returns the indent level of the start of the statement that the cursor is on. |
int |
_getIndentOfCurrStmt(int pos,
char[] delims)
Returns the indent level of the start of the statement that the cursor is on. |
int |
_getIndentOfCurrStmt(int pos,
char[] delims,
char[] whitespace)
Returns the indent level of the start of the statement that the cursor is on. |
int |
_getLineEndPos(int pos)
Returns the absolute position of the end of the current line. |
int |
_getLineFirstCharPos(int pos)
Returns the absolute position of the first non-whitespace character on the current line. |
int |
_getLineStartPos(int pos)
Returns the absolute position of the beginning of the current line. |
int |
_getOffset(int lineNum)
|
void |
addBrowserRegion(BrowserDocumentRegion r)
Adds region r to the browserRegions collection for this |
void |
addDocumentListener(DocumentListener listener)
|
void |
addFinalizationListener(FinalizationListener<DefinitionsDocument> fl)
|
Style |
addStyle(String nm,
Style parent)
|
void |
addUndoableEditListener(UndoableEditListener listener)
|
void |
append(String str)
|
void |
append(String str,
AttributeSet set)
Appends given string with specified attributes to end of this document. |
void |
append(String str,
Style style)
|
int |
balanceBackward()
Finds the match for the closing brace immediately to the left, assuming there is such a brace. |
int |
balanceForward()
Finds the match for the open brace immediately to the right, assuming there is such a brace. |
boolean |
canAbandonFile()
Returns whether the GlobalModel can abandon this document, asking listeners if isModifiedSinceSave() is true. |
boolean |
checkIfClassFileInSync()
Checks if the document is modified. |
void |
cleanUpPrintJob()
|
void |
clear()
Clears the entire text of the document. |
void |
clearBrowserRegions()
Remove the browser regions for this document from the browser history manager. |
void |
close()
Should be called when closing an ODD to let the ODD clean up after itself. |
int |
commentLines(int selStart,
int selEnd)
The following methods are forwarding methods required by the rest of the program in order for the OpenDefinitionsDocument to handle DefinitionsDocuments |
int |
compareTo(OpenDefinitionsDocument d)
|
Position |
createPosition(int offs)
Creates a "sticky" position within a document |
Position |
createUnwrappedPosition(int offs)
Creates a WrappedPosition in the document. |
void |
documentModified()
Called when this document is modified so it can notify the cache. |
void |
documentReset()
Called when this document is reset so it can notify the cache. |
void |
documentSaved()
Called when this document is saved so it can notify the cache. |
boolean |
fileExists()
Returns true if the file exists on disk, or if the user has located it on disk. |
int |
findCharOnLine(int pos,
char findChar)
Determines if the given character exists on the line where the given cursor position is. |
int |
findNextEnclosingBrace(int pos,
char opening,
char closing)
Searching forwards, finds the position of the enclosing brace. |
int |
findPrevDelimiter(int pos,
char[] delims)
Searching backwards, finds the position of the first character that is one of the given delimiters. |
int |
findPrevDelimiter(int pos,
char[] delims,
boolean skipParenPhrases)
Searching backwards, finds the position of the first character that is one of the given delimiters. |
int |
findPrevEnclosingBrace(int pos,
char opening,
char closing)
Searching backwards, finds the position of the enclosing brace. |
void |
generateJavadoc(FileSaveSelector saver)
Generates Javadoc for this document, saving the output to a temporary directory. |
Color |
getBackground(AttributeSet attr)
|
RegionManager<MovingDocumentRegion> |
getBookmarkManager()
|
RegionManager<Breakpoint> |
getBreakpointManager()
|
File |
getCachedClassFile()
|
String |
getCanonicalPath()
Returns canonical path for well-formed file, "(Untitled)" if no file exists, and absolute path if ill-formed. |
Element |
getCharacterElement(int pos)
|
boolean |
getClassFileInSync()
|
String |
getCompletePath()
Returns canonical path (as defined above) followed by " *" if modified. |
int |
getCurrentCol()
|
int |
getCurrentLine()
|
int |
getCurrentLocation()
Gets the current location of the cursor the document. |
Element |
getDefaultRootElement()
|
DefinitionsDocument |
getDocument()
Gets the associated DefinitionsDocument which may force materializing it. |
DocumentListener[] |
getDocumentListeners()
|
String |
getEnclosingClassName(int pos,
boolean qual)
Searching backwards finds the name of the enclosing named class or interface. |
Position |
getEndPosition()
|
File |
getFile()
Returns the file for this document. |
String |
getFileName()
Returns the name of this file, or "(Untitled)" if no file. |
List<FinalizationListener<DefinitionsDocument>> |
getFinalizationListeners()
|
int |
getFirstNonWSCharPos(int pos)
Finds the position of the first non-whitespace character after pos. |
int |
getFirstNonWSCharPos(int pos,
boolean acceptComments)
Similar to the single-argument version, but allows including comments. |
int |
getFirstNonWSCharPos(int pos,
char[] whitespace,
boolean acceptComments)
Finds the position of the first non-whitespace character after pos. |
String |
getFirstTopLevelClassName()
Returns the name of the top level class, if any. |
Font |
getFont(AttributeSet attr)
|
Color |
getForeground(AttributeSet attr)
|
ArrayList<HighlightStatus> |
getHighlightStatus(int start,
int end)
Returns highlight status info for text between start and end, coalescing adjoining blocks with the same status. |
INavigatorItem |
getIDoc()
|
int |
getIndent()
Gets the indent level. |
int |
getInitialHorizontalScroll()
|
int |
getInitialSelectionEnd()
|
int |
getInitialSelectionStart()
|
int |
getInitialVerticalScroll()
|
int |
getIntelligentBeginLinePos(int currPos)
Returns the "intelligent" beginning of line. |
int |
getLength()
|
String |
getLexiName()
|
int |
getLineOfOffset(int offset)
Translates an offset into the components text to a line number. |
Style |
getLogicalStyle(int p)
|
String |
getName()
Returns a "simple" name representing this INavigatorItem . |
int |
getNumberOfLines()
|
int |
getOffsetOfLine(int line)
Translates a line number into an offset. |
String |
getPackageName()
|
String |
getPackageNameFromDocument()
|
Pageable |
getPageable()
|
Element |
getParagraphElement(int pos)
|
File |
getParentDirectory()
Returns the parent directory of this file, null if it has none. |
Object |
getProperty(Object key)
|
String |
getQualifiedClassName()
|
String |
getQualifiedClassName(int pos)
|
File |
getRawFile()
Returns the file for this document; does not check whether the file exists. |
ReducedModelControl |
getReduced()
|
Element[] |
getRootElements()
|
File |
getSourceRoot()
Finds the root directory of the source files. |
Position |
getStartPosition()
|
ReducedModelState |
getStateAtCurrent()
|
Style |
getStyle(String nm)
|
String |
getText()
Gets the entire text of the document. |
String |
getText(int offset,
int length)
|
void |
getText(int offset,
int length,
Segment txt)
|
long |
getTimestamp()
Returns the date that this document was last modified. |
UndoableEditListener[] |
getUndoableEditListeners()
|
CompoundUndoManager |
getUndoManager()
Decorator pattern for the definitions document |
int |
gotoLine(int line)
Moves the definitions document to the given line, and returns the resulting character position. |
void |
indentLines(int selStart,
int selEnd)
Default indentation - uses OTHER flag and no progress indicator. |
void |
indentLines(int selStart,
int selEnd,
Indenter.IndentReason reason,
ProgressMonitor pm)
Parameterized indentation for special-case handling. |
boolean |
inNewProjectPath(File f)
Determines if this document in the file system tree below the specified root. |
boolean |
inProject()
|
boolean |
inProjectPath()
Determines if this document in the file system tree below the active project root. |
void |
insertString(int offset,
String str,
AttributeSet set)
Inserts a string of text into the document. |
boolean |
isAuxiliaryFile()
|
boolean |
isEmpty()
Determines if the document is empty. |
boolean |
isModifiedSinceSave()
Determines if this definitions document has changed since the last save. |
boolean |
isReady()
Returns whether this document is resident in memory. |
boolean |
isShadowed(int pos)
Determines if pos in document is inside a comment or a string. |
boolean |
isSourceFile()
|
boolean |
isUntitled()
Returns whether this document is currently untitled (indicating whether it has a file yet or not). |
boolean |
modifiedOnDisk()
Determines if this definitions document has changed since the last save. |
void |
move(int dist)
Moves the current location the specified number of chars (positive is right; negative is left). |
void |
preparePrintJob()
|
void |
print()
|
void |
putProperty(Object key,
Object value)
|
boolean |
quitFile()
Saves file at user's discretion before quitting. |
void |
remove(int offs,
int len)
Removes a block of text from the specified location. |
void |
removeBrowserRegion(BrowserDocumentRegion r)
Removes region r from the browserRegions collection |
void |
removeDocumentListener(DocumentListener listener)
|
void |
removeFromDebugger()
Called when this document is being closed, removing related state from the debug manager. |
void |
removeStyle(String nm)
|
void |
removeUndoableEditListener(UndoableEditListener listener)
|
void |
render(Runnable r)
|
void |
resetModification()
Resets the document to be unmodified. |
void |
resetUndoManager()
|
void |
revertFile()
Revert the document to the version saved on disk. |
boolean |
revertIfModifiedOnDisk()
Asks the GlobalModel if it can revert current definitions to version on disk. |
void |
runMain()
Runs the main method in this document in the interactions pane. |
boolean |
saveFile(FileSaveSelector com)
Saves the document with a FileWriter. |
boolean |
saveFileAs(FileSaveSelector com)
Saves the document with a FileWriter. |
void |
setCachedClassFile(File f)
|
void |
setCharacterAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
|
void |
setClassFileInSync(boolean val)
|
void |
setCurrentLocation(int location)
Change the current location of the document |
void |
setFile(File file)
Sets this document's file |
void |
setIndent(int indent)
Sets the indent to a particular number of spaces. |
void |
setLogicalStyle(int pos,
Style s)
|
void |
setPackage(String s)
Sets the cached package name returned by getPackageName(); |
void |
setParagraphAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
|
void |
startCompile()
Starts compiling the source. |
void |
startJUnit()
Starts testing the source using JUnit. |
int |
uncommentLines(int selStart,
int selEnd)
|
boolean |
undoManagerCanRedo()
|
boolean |
undoManagerCanUndo()
|
void |
updateModifiedSinceSave()
Sets the document as modified. |
boolean |
verifyExists()
If the file exists, returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SwingDocument _defDoc
Constructor Detail |
---|
public DummyOpenDefDoc()
Method Detail |
---|
public int compareTo(OpenDefinitionsDocument d)
compareTo
in interface Comparable<OpenDefinitionsDocument>
public boolean modifiedOnDisk()
OpenDefinitionsDocument
modifiedOnDisk
in interface OpenDefinitionsDocument
public void addBrowserRegion(BrowserDocumentRegion r)
OpenDefinitionsDocument
addBrowserRegion
in interface OpenDefinitionsDocument
public void removeBrowserRegion(BrowserDocumentRegion r)
OpenDefinitionsDocument
removeBrowserRegion
in interface OpenDefinitionsDocument
public boolean saveFile(FileSaveSelector com) throws IOException
OpenDefinitionsDocument
saveFile
in interface OpenDefinitionsDocument
com
- a selector that picks the file name
IOException
public boolean canAbandonFile()
OpenDefinitionsDocument
canAbandonFile
in interface OpenDefinitionsDocument
public boolean quitFile()
OpenDefinitionsDocument
quitFile
in interface OpenDefinitionsDocument
public void setCurrentLocation(int location)
DJDocument
setCurrentLocation
in interface DJDocument
location
- the new absolute locationpublic DefinitionsDocument getDocument()
OpenDefinitionsDocument
getDocument
in interface OpenDefinitionsDocument
public boolean isModifiedSinceSave()
OpenDefinitionsDocument
isModifiedSinceSave
in interface OpenDefinitionsDocument
public int balanceForward()
DJDocument
balanceForward
in interface DJDocument
public int balanceBackward()
DJDocument
balanceBackward
in interface DJDocument
public File getFile() throws FileMovedException
OpenDefinitionsDocument
getFile
in interface OpenDefinitionsDocument
FileMovedException
- if the document's file no longer existspublic File getRawFile()
OpenDefinitionsDocument
getRawFile
in interface OpenDefinitionsDocument
public File getParentDirectory()
OpenDefinitionsDocument
getParentDirectory
in interface OpenDefinitionsDocument
public boolean fileExists()
OpenDefinitionsDocument
fileExists
in interface OpenDefinitionsDocument
fileExists
in interface INavigatorItem
public boolean verifyExists()
OpenDefinitionsDocument
verifyExists
in interface OpenDefinitionsDocument
public void cleanUpPrintJob()
cleanUpPrintJob
in interface OpenDefinitionsDocument
public String getFirstTopLevelClassName() throws ClassNameNotFoundException
OpenDefinitionsDocument
getFirstTopLevelClassName
in interface OpenDefinitionsDocument
ClassNameNotFoundException
- if no top level class name found.public void startCompile() throws IOException
OpenDefinitionsDocument
startCompile
in interface OpenDefinitionsDocument
IOException
- if a file with errors cannot be openedpublic void runMain() throws IOException
OpenDefinitionsDocument
runMain
in interface OpenDefinitionsDocument
IOException
- propagated from GlobalModel.compileAll()public boolean revertIfModifiedOnDisk() throws IOException
OpenDefinitionsDocument
revertIfModifiedOnDisk
in interface OpenDefinitionsDocument
IOException
public Pageable getPageable() throws IllegalStateException
getPageable
in interface OpenDefinitionsDocument
IllegalStateException
public int gotoLine(int line)
OpenDefinitionsDocument
gotoLine
in interface OpenDefinitionsDocument
line
- Destination line number. If line exceeds the number of lines in the document, it is interpreted
as the last line.
public void print() throws PrinterException, BadLocationException, FileMovedException
print
in interface OpenDefinitionsDocument
PrinterException
BadLocationException
FileMovedException
public void removeFromDebugger()
OpenDefinitionsDocument
removeFromDebugger
in interface OpenDefinitionsDocument
public RegionManager<Breakpoint> getBreakpointManager()
getBreakpointManager
in interface OpenDefinitionsDocument
public RegionManager<MovingDocumentRegion> getBookmarkManager()
getBookmarkManager
in interface OpenDefinitionsDocument
public void clearBrowserRegions()
OpenDefinitionsDocument
clearBrowserRegions
in interface OpenDefinitionsDocument
public boolean isReady()
OpenDefinitionsDocument
isReady
in interface OpenDefinitionsDocument
public boolean isUntitled()
OpenDefinitionsDocument
isUntitled
in interface OpenDefinitionsDocument
isUntitled
in interface INavigatorItem
public boolean isSourceFile()
isSourceFile
in interface OpenDefinitionsDocument
public boolean isEmpty()
OpenDefinitionsDocument
isEmpty
in interface OpenDefinitionsDocument
public File getSourceRoot() throws InvalidPackageException
OpenDefinitionsDocument
getSourceRoot
in interface OpenDefinitionsDocument
InvalidPackageException
- If the package statement is invalid, or if it does not match
up with the location of the source file.public String getFileName()
OpenDefinitionsDocument
getFileName
in interface OpenDefinitionsDocument
public String getCanonicalPath()
OpenDefinitionsDocument
getCanonicalPath
in interface OpenDefinitionsDocument
public String getCompletePath()
OpenDefinitionsDocument
getCompletePath
in interface OpenDefinitionsDocument
public String getName()
INavigatorItem
INavigatorItem
.
Strings returned by this method may or may not be unique with respect to other INavigatorItem
s within or without
a given IDocumentNavigator
.
getName
in interface INavigatorItem
public void startJUnit() throws ClassNotFoundException, IOException
OpenDefinitionsDocument
startJUnit
in interface OpenDefinitionsDocument
ClassNotFoundException
- when the class is compiled to a location not on the classpath.
IOException
- if a file with errors cannot be openedpublic void generateJavadoc(FileSaveSelector saver) throws IOException
OpenDefinitionsDocument
generateJavadoc
in interface OpenDefinitionsDocument
saver
- FileSaveSelector for saving the file if it needs to be saved
IOException
public String getPackageName()
getPackageName
in interface OpenDefinitionsDocument
public void setPackage(String s)
OpenDefinitionsDocument
setPackage
in interface OpenDefinitionsDocument
public String getPackageNameFromDocument()
getPackageNameFromDocument
in interface OpenDefinitionsDocument
public String getEnclosingClassName(int pos, boolean qual) throws BadLocationException, ClassNameNotFoundException
OpenDefinitionsDocument
getEnclosingClassName
in interface OpenDefinitionsDocument
pos
- Position to start fromqual
- true to find the fully qualified class name
BadLocationException
ClassNameNotFoundException
public boolean saveFileAs(FileSaveSelector com) throws IOException
OpenDefinitionsDocument
saveFileAs
in interface OpenDefinitionsDocument
com
- a selector that picks the file name.
IOException
public void preparePrintJob() throws BadLocationException, FileMovedException
preparePrintJob
in interface OpenDefinitionsDocument
BadLocationException
FileMovedException
public void revertFile() throws IOException
OpenDefinitionsDocument
revertFile
in interface OpenDefinitionsDocument
IOException
public boolean checkIfClassFileInSync()
OpenDefinitionsDocument
checkIfClassFileInSync
in interface OpenDefinitionsDocument
checkIfClassFileInSync
in interface INavigatorItem
public void documentSaved()
OpenDefinitionsDocument
documentSaved
in interface OpenDefinitionsDocument
public void documentModified()
OpenDefinitionsDocument
documentModified
in interface OpenDefinitionsDocument
public void documentReset()
OpenDefinitionsDocument
documentReset
in interface OpenDefinitionsDocument
public int getCurrentLocation()
DJDocument
getCurrentLocation
in interface DJDocument
public INavigatorItem getIDoc()
public void resetModification()
OpenDefinitionsDocument
resetModification
in interface OpenDefinitionsDocument
public long getTimestamp()
OpenDefinitionsDocument
getTimestamp
in interface OpenDefinitionsDocument
public void updateModifiedSinceSave()
OpenDefinitionsDocument
updateModifiedSinceSave
in interface OpenDefinitionsDocument
public void setFile(File file)
OpenDefinitionsDocument
setFile
in interface OpenDefinitionsDocument
file
- the file that this OpenDefinitionsDocument is associated withpublic void close()
OpenDefinitionsDocument
close
in interface OpenDefinitionsDocument
public boolean inProjectPath()
OpenDefinitionsDocument
inProjectPath
in interface OpenDefinitionsDocument
public boolean inNewProjectPath(File f)
OpenDefinitionsDocument
inNewProjectPath
in interface OpenDefinitionsDocument
public boolean inProject()
inProject
in interface OpenDefinitionsDocument
inProject
in interface INavigatorItem
public boolean isAuxiliaryFile()
isAuxiliaryFile
in interface OpenDefinitionsDocument
isAuxiliaryFile
in interface INavigatorItem
public int _getLineStartPos(int pos)
DJDocument
_getLineStartPos
in interface DJDocument
pos
- Any position on the current line
public int _getLineEndPos(int pos)
DJDocument
_getLineEndPos
in interface DJDocument
pos
- Any position on the current line
public void addDocumentListener(DocumentListener listener)
addDocumentListener
in interface Document
public void addUndoableEditListener(UndoableEditListener listener)
addUndoableEditListener
in interface Document
public Position createPosition(int offs) throws BadLocationException
AbstractDocumentInterface
createPosition
in interface AbstractDocumentInterface
createPosition
in interface Document
BadLocationException
public Position createUnwrappedPosition(int offs) throws BadLocationException
OpenDefinitionsDocument
createUnwrappedPosition
in interface OpenDefinitionsDocument
BadLocationException
public Element getDefaultRootElement()
getDefaultRootElement
in interface Document
public Position getStartPosition()
getStartPosition
in interface Document
public Position getEndPosition()
getEndPosition
in interface Document
public int getLength()
getLength
in interface AbstractDocumentInterface
getLength
in interface Document
public Object getProperty(Object key)
getProperty
in interface Document
public Element[] getRootElements()
getRootElements
in interface Document
public String getText(int offset, int length) throws BadLocationException
getText
in interface AbstractDocumentInterface
getText
in interface Document
BadLocationException
public void getText(int offset, int length, Segment txt) throws BadLocationException
getText
in interface Document
BadLocationException
public void insertString(int offset, String str, AttributeSet set) throws BadLocationException
DJDocument
AbstractDJDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)
.
insertString
in interface DJDocument
insertString
in interface AbstractDocumentInterface
insertString
in interface Document
BadLocationException
public void append(String str, AttributeSet set)
AbstractDocumentInterface
append
in interface AbstractDocumentInterface
public void append(String str, Style style)
public void append(String str)
public void putProperty(Object key, Object value)
putProperty
in interface Document
public void remove(int offs, int len) throws BadLocationException
DJDocument
AbstractDJDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)
.
remove
in interface DJDocument
remove
in interface AbstractDocumentInterface
remove
in interface Document
BadLocationException
public void removeDocumentListener(DocumentListener listener)
removeDocumentListener
in interface Document
public void removeUndoableEditListener(UndoableEditListener listener)
removeUndoableEditListener
in interface Document
public void render(Runnable r)
render
in interface Document
public CompoundUndoManager getUndoManager()
getUndoManager
in interface OpenDefinitionsDocument
public int commentLines(int selStart, int selEnd)
OpenDefinitionsDocument
commentLines
in interface OpenDefinitionsDocument
public int uncommentLines(int selStart, int selEnd)
uncommentLines
in interface OpenDefinitionsDocument
public void indentLines(int selStart, int selEnd)
DJDocument
indentLines
in interface DJDocument
selStart
- the offset of the initial character of the region to indentselEnd
- the offset of the last character of the region to indentpublic int getCurrentLine()
getCurrentLine
in interface OpenDefinitionsDocument
public int getCurrentCol()
getCurrentCol
in interface OpenDefinitionsDocument
public boolean getClassFileInSync()
getClassFileInSync
in interface OpenDefinitionsDocument
public void setClassFileInSync(boolean val)
setClassFileInSync
in interface OpenDefinitionsDocument
public int getIntelligentBeginLinePos(int currPos) throws BadLocationException
DJDocument
getIntelligentBeginLinePos
in interface DJDocument
currPos
- A position on the current line
BadLocationException
public int _getOffset(int lineNum)
_getOffset
in interface OpenDefinitionsDocument
public String getQualifiedClassName() throws ClassNameNotFoundException
getQualifiedClassName
in interface OpenDefinitionsDocument
ClassNameNotFoundException
public String getQualifiedClassName(int pos) throws ClassNameNotFoundException
getQualifiedClassName
in interface OpenDefinitionsDocument
ClassNameNotFoundException
public String getLexiName()
getLexiName
in interface OpenDefinitionsDocument
public ReducedModelState getStateAtCurrent()
getStateAtCurrent
in interface DJDocument
public void resetUndoManager()
resetUndoManager
in interface OpenDefinitionsDocument
public File getCachedClassFile()
getCachedClassFile
in interface OpenDefinitionsDocument
public void setCachedClassFile(File f)
setCachedClassFile
in interface OpenDefinitionsDocument
public DocumentListener[] getDocumentListeners()
getDocumentListeners
in interface OpenDefinitionsDocument
public UndoableEditListener[] getUndoableEditListeners()
getUndoableEditListeners
in interface OpenDefinitionsDocument
public void addFinalizationListener(FinalizationListener<DefinitionsDocument> fl)
addFinalizationListener
in interface Finalizable<DefinitionsDocument>
fl
- the finalization listener to be notified when this object is garbage collectedpublic List<FinalizationListener<DefinitionsDocument>> getFinalizationListeners()
getFinalizationListeners
in interface Finalizable<DefinitionsDocument>
public boolean undoManagerCanUndo()
undoManagerCanUndo
in interface OpenDefinitionsDocument
public boolean undoManagerCanRedo()
undoManagerCanRedo
in interface OpenDefinitionsDocument
public Font getFont(AttributeSet attr)
getFont
in interface StyledDocument
public Color getBackground(AttributeSet attr)
getBackground
in interface StyledDocument
public Color getForeground(AttributeSet attr)
getForeground
in interface StyledDocument
public Element getCharacterElement(int pos)
getCharacterElement
in interface StyledDocument
public Element getParagraphElement(int pos)
getParagraphElement
in interface StyledDocument
public Style getLogicalStyle(int p)
getLogicalStyle
in interface StyledDocument
public void setLogicalStyle(int pos, Style s)
setLogicalStyle
in interface StyledDocument
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
setCharacterAttributes
in interface StyledDocument
public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
setParagraphAttributes
in interface StyledDocument
public Style getStyle(String nm)
getStyle
in interface StyledDocument
public void removeStyle(String nm)
removeStyle
in interface StyledDocument
public Style addStyle(String nm, Style parent)
addStyle
in interface StyledDocument
public int findPrevEnclosingBrace(int pos, char opening, char closing) throws BadLocationException
DJDocument
findPrevEnclosingBrace
in interface DJDocument
pos
- Position to start fromopening
- opening brace characterclosing
- closing brace character
BadLocationException
public int findNextEnclosingBrace(int pos, char opening, char closing) throws BadLocationException
DJDocument
findNextEnclosingBrace
in interface DJDocument
pos
- Position to start fromopening
- opening brace characterclosing
- closing brace character
BadLocationException
public int getFirstNonWSCharPos(int pos) throws BadLocationException
DJDocument
getFirstNonWSCharPos
in interface DJDocument
pos
- Position to start from
BadLocationException
public int getFirstNonWSCharPos(int pos, boolean acceptComments) throws BadLocationException
DJDocument
getFirstNonWSCharPos
in interface DJDocument
pos
- Position to start fromacceptComments
- if true, find non-whitespace chars in comments
BadLocationException
public int getFirstNonWSCharPos(int pos, char[] whitespace, boolean acceptComments) throws BadLocationException
DJDocument
getFirstNonWSCharPos
in interface DJDocument
pos
- Position to start fromwhitespace
- array of whitespace chars to ignoreacceptComments
- if true, find non-whitespace chars in comments
BadLocationException
public int _getLineFirstCharPos(int pos) throws BadLocationException
DJDocument
_getLineFirstCharPos
in interface DJDocument
pos
- position on the line
BadLocationException
public int findCharOnLine(int pos, char findChar)
DJDocument
Does not work if character being searched for is a '/' or a '*'
findCharOnLine
in interface DJDocument
pos
- Cursor positionfindChar
- Character to search for
public int _getIndentOfCurrStmt(int pos) throws BadLocationException
DJDocument
_getIndentOfCurrStmt
in interface DJDocument
pos
- Cursor position
BadLocationException
public int _getIndentOfCurrStmt(int pos, char[] delims) throws BadLocationException
DJDocument
_getIndentOfCurrStmt
in interface DJDocument
pos
- Cursor position
BadLocationException
public int _getIndentOfCurrStmt(int pos, char[] delims, char[] whitespace) throws BadLocationException
DJDocument
_getIndentOfCurrStmt
in interface DJDocument
pos
- Cursor positiondelims
- Delimiter characters denoting end of statementwhitespace
- characters to skip when looking for beginning of next statement
BadLocationException
public void indentLines(int selStart, int selEnd, Indenter.IndentReason reason, ProgressMonitor pm) throws OperationCanceledException
DJDocument
indentLines
in interface DJDocument
selStart
- the offset of the initial character of the region to indentselEnd
- the offset of the last character of the region to indentreason
- a flag from Indenter
to indicate the reason for the indent (indent logic may vary slightly based on the trigger action)pm
- used to display progress, null if no reporting is desired
OperationCanceledException
public int findPrevDelimiter(int pos, char[] delims) throws BadLocationException
DJDocument
findPrevDelimiter
in interface DJDocument
pos
- Position to start fromdelims
- array of characters to search for
BadLocationException
public int findPrevDelimiter(int pos, char[] delims, boolean skipParenPhrases) throws BadLocationException
DJDocument
findPrevDelimiter
in interface DJDocument
pos
- Position to start fromdelims
- array of characters to search forskipParenPhrases
- whether to look for delimiters inside paren phrases
(eg. semicolons in a for statement)
BadLocationException
public void move(int dist)
DJDocument
move
in interface DJDocument
dist
- the distance from the current location to the new location.public ArrayList<HighlightStatus> getHighlightStatus(int start, int end)
DJDocument
getHighlightStatus
in interface DJDocument
public void setIndent(int indent)
DJDocument
setIndent
in interface DJDocument
indent
- the size of indent that you want for the documentpublic int getIndent()
DJDocument
getIndent
in interface DJDocument
public int getInitialVerticalScroll()
getInitialVerticalScroll
in interface OpenDefinitionsDocument
public int getInitialHorizontalScroll()
getInitialHorizontalScroll
in interface OpenDefinitionsDocument
public int getInitialSelectionStart()
getInitialSelectionStart
in interface OpenDefinitionsDocument
public int getInitialSelectionEnd()
getInitialSelectionEnd
in interface OpenDefinitionsDocument
public String getText()
DJDocument
getText
in interface DJDocument
getText
in interface AbstractDocumentInterface
public void clear()
DJDocument
clear
in interface DJDocument
public ReducedModelControl getReduced()
getReduced
in interface DJDocument
public int getNumberOfLines()
getNumberOfLines
in interface OpenDefinitionsDocument
public boolean isShadowed(int pos)
isShadowed
in interface OpenDefinitionsDocument
public int getLineOfOffset(int offset)
OpenDefinitionsDocument
getLineOfOffset
in interface OpenDefinitionsDocument
offset
- the offset >= 0
public int getOffsetOfLine(int line)
OpenDefinitionsDocument
getOffsetOfLine
in interface OpenDefinitionsDocument
line
- number >= 0
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |