|
SWT LPEX v3.0.4 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.lpex.core.LpexCommonParser
com.ibm.lpex.java.JavaParser
Document parser for Java.
Actions and assigned keys added by this document parser:
HtmlParser#tagSelectionKeys already defined (for example, by the active base editor profile and by the user profile) to an action different from nullAction are not redefined in here.
Editor actions modified by this document parser:
Actions redefined by LpexCommonParser and further modified by this document parser:
Template expansion (proto action, Ctrl+R) for an empty document and for the following keywords is provided in this parser's profile:
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
JavaParser(LpexView lpexView)
Constructor for the parser. |
|
| Method Summary | |
|---|---|
protected void |
addErrorMessage(int element,
String message)
Displays an embedded error message for an element. |
protected void |
delete()
Flows text inside a comment block during a delete which joins lines. |
protected void |
document(LpexDocumentLocation cursor)
Documents a class / interface / method. |
protected void |
expandProtoKeyword(int s,
int e,
String p)
Subclassed in order to effectively run the doc action when the prototype keyword to expand is "/**". |
String |
getCommentStyleCharacters()
Returns the style characters used for styling comments ("cCt"). |
String |
getLanguage()
Returns "Java", the main language supported by this parser. |
String |
getLanguage(LpexDocumentLocation loc)
Retrieve a string identifying the language segment at the specified location. |
protected String |
getPopupItems(int popupLocation)
Returns this parser's contribution to the popup. |
ResourceBundle |
getProfile()
Returns this parser's profile resource bundle. |
String |
getProperty(String key)
Expands LpexCommonParser's getProperty() to substitute arguments for key PROTOKEY_EMPTY. |
protected SqlLexer |
getSqlLexer(LpexCharStream sqlLexerStream)
Returns the SqlLexer. |
boolean |
isTokenDelimiter(char ch)
Returns true if the specified character is a token delimiter. |
protected void |
join()
Flows text inside a comment block during a join. |
protected void |
methods()
Deprecated. |
protected void |
openLine()
Continues the comment for a line opened inside a comment block. |
protected void |
outline()
Deprecated. |
void |
parseAll()
Total parse of the entire document. |
void |
parseElement(int element)
Incremental parse. |
protected boolean |
setLexer(int newLexer)
Sets or switches the active lexer. |
protected void |
setStyleAttributes()
Defines this parser's style attributes. |
protected void |
split()
Continues the comment for a line split inside a comment block. |
protected void |
splitLine()
Continues the comment for a line split inside a comment block. |
protected void |
trace(LpexDocumentLocation cursor)
Inserts trace call(s) for a method. |
| Methods inherited from class com.ibm.lpex.core.LpexCommonParser |
|---|
addDocumentMessage, addMessage, addMessage, addMessage, blockMarkWord, copyDocumentMessages, cursorIndent, defineFilterAction, getInstallStyleAttributes, getLshToken, getPopupParserItems, getPopupViewItems, getStyleName, getStyles, getTextIndent, getToken, getTokenLocation, indentText, indentText, indentText, isDebuggable, lineComment, lpexView, matchToken, newLine, parse, propertySet, removeDocumentMessages, removeMessages, removeMessages, resetParser, setProperty, setStyle, styleString, terminateParser, tokenBegin, tokenEnd, totalParse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JavaParser(LpexView lpexView)
lpexView - the document view associated with this parser| Method Detail |
public void parseAll()
parseAll in class LpexCommonParserpublic void parseElement(int element)
parseElement in class LpexCommonParserelement - an element affected by a committed change in this viewLpexView.parsePending(int),
LpexView.elementParsed(int),
Total and incremental parsepublic ResourceBundle getProfile()
getProfile in class LpexCommonParserLpexCommonParser.getProperty(java.lang.String),
Parser propertiespublic String getLanguage()
"Java", the main language supported by this parser.
getLanguage in class LpexCommonParserLpexCommonParser.LANGUAGE_JAVApublic String getLanguage(LpexDocumentLocation loc)
getLanguage in class LpexCommonParserloc - document location
LpexCommonParser.getLanguage(),
Mixed content documentsprotected String getPopupItems(int popupLocation)
getPopupItems in class LpexCommonParserpopupLocation - the location on the pop-up menu of the items
requested, one of: LpexCommonParser.POPUP_TOP, LpexCommonParser.POPUP_FILTERVIEW,
LpexCommonParser.POPUP_SOURCE, LpexCommonParser.POPUP_END
null if noneLpexCommonParser.defineFilterAction(java.lang.String, java.lang.String)protected void setStyleAttributes()
'_' (layout blanks),
'k' (keyword),
'r' (keyword return),
'i' (identifier),
'n' (constant),
'q' (string literal),
'o' (operator),
'p' (punctuation),
'c' (comment),
'C' (javadoc comment),
't' (javadoc comment tag),
'b' (brace),
'u' (Unicode sequence),
'e' (error).
public String getCommentStyleCharacters()
getCommentStyleCharacters in class LpexCommonParserprotected void openLine()
openLine in class LpexCommonParserprotected void splitLine()
splitLine in class LpexCommonParserLpexCommonParser.getTextIndent(int)protected void split()
protected void join()
protected void delete()
public boolean isTokenDelimiter(char ch)
true if the specified character is a token delimiter.
isTokenDelimiter in class LpexCommonParserch - character queried, for example, ')'LpexCommonParser.getToken(com.ibm.lpex.core.LpexDocumentLocation)public String getProperty(String key)
getProperty in interface LpexParsergetProperty in class LpexCommonParserkey - property name, for example, "proto.doc" for this parser's expansion
of the keyword "doc" by the proto action, or
"view.proto.doc" for this property as defined in the current view's
instance of the parserLpexCommonParser.getLanguage(),
LpexCommonParser.getProfile(),
Parser properties
protected void addErrorMessage(int element,
String message)
element - the element in errormessage - error message key in LPEX's Resources.propertiesprotected void methods()
protected void outline()
protected void expandProtoKeyword(int s,
int e,
String p)
expandProtoKeyword in class LpexCommonParsers - ZERO-based keyword start offset in the current elemente - ZERO-based keyword end offset in the current elementp - the prototype expansion stringprotected void document(LpexDocumentLocation cursor)
cursor - document location in the scope of the class / interface /
method to documentprotected void trace(LpexDocumentLocation cursor)
cursor - document location in the scope of the method to documentprotected boolean setLexer(int newLexer)
newLexer - the new lexer, one of: LEXER_JAVA, LEXER_SQL
protected SqlLexer getSqlLexer(LpexCharStream sqlLexerStream)
The implementation of this method provided by the JavaParser class does
nothing, except return null.
sqlLexerStream - input character stream for the SQL lexer
|
SWT LPEX v3.0.4 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||