|
||||||||||
| 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 OpenDefinitionsDocumentpublic void addBrowserRegion(BrowserDocumentRegion r)
OpenDefinitionsDocument
addBrowserRegion in interface OpenDefinitionsDocumentpublic void removeBrowserRegion(BrowserDocumentRegion r)
OpenDefinitionsDocument
removeBrowserRegion in interface OpenDefinitionsDocument
public boolean saveFile(FileSaveSelector com)
throws IOException
OpenDefinitionsDocument
saveFile in interface OpenDefinitionsDocumentcom - a selector that picks the file name
IOExceptionpublic boolean canAbandonFile()
OpenDefinitionsDocument
canAbandonFile in interface OpenDefinitionsDocumentpublic boolean quitFile()
OpenDefinitionsDocument
quitFile in interface OpenDefinitionsDocumentpublic void setCurrentLocation(int location)
DJDocument
setCurrentLocation in interface DJDocumentlocation - the new absolute locationpublic DefinitionsDocument getDocument()
OpenDefinitionsDocument
getDocument in interface OpenDefinitionsDocumentpublic boolean isModifiedSinceSave()
OpenDefinitionsDocument
isModifiedSinceSave in interface OpenDefinitionsDocumentpublic int balanceForward()
DJDocument
balanceForward in interface DJDocumentpublic int balanceBackward()
DJDocument
balanceBackward in interface DJDocument
public File getFile()
throws FileMovedException
OpenDefinitionsDocument
getFile in interface OpenDefinitionsDocumentFileMovedException - if the document's file no longer existspublic File getRawFile()
OpenDefinitionsDocument
getRawFile in interface OpenDefinitionsDocumentpublic File getParentDirectory()
OpenDefinitionsDocument
getParentDirectory in interface OpenDefinitionsDocumentpublic boolean fileExists()
OpenDefinitionsDocument
fileExists in interface OpenDefinitionsDocumentfileExists in interface INavigatorItempublic boolean verifyExists()
OpenDefinitionsDocument
verifyExists in interface OpenDefinitionsDocumentpublic void cleanUpPrintJob()
cleanUpPrintJob in interface OpenDefinitionsDocument
public String getFirstTopLevelClassName()
throws ClassNameNotFoundException
OpenDefinitionsDocument
getFirstTopLevelClassName in interface OpenDefinitionsDocumentClassNameNotFoundException - if no top level class name found.
public void startCompile()
throws IOException
OpenDefinitionsDocument
startCompile in interface OpenDefinitionsDocumentIOException - if a file with errors cannot be opened
public void runMain()
throws IOException
OpenDefinitionsDocument
runMain in interface OpenDefinitionsDocumentIOException - propagated from GlobalModel.compileAll()
public boolean revertIfModifiedOnDisk()
throws IOException
OpenDefinitionsDocument
revertIfModifiedOnDisk in interface OpenDefinitionsDocumentIOException
public Pageable getPageable()
throws IllegalStateException
getPageable in interface OpenDefinitionsDocumentIllegalStateExceptionpublic int gotoLine(int line)
OpenDefinitionsDocument
gotoLine in interface OpenDefinitionsDocumentline - 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 OpenDefinitionsDocumentPrinterException
BadLocationException
FileMovedExceptionpublic void removeFromDebugger()
OpenDefinitionsDocument
removeFromDebugger in interface OpenDefinitionsDocumentpublic RegionManager<Breakpoint> getBreakpointManager()
getBreakpointManager in interface OpenDefinitionsDocumentpublic RegionManager<MovingDocumentRegion> getBookmarkManager()
getBookmarkManager in interface OpenDefinitionsDocumentpublic void clearBrowserRegions()
OpenDefinitionsDocument
clearBrowserRegions in interface OpenDefinitionsDocumentpublic boolean isReady()
OpenDefinitionsDocument
isReady in interface OpenDefinitionsDocumentpublic boolean isUntitled()
OpenDefinitionsDocument
isUntitled in interface OpenDefinitionsDocumentisUntitled in interface INavigatorItempublic boolean isSourceFile()
isSourceFile in interface OpenDefinitionsDocumentpublic boolean isEmpty()
OpenDefinitionsDocument
isEmpty in interface OpenDefinitionsDocument
public File getSourceRoot()
throws InvalidPackageException
OpenDefinitionsDocument
getSourceRoot in interface OpenDefinitionsDocumentInvalidPackageException - 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 OpenDefinitionsDocumentpublic String getCanonicalPath()
OpenDefinitionsDocument
getCanonicalPath in interface OpenDefinitionsDocumentpublic String getCompletePath()
OpenDefinitionsDocument
getCompletePath in interface OpenDefinitionsDocumentpublic String getName()
INavigatorItemINavigatorItem.
Strings returned by this method may or may not be unique with respect to other INavigatorItems within or without
a given IDocumentNavigator.
getName in interface INavigatorItem
public void startJUnit()
throws ClassNotFoundException,
IOException
OpenDefinitionsDocument
startJUnit in interface OpenDefinitionsDocumentClassNotFoundException - when the class is compiled to a location not on the classpath.
IOException - if a file with errors cannot be opened
public void generateJavadoc(FileSaveSelector saver)
throws IOException
OpenDefinitionsDocument
generateJavadoc in interface OpenDefinitionsDocumentsaver - FileSaveSelector for saving the file if it needs to be saved
IOExceptionpublic String getPackageName()
getPackageName in interface OpenDefinitionsDocumentpublic void setPackage(String s)
OpenDefinitionsDocument
setPackage in interface OpenDefinitionsDocumentpublic String getPackageNameFromDocument()
getPackageNameFromDocument in interface OpenDefinitionsDocument
public String getEnclosingClassName(int pos,
boolean qual)
throws BadLocationException,
ClassNameNotFoundException
OpenDefinitionsDocument
getEnclosingClassName in interface OpenDefinitionsDocumentpos - 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 OpenDefinitionsDocumentcom - a selector that picks the file name.
IOException
public void preparePrintJob()
throws BadLocationException,
FileMovedException
preparePrintJob in interface OpenDefinitionsDocumentBadLocationException
FileMovedException
public void revertFile()
throws IOException
OpenDefinitionsDocument
revertFile in interface OpenDefinitionsDocumentIOExceptionpublic boolean checkIfClassFileInSync()
OpenDefinitionsDocument
checkIfClassFileInSync in interface OpenDefinitionsDocumentcheckIfClassFileInSync in interface INavigatorItempublic void documentSaved()
OpenDefinitionsDocument
documentSaved in interface OpenDefinitionsDocumentpublic void documentModified()
OpenDefinitionsDocument
documentModified in interface OpenDefinitionsDocumentpublic void documentReset()
OpenDefinitionsDocument
documentReset in interface OpenDefinitionsDocumentpublic int getCurrentLocation()
DJDocument
getCurrentLocation in interface DJDocumentpublic INavigatorItem getIDoc()
public void resetModification()
OpenDefinitionsDocument
resetModification in interface OpenDefinitionsDocumentpublic long getTimestamp()
OpenDefinitionsDocument
getTimestamp in interface OpenDefinitionsDocumentpublic void updateModifiedSinceSave()
OpenDefinitionsDocument
updateModifiedSinceSave in interface OpenDefinitionsDocumentpublic void setFile(File file)
OpenDefinitionsDocument
setFile in interface OpenDefinitionsDocumentfile - the file that this OpenDefinitionsDocument is associated withpublic void close()
OpenDefinitionsDocument
close in interface OpenDefinitionsDocumentpublic boolean inProjectPath()
OpenDefinitionsDocument
inProjectPath in interface OpenDefinitionsDocumentpublic boolean inNewProjectPath(File f)
OpenDefinitionsDocument
inNewProjectPath in interface OpenDefinitionsDocumentpublic boolean inProject()
inProject in interface OpenDefinitionsDocumentinProject in interface INavigatorItempublic boolean isAuxiliaryFile()
isAuxiliaryFile in interface OpenDefinitionsDocumentisAuxiliaryFile in interface INavigatorItempublic int _getLineStartPos(int pos)
DJDocument
_getLineStartPos in interface DJDocumentpos - Any position on the current line
public int _getLineEndPos(int pos)
DJDocument
_getLineEndPos in interface DJDocumentpos - Any position on the current line
public void addDocumentListener(DocumentListener listener)
addDocumentListener in interface Documentpublic void addUndoableEditListener(UndoableEditListener listener)
addUndoableEditListener in interface Document
public Position createPosition(int offs)
throws BadLocationException
AbstractDocumentInterface
createPosition in interface AbstractDocumentInterfacecreatePosition in interface DocumentBadLocationException
public Position createUnwrappedPosition(int offs)
throws BadLocationException
OpenDefinitionsDocument
createUnwrappedPosition in interface OpenDefinitionsDocumentBadLocationExceptionpublic Element getDefaultRootElement()
getDefaultRootElement in interface Documentpublic Position getStartPosition()
getStartPosition in interface Documentpublic Position getEndPosition()
getEndPosition in interface Documentpublic int getLength()
getLength in interface AbstractDocumentInterfacegetLength in interface Documentpublic Object getProperty(Object key)
getProperty in interface Documentpublic Element[] getRootElements()
getRootElements in interface Document
public String getText(int offset,
int length)
throws BadLocationException
getText in interface AbstractDocumentInterfacegetText in interface DocumentBadLocationException
public void getText(int offset,
int length,
Segment txt)
throws BadLocationException
getText in interface DocumentBadLocationException
public void insertString(int offset,
String str,
AttributeSet set)
throws BadLocationException
DJDocumentAbstractDJDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet).
insertString in interface DJDocumentinsertString in interface AbstractDocumentInterfaceinsertString in interface DocumentBadLocationException
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
DJDocumentAbstractDJDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent).
remove in interface DJDocumentremove in interface AbstractDocumentInterfaceremove in interface DocumentBadLocationExceptionpublic void removeDocumentListener(DocumentListener listener)
removeDocumentListener in interface Documentpublic void removeUndoableEditListener(UndoableEditListener listener)
removeUndoableEditListener in interface Documentpublic void render(Runnable r)
render in interface Documentpublic 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 DJDocumentselStart - 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 OpenDefinitionsDocumentpublic int getCurrentCol()
getCurrentCol in interface OpenDefinitionsDocumentpublic boolean getClassFileInSync()
getClassFileInSync in interface OpenDefinitionsDocumentpublic void setClassFileInSync(boolean val)
setClassFileInSync in interface OpenDefinitionsDocument
public int getIntelligentBeginLinePos(int currPos)
throws BadLocationException
DJDocument
getIntelligentBeginLinePos in interface DJDocumentcurrPos - A position on the current line
BadLocationExceptionpublic int _getOffset(int lineNum)
_getOffset in interface OpenDefinitionsDocument
public String getQualifiedClassName()
throws ClassNameNotFoundException
getQualifiedClassName in interface OpenDefinitionsDocumentClassNameNotFoundException
public String getQualifiedClassName(int pos)
throws ClassNameNotFoundException
getQualifiedClassName in interface OpenDefinitionsDocumentClassNameNotFoundExceptionpublic String getLexiName()
getLexiName in interface OpenDefinitionsDocumentpublic ReducedModelState getStateAtCurrent()
getStateAtCurrent in interface DJDocumentpublic void resetUndoManager()
resetUndoManager in interface OpenDefinitionsDocumentpublic File getCachedClassFile()
getCachedClassFile in interface OpenDefinitionsDocumentpublic void setCachedClassFile(File f)
setCachedClassFile in interface OpenDefinitionsDocumentpublic DocumentListener[] getDocumentListeners()
getDocumentListeners in interface OpenDefinitionsDocumentpublic UndoableEditListener[] getUndoableEditListeners()
getUndoableEditListeners in interface OpenDefinitionsDocumentpublic 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 OpenDefinitionsDocumentpublic boolean undoManagerCanRedo()
undoManagerCanRedo in interface OpenDefinitionsDocumentpublic Font getFont(AttributeSet attr)
getFont in interface StyledDocumentpublic Color getBackground(AttributeSet attr)
getBackground in interface StyledDocumentpublic Color getForeground(AttributeSet attr)
getForeground in interface StyledDocumentpublic Element getCharacterElement(int pos)
getCharacterElement in interface StyledDocumentpublic Element getParagraphElement(int pos)
getParagraphElement in interface StyledDocumentpublic 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 StyledDocumentpublic Style getStyle(String nm)
getStyle in interface StyledDocumentpublic 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 DJDocumentpos - 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 DJDocumentpos - Position to start fromopening - opening brace characterclosing - closing brace character
BadLocationException
public int getFirstNonWSCharPos(int pos)
throws BadLocationException
DJDocument
getFirstNonWSCharPos in interface DJDocumentpos - Position to start from
BadLocationException
public int getFirstNonWSCharPos(int pos,
boolean acceptComments)
throws BadLocationException
DJDocument
getFirstNonWSCharPos in interface DJDocumentpos - 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 DJDocumentpos - 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 DJDocumentpos - position on the line
BadLocationException
public int findCharOnLine(int pos,
char findChar)
DJDocumentDoes not work if character being searched for is a '/' or a '*'
findCharOnLine in interface DJDocumentpos - Cursor positionfindChar - Character to search for
public int _getIndentOfCurrStmt(int pos)
throws BadLocationException
DJDocument
_getIndentOfCurrStmt in interface DJDocumentpos - Cursor position
BadLocationException
public int _getIndentOfCurrStmt(int pos,
char[] delims)
throws BadLocationException
DJDocument
_getIndentOfCurrStmt in interface DJDocumentpos - Cursor position
BadLocationException
public int _getIndentOfCurrStmt(int pos,
char[] delims,
char[] whitespace)
throws BadLocationException
DJDocument
_getIndentOfCurrStmt in interface DJDocumentpos - 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 DJDocumentselStart - 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 DJDocumentpos - 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 DJDocumentpos - Position to start fromdelims - array of characters to search forskipParenPhrases - whether to look for delimiters inside paren phrases
(eg. semicolons in a for statement)
BadLocationExceptionpublic void move(int dist)
DJDocument
move in interface DJDocumentdist - the distance from the current location to the new location.
public ArrayList<HighlightStatus> getHighlightStatus(int start,
int end)
DJDocument
getHighlightStatus in interface DJDocumentpublic void setIndent(int indent)
DJDocument
setIndent in interface DJDocumentindent - the size of indent that you want for the documentpublic int getIndent()
DJDocument
getIndent in interface DJDocumentpublic int getInitialVerticalScroll()
getInitialVerticalScroll in interface OpenDefinitionsDocumentpublic int getInitialHorizontalScroll()
getInitialHorizontalScroll in interface OpenDefinitionsDocumentpublic int getInitialSelectionStart()
getInitialSelectionStart in interface OpenDefinitionsDocumentpublic int getInitialSelectionEnd()
getInitialSelectionEnd in interface OpenDefinitionsDocumentpublic String getText()
DJDocument
getText in interface DJDocumentgetText in interface AbstractDocumentInterfacepublic void clear()
DJDocument
clear in interface DJDocumentpublic ReducedModelControl getReduced()
getReduced in interface DJDocumentpublic int getNumberOfLines()
getNumberOfLines in interface OpenDefinitionsDocumentpublic boolean isShadowed(int pos)
isShadowed in interface OpenDefinitionsDocumentpublic int getLineOfOffset(int offset)
OpenDefinitionsDocument
getLineOfOffset in interface OpenDefinitionsDocumentoffset - the offset >= 0
public int getOffsetOfLine(int line)
OpenDefinitionsDocument
getOffsetOfLine in interface OpenDefinitionsDocumentline - number >= 0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||