|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aptana.ide.editors.unified.UnifiedAutoIndentStrategy
com.aptana.ide.editor.jscomment.formatting.JSCommentAutoIndentStrategy
public class JSCommentAutoIndentStrategy
| Field Summary | |
|---|---|
protected java.lang.String |
linePrefix
linePrefix |
| Fields inherited from class com.aptana.ide.editors.unified.UnifiedAutoIndentStrategy |
|---|
configuration, context, sourceViewer |
| Constructor Summary | |
|---|---|
JSCommentAutoIndentStrategy(EditorFileContext context,
org.eclipse.jface.text.source.SourceViewerConfiguration configuration,
org.eclipse.jface.text.source.ISourceViewer sourceViewer)
|
|
| Method Summary | |
|---|---|
void |
customizeDocumentCommand(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command)
|
protected org.eclipse.jface.text.IRegion |
findPrefixRange(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.IRegion line)
Returns the range of the multiline comment prefix on the given line in document. |
protected LexemeList |
getLexemeList()
Creates a lexeme list |
org.eclipse.jface.preference.IPreferenceStore |
getPreferenceStore()
Returns the current preference store |
protected void |
indentAfterCommentEnd(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
Unindents a typed slash ('/') if it forms the end of a comment. |
protected void |
indentAfterNewLine(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
Copies the indentation of the previous line and adds a star. |
protected boolean |
indentCloseToken(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.DocumentCommand c,
int offset,
int lineOffset,
int firstNonWS)
indentCloseToken |
protected boolean |
isNewComment(org.eclipse.jface.text.IDocument document,
int commandOffset)
Guesses if the command operates within a newly created javadoc comment or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String linePrefix
| Constructor Detail |
|---|
public JSCommentAutoIndentStrategy(EditorFileContext context,
org.eclipse.jface.text.source.SourceViewerConfiguration configuration,
org.eclipse.jface.text.source.ISourceViewer sourceViewer)
context - configuration - sourceViewer - | Method Detail |
|---|
public void customizeDocumentCommand(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.DocumentCommand command)
customizeDocumentCommand in interface org.eclipse.jface.text.IAutoEditStrategycustomizeDocumentCommand in class UnifiedAutoIndentStrategyIAutoEditStrategy.customizeDocumentCommand(org.eclipse.jface.text.IDocument,
org.eclipse.jface.text.DocumentCommand)
protected boolean indentCloseToken(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.DocumentCommand c,
int offset,
int lineOffset,
int firstNonWS)
doc - c - offset - lineOffset - firstNonWS -
protected void indentAfterNewLine(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
indentAfterNewLine in class UnifiedAutoIndentStrategyd - the document to work onc - the command to deal with
protected boolean isNewComment(org.eclipse.jface.text.IDocument document,
int commandOffset)
document - the documentcommandOffset - the command offset
true if the comment should be closed, false if not
protected void indentAfterCommentEnd(org.eclipse.jface.text.IDocument d,
org.eclipse.jface.text.DocumentCommand c)
d - the documentc - the command
protected org.eclipse.jface.text.IRegion findPrefixRange(org.eclipse.jface.text.IDocument document,
org.eclipse.jface.text.IRegion line)
throws org.eclipse.jface.text.BadLocationException
document.
The prefix greedily matches the following regex pattern: \w*\*\w*, that is,
any number of whitespace characters, followed by an asterix ('*'), followed by any number of
whitespace characters.
document - the document to which line refersline - the line from which to extract the prefix range
IRegion describing the range of the prefix on the given line
org.eclipse.jface.text.BadLocationException - if accessing the document failspublic org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()
UnifiedAutoIndentStrategy
getPreferenceStore in interface IPreferenceClientgetPreferenceStore in class UnifiedAutoIndentStrategyUnifiedAutoIndentStrategy.getPreferenceStore()protected LexemeList getLexemeList()
UnifiedAutoIndentStrategy
getLexemeList in class UnifiedAutoIndentStrategyUnifiedAutoIndentStrategy.getLexemeList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||