|
iSeries Remote Systems v6.0.0 |
||||||||||
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.etools.iseries.editor.ISeriesEditorParser
com.ibm.etools.iseries.editor.ISeriesEditorCLParser
Nested Class Summary | |
---|---|
protected class |
ISeriesEditorCLParser.ParserState
|
Nested classes inherited from class com.ibm.etools.iseries.editor.ISeriesEditorParser |
---|
ISeriesEditorParser.RunnableParseAll |
Field Summary | |
---|---|
protected static ResourceBundle |
_bundle
the resource bundle for the menus |
protected int |
_iCLType
the CL type for the parser to use |
protected long |
_lClassCode
|
protected long |
_lClassComment
|
protected long |
_lClassContinuation
|
protected long |
_lClassControl
|
protected long |
_lClassError
|
protected long |
_lClassMask
|
protected long |
_lClassMessage
|
protected long |
_lClassSpace
|
protected ISeriesEditorCLPrefixProcessor |
_prefixer
the CL prefix processor |
protected String |
_strCommandFromPrompter
|
protected static String |
_strEmpty
|
protected ISeriesEditorCLSyntaxChecker |
_syntaxChecker
the Cl syntax checker |
protected Vector |
_vectorControlWords
|
protected Vector |
_vectorKeywords
|
protected Vector |
_vectorSymbols
|
static String |
copyright
|
Fields inherited from class com.ibm.etools.iseries.editor.ISeriesEditorParser |
---|
_action, _bDataElementChanged, _bDebugMode, _bIgnoreDatePreference, _bIgnoreParseExtras, _bIsPrimaryLpexView, _bLocal, _bParseAll, _bParsing, _compileEditManager, _compileErrorMarkerListener, _compileMarker, _compileMarkerList, _compileMessageLevel, _editor, _helpResourceBundle, _iCCSID, _iDataLine, _iFile, _labelProvider, _member, _menuCompile, _menuLanguageHelp, _menuSource, _outlinePage, _strImagePath, _strLocalFileName, _strSpecialChars, _view |
Fields inherited from class com.ibm.lpex.core.LpexCommonParser |
---|
ATTRIBUTES_COMMENT, ATTRIBUTES_COMMENT_KEYWORD, ATTRIBUTES_COMMENT1, ATTRIBUTES_DEFAULT, ATTRIBUTES_DIRECTIVE, ATTRIBUTES_ERROR, ATTRIBUTES_KEYWORD, ATTRIBUTES_KEYWORD1, ATTRIBUTES_LIBRARY, ATTRIBUTES_NONSOURCE, ATTRIBUTES_NUMERAL, ATTRIBUTES_STRING, ATTRIBUTES_STRING1, BACKGROUND_COLOR, CLASS_MESSAGE, LANGUAGE_CCPP, LANGUAGE_CICS, LANGUAGE_CL, LANGUAGE_COBOL, LANGUAGE_DDS, LANGUAGE_DLI, LANGUAGE_FORTRAN, LANGUAGE_HLASM, LANGUAGE_HTML, LANGUAGE_JAVA, LANGUAGE_JCL, LANGUAGE_LISP, LANGUAGE_PERL, LANGUAGE_PLI, LANGUAGE_REXX, LANGUAGE_RPG, LANGUAGE_SABRETALK, LANGUAGE_SQL, LANGUAGE_XMI, LANGUAGE_XML, LANGUAGE_XSL, LEXER_RC_END, LEXER_RC_EOF, LEXER_RC_MORE, LEXER_RC_OK, POPUP_END, POPUP_FILTERVIEW, POPUP_SOURCE, POPUP_TOP, PROTOKEY_EMPTY, STYLE_MESSAGE, STYLE_NAME, view |
Fields inherited from interface com.ibm.etools.iseries.editor.IISeriesEditorParser |
---|
Copyright |
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorAdapterContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorDebugContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorHelpContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorSourceViewerConfigurationContributor |
---|
Copyright |
Fields inherited from interface com.ibm.etools.iseries.editor.IISeriesEditorConstantsColors |
---|
COLOR_BLACK_WHITE, COLOR_BLUE_WHITE, COLOR_BRIGHTBLUE_WHITE, COLOR_BRIGHTGREEN_WHITE, COLOR_BRIGHTGREY_WHITE, COLOR_BRIGHTPINK_WHITE, COLOR_BRIGHTRED_WHITE, COLOR_BROWN_WHITE, COLOR_CYAN_WHITE, COLOR_ERROR_HIGHLIGHT, COLOR_GREEN_WHITE, COLOR_GREY_WHITE, COLOR_HIGHLIGHT, COLOR_MAGENTA_WHITE, COLOR_PINK_WHITE, COLOR_RED_WHITE, COLOR_WHITE_BRIGHTRED |
Fields inherited from interface com.ibm.lpex.core.LpexConstants |
---|
HELP_COMMAND_MAP, LPEX_VERSION, MSG_POPUP_ERRORS, MSG_POPUP_EXCLUDESELECTION, MSG_POPUP_FILTERVIEWMENU, MSG_POPUP_INSERTMENU, MSG_POPUP_SELECTEDMENU, MSG_POPUP_SHOWALL, MSG_POPUP_SOURCEMENU, PARSE_PENDING_CHANGE_MASK, PARSE_PENDING_INSERT_MASK, PARSE_PENDING_NEXT_DELETED_MASK, PARSE_PENDING_NEXT_SHOW_DELETED_MASK, PARSE_PENDING_PREV_DELETED_MASK, PARSE_PENDING_PREV_SHOW_DELETED_MASK, PLATFORM_AWT, PLATFORM_SWT, PLATFORM_SWT_KEY, STATUS_FILE_ERRORREADING, STATUS_FILE_INCORRECTENCODING, STATUS_FILE_NOTFOUND, STATUS_FINDTEXT_INVALIDPATTERN, STATUS_FINDTEXT_NOTFOUND, STATUS_FINDTEXT_ONLYOCCURRENCE, STATUS_FINDTEXT_READONLY, STATUS_FINDTEXT_WRAPPED, STATUS_LOCATE_NOSEQUENCETEXT, STATUS_LOCATE_NOTFOUND, STATUS_LOCATE_WRAPPED, STATUS_SAVE_CANCELLED, STATUS_SAVE_FAILED, STATUS_TEXTLIMIT_ENFORCED |
Constructor Summary | |
---|---|
ISeriesEditorCLParser(com.ibm.lpex.core.LpexView view)
Constructor |
Method Summary | |
---|---|
void |
cleanupToolBar(ITextEditor editor,
IToolBarManager toolBarManager)
removes the next and previous error toolbar buttons |
protected void |
contributeMenuItems(IMenuManager menuRoot,
boolean bPopupMenu)
Adds common menu items to the top of the root menu. |
void |
contributeToMenu(ITextEditor editor,
IMenuManager menuManager)
Contributes menu bar items. |
void |
contributeToPopupMenu(ITextEditor editor,
IMenuManager menuRoot)
Contributes popup menu bar items. |
void |
contributeToToolBar(ITextEditor editor,
IToolBarManager toolBarManager)
Contributes tool bar items. |
protected void |
createActions(ITextEditor editor)
Creates menubar and toolbar actions. |
int |
cursorIndent(int element)
|
void |
disableFormatting()
|
void |
disableUppercasing()
|
void |
enableFormatting()
|
void |
enableUppercasing()
|
void |
finishedSaving(ITextEditor editor)
Method finishedSaving Does nothing for the CL Parser |
void |
focusGained(FocusEvent event)
Method focusGained. |
boolean |
getAutoFormatting()
Method getAutoFormatting. |
int |
getAutoFormattingCommandPosition()
Method getAutoFormattingCommandPosition. |
int |
getAutoFormattingContinuedLineIndent()
Method getAutoFormattingContinuedLineIndent. |
boolean |
getAutoFormattingLabelAboveCommand()
Method getAutoFormattingLabelAboveCommand. |
int |
getAutoFormattingLabelPosition()
Method getAutoFormattingLabelPosition. |
boolean |
getAutoFormattingOneParmPerLine()
Method getAutoFormattingOneParmPerLine. |
boolean |
getAutoIndent()
Method getAutoIndent. |
boolean |
getAutoUppercase()
Method getAutoUppercase. |
String |
getCommentStyleCharacters()
|
ISeriesFile |
getFieldFile()
Method getFieldFile. |
com.ibm.etools.systems.editor.SystemTextEditorHelpHandler |
getHelpHandler()
Returns the help handler. |
String |
getHelpPage(com.ibm.lpex.core.LpexView view)
This is called from the editor whenever F1 is pressed. |
String |
getLanguage()
Declared in ISystemEditorParser |
String |
getLshToken()
Declared in LpexLanguageHelp. |
com.ibm.etools.systems.editor.SystemTextEditorHelpHandler |
getMessageHelpHandler()
Returns the message help handler for this parser. |
String |
getPopupItems(int popupLocation)
56708 Return the popup menu items |
ResourceBundle |
getProfile()
|
IISeriesEditorPromptAdapter |
getPromptAdapter()
Method declared on ISeriesEditorParser. |
protected String |
getRegularTextIndent(int iElement)
Method getRegularTextIndent. |
protected int |
getStatementEndElement(int iElement)
This method accepts the first line in a statement and finds the last line in the statement. |
protected int |
getStatementEndLine(int iLine)
Deprecated. |
protected int |
getStatementStartElement(int iElement)
This method accepts an element number and searches backward to find the first Element in the statement that contains the specified Element. |
protected int |
getStatementStartLine(int iLine)
Deprecated. |
protected String |
getStatementString(int iElementStart,
int iElementEnd)
Generates a statement string from the statement's, start and end line numbers. |
protected String |
getStatementWithoutCommand(String strStatement,
StringBuffer strbLabel,
StringBuffer strbCommand)
Method getStatementWithoutCommand. |
IISeriesEditorSyntaxChecker |
getSyntaxChecker()
Returns the syntax checker. |
String |
getTextIndent(int iElement)
Method getTextIndent. |
protected void |
initializeColors()
Initializes the display colors. |
void |
initializeElementClassTypes()
Registers the element class types with Lpex |
void |
initializeLpexView(com.ibm.lpex.core.LpexView lpexView)
Declared in IISeriesEditorParser |
protected void |
initializeTabs()
Initializes tab stops. |
protected boolean |
isElementContinued(int iElement)
Returns true if there is a continuation character at the end of the line. |
protected boolean |
isLineContinued(int iLine)
Deprecated. |
boolean |
isLineDebuggable(int iLine)
Method isLineDebuggable. |
boolean |
isValidFieldAction()
Method isValidFieldAction. |
protected boolean |
isWordContinued(String strLine,
int iPosition)
|
protected com.ibm.lpex.core.LpexDocumentLocation |
matchToken(com.ibm.lpex.core.LpexDocumentLocation loc)
Method matchToken Matches the token that the location specifies. |
protected void |
newLine()
Method newLine enhanced version which reparses appropriately |
protected void |
openLine()
Method openLine. |
void |
parseElements(int iElementFirst,
int iElementLast,
int iElementCurrent)
Parse range of elements This just calls parseLine(i) for each element, subclasses can handle it differently if they want (e.g. |
void |
parseLine(int iElement)
Called by the JLpex editor whenever a line has been changed by the user. |
protected void |
parseLine(int iElement,
ISeriesEditorCLParser.ParserState state)
Port of l4clprs.c, ParseLine |
protected void |
parseLineIdentifier(String strLine,
int iIndex,
ISeriesEditorCLParser.ParserState state)
Port of l4clprs.c, subset of ParseLine. |
void |
parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor)
Parse the entire document. |
void |
prompt()
Called by the editor to display the iSeries toolkit prompt dialog. |
void |
promptRequest()
Called when the F4 key was just pressed. |
protected int |
readComment(String strLine,
int iIndex,
ISeriesEditorCLParser.ParserState state)
This method will read characters in the given line buffer from the specified position up to the end comment character sequence or the end of line. |
protected int |
readLayout(String strLine,
int iIndex)
This method reads characters comprising layout space in the given line buffer starting from the specified position. |
protected int |
readLiteral(String strLine,
int iIndex,
ISeriesEditorCLParser.ParserState state)
This method will read characters in the given line buffer from the specified position up to the matching (single or double) quote or the end of line. |
protected int |
readNumber(String strLine,
int iIndex)
This routine reads the next number in the given line buffer starting from the specified position. |
protected int |
readSymbol(String strLine,
int iIndex)
This method checks if the next token in the given line buffer is one of the special symbols listed in the parse table. |
protected String |
readWord(String strLine,
int iIndex)
This method reads the next word in the given line buffer starting from the specified position. |
void |
setCLType(String strName)
Sets the CL type from the file name extension. |
void |
setEditor(com.ibm.lpex.alef.LpexTextEditor editor)
Method setEditor. |
protected void |
setElementsFromStatement(int iElementStart,
int iElementEnd,
String strStatement)
Converts a single statement into multiple Elements of text, if the text is longer than the allowed Element length. |
protected void |
setLinesFromStatement(int iLineStart,
int iLineEnd,
String strStatement)
Deprecated. |
protected String |
showPromptDialog(ISeriesConnection as400,
String strCommand)
Displays the prompt dialog given the prompt command string. |
protected void |
split()
Method split. |
protected void |
splitLine()
Method splitLine. |
protected void |
upperCaseElement(int iElement)
Method upperCaseElement. |
protected void |
upperCaseLine(int iLine)
Deprecated. |
Methods inherited from class com.ibm.lpex.core.LpexCommonParser |
---|
addDocumentMessage, addMessage, addMessage, addMessage, blockMarkWord, copyDocumentMessages, defineFilterAction, expandProtoKeyword, getInstallStyleAttributes, getLanguage, getPopupParserItems, getPopupViewItems, getStyleName, getStyles, getToken, getTokenLocation, indentText, indentText, indentText, isDebuggable, isTokenDelimiter, lineComment, lpexView, parse, propertySet, removeDocumentMessages, removeMessages, removeMessages, resetParser, setProperty, setStyle, styleString, tokenBegin, tokenEnd, totalParse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.swt.events.FocusListener |
---|
focusLost |
Field Detail |
protected static ResourceBundle _bundle
protected static final String _strEmpty
public static final String copyright
protected int _iCLType
protected long _lClassCode
protected long _lClassComment
protected long _lClassContinuation
protected long _lClassControl
protected long _lClassError
protected long _lClassMask
protected long _lClassMessage
protected long _lClassSpace
protected ISeriesEditorCLPrefixProcessor _prefixer
protected String _strCommandFromPrompter
protected ISeriesEditorCLSyntaxChecker _syntaxChecker
protected Vector _vectorControlWords
protected Vector _vectorKeywords
protected Vector _vectorSymbols
Constructor Detail |
public ISeriesEditorCLParser(com.ibm.lpex.core.LpexView view)
Method Detail |
public void cleanupToolBar(ITextEditor editor, IToolBarManager toolBarManager)
ISeriesEditorParser
subclasses which add other toolbar buttons should subclass and call super
cleanupToolBar
in interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
cleanupToolBar
in class ISeriesEditorParser
ISystemTextEditorContextContributor.cleanupToolBar(ITextEditor, IToolBarManager)
protected void contributeMenuItems(IMenuManager menuRoot, boolean bPopupMenu)
public void contributeToMenu(ITextEditor editor, IMenuManager menuManager)
contributeToMenu
in interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
contributeToMenu
in class ISeriesEditorParser
public void contributeToPopupMenu(ITextEditor editor, IMenuManager menuRoot)
contributeToPopupMenu
in interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
public void contributeToToolBar(ITextEditor editor, IToolBarManager toolBarManager)
contributeToToolBar
in interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
contributeToToolBar
in class ISeriesEditorParser
protected void createActions(ITextEditor editor)
public int cursorIndent(int element)
LpexCommonParser.cursorIndent(int)
public void disableFormatting()
public void disableUppercasing()
public void enableFormatting()
public void enableUppercasing()
public void finishedSaving(ITextEditor editor)
finishedSaving
in interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
ISystemTextEditorContextContributor.finishedSaving(ITextEditor)
public void focusGained(FocusEvent event)
focusGained
in interface FocusListener
focusGained
in class ISeriesEditorParser
FocusListener.focusGained(FocusEvent)
public boolean getAutoFormatting()
public int getAutoFormattingCommandPosition()
public int getAutoFormattingContinuedLineIndent()
public boolean getAutoFormattingLabelAboveCommand()
public int getAutoFormattingLabelPosition()
public boolean getAutoFormattingOneParmPerLine()
public boolean getAutoIndent()
com.ibm.lpex.core.LpexCommonParser#getAutoIndent()
public boolean getAutoUppercase()
getAutoUppercase
in class ISeriesEditorParser
public String getCommentStyleCharacters()
LpexCommonParser.getCommentStyleCharacters()
public ISeriesFile getFieldFile()
getFieldFile
in interface IISeriesEditorParser
getFieldFile
in class ISeriesEditorParser
IISeriesEditorParser.getFieldFile()
public com.ibm.etools.systems.editor.SystemTextEditorHelpHandler getHelpHandler()
getHelpHandler
in interface IISeriesEditorParser
public String getHelpPage(com.ibm.lpex.core.LpexView view)
getHelpPage
in interface com.ibm.lpex.alef.LpexLanguageHelp
public String getLanguage()
getLanguage
in interface com.ibm.etools.systems.editor.ISystemTextEditorParser
getLanguage
in class ISeriesEditorParser
public String getLshToken()
getLshToken
in class ISeriesEditorParser
public com.ibm.etools.systems.editor.SystemTextEditorHelpHandler getMessageHelpHandler()
public String getPopupItems(int popupLocation)
getPopupItems
in class ISeriesEditorParser
LpexCommonParser.getPopupItems(int)
public ResourceBundle getProfile()
public IISeriesEditorPromptAdapter getPromptAdapter()
getPromptAdapter
in interface IISeriesEditorParser
getPromptAdapter
in class ISeriesEditorParser
protected String getRegularTextIndent(int iElement)
iElement
- the element to find the indent for
protected int getStatementEndElement(int iElement)
protected int getStatementEndLine(int iLine)
protected int getStatementStartElement(int iElement)
protected int getStatementStartLine(int iLine)
protected String getStatementString(int iElementStart, int iElementEnd)
protected String getStatementWithoutCommand(String strStatement, StringBuffer strbLabel, StringBuffer strbCommand)
strStatement
- the statement to strip the command and label fromstrbCommand
- the command stripped
public IISeriesEditorSyntaxChecker getSyntaxChecker()
getSyntaxChecker
in interface IISeriesEditorParser
getSyntaxChecker
in class ISeriesEditorParser
IISeriesEditorParser.getSyntaxChecker()
public String getTextIndent(int iElement)
iElement
- the element to determine the indent
LpexCommonParser.getTextIndent(int)
protected void initializeColors()
public void initializeElementClassTypes()
public void initializeLpexView(com.ibm.lpex.core.LpexView lpexView)
initializeLpexView
in interface IISeriesEditorParser
initializeLpexView
in class ISeriesEditorParser
protected void initializeTabs()
protected boolean isElementContinued(int iElement)
protected boolean isLineContinued(int iLine)
public boolean isLineDebuggable(int iLine)
isLineDebuggable
in interface com.ibm.etools.systems.editor.ISystemTextEditorDebugContributor
iLine
- the line to check
public boolean isValidFieldAction()
isValidFieldAction
in interface IISeriesEditorParser
isValidFieldAction
in class ISeriesEditorParser
IISeriesEditorParser.isValidFieldAction()
protected boolean isWordContinued(String strLine, int iPosition)
protected com.ibm.lpex.core.LpexDocumentLocation matchToken(com.ibm.lpex.core.LpexDocumentLocation loc)
loc
- the location of the token to match
LpexCommonParser.matchToken(LpexDocumentLocation)
protected void newLine()
LpexCommonParser.newLine()
protected void openLine()
LpexCommonParser.openLine()
public void parseElements(int iElementFirst, int iElementLast, int iElementCurrent)
ISeriesEditorParser
parseElements
in class ISeriesEditorParser
ISeriesEditorParser.parseElements(int, int, int)
public void parseLine(int iElement)
parseLine
in class ISeriesEditorParser
ISeriesEditorParser.parseLine(int)
protected void parseLine(int iElement, ISeriesEditorCLParser.ParserState state)
protected void parseLineIdentifier(String strLine, int iIndex, ISeriesEditorCLParser.ParserState state)
public void parseRegion(int iElementFirst, int iElementLast, IProgressMonitor progressMonitor)
parseRegion
in class ISeriesEditorParser
public void prompt()
prompt
in class ISeriesEditorParser
public void promptRequest()
promptRequest
in class ISeriesEditorParser
protected int readComment(String strLine, int iIndex, ISeriesEditorCLParser.ParserState state)
protected int readLayout(String strLine, int iIndex)
protected int readLiteral(String strLine, int iIndex, ISeriesEditorCLParser.ParserState state)
protected int readNumber(String strLine, int iIndex)
protected int readSymbol(String strLine, int iIndex)
protected String readWord(String strLine, int iIndex)
public void setCLType(String strName)
public void setEditor(com.ibm.lpex.alef.LpexTextEditor editor)
IISeriesEditorParser
setEditor
in interface IISeriesEditorParser
setEditor
in class ISeriesEditorParser
The CCSID is set here. If the file CCSID is invalid, the job CCSID is used.
The CCSID is used later to obtain the special translation characters in
getSpecialChars.
IMPORTANT!!!!!!!!
NOTE: if you modify this method, you NEED to propate all changes to all 4 COBOL parsers
protected void setElementsFromStatement(int iElementStart, int iElementEnd, String strStatement)
protected void setLinesFromStatement(int iLineStart, int iLineEnd, String strStatement)
protected String showPromptDialog(ISeriesConnection as400, String strCommand)
protected void split()
protected void splitLine()
LpexCommonParser.splitLine()
protected void upperCaseElement(int iElement)
iElement
- the Element to uppercaseprotected void upperCaseLine(int iLine)
iLine
- the line to uppercase
|
iSeries Remote Systems v6.0.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |