|
Rational Developer for Power Systems Software V7.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLpexCommonParser
com.ibm.etools.iseries.parsers.ISeriesEditorParser
com.ibm.etools.iseries.parsers.ISeriesEditorCLParser
public class ISeriesEditorCLParser
| Nested Class Summary | |
|---|---|
protected class |
ISeriesEditorCLParser.ParserState
|
| Nested classes/interfaces inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorParser |
|---|
ISeriesEditorParser.DataLineMarkListener, ISeriesEditorParser.RunnableParseAll |
| Fields inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorParser |
|---|
_action, _bDataElementChanged, _bDebugMode, _bFromStylePreview, _bIgnoreParseExtras, _bIsPrimaryLpexView, _bLocal, _bOutlineViewNeedsResetting, _bParseAll, _bParsing, _compileEditManager, _compileErrorMarkerListener, _compileMarkNames, _dataLineMarkID, _dataLineMarkListener, _editor, _helpResourceBundle, _iCCSID, _iFile, _labelProvider, _member, _menuLanguageHelp, _menuSource, _outlinePage, _strImagePath, _strLocalFileName, _strSpecialChars, _view, DATA_LINE |
| Fields inherited from interface com.ibm.etools.iseries.parsers.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 |
| Constructor Summary | |
|---|---|
ISeriesEditorCLParser(LpexView view)
Constructor |
|
| Method Summary | |
|---|---|
void |
cleanupMenu(ITextEditor editor,
IMenuManager menuManager)
Removes the Source and Compile menu items |
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 |
doRefresh()
Remove block nesting in the prefix area |
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. |
int |
getAutoFormattingLineLength()
Retrieves the line length to use for fomatting |
boolean |
getAutoFormattingOneParmPerLine()
Method getAutoFormattingOneParmPerLine. |
boolean |
getAutoIndent()
Method getAutoIndent. |
boolean |
getAutoUppercase()
Method getAutoUppercase. |
String |
getCommentStyleCharacters()
|
IQSYSFile |
getFieldFile()
Method getFieldFile. |
SystemTextEditorHelpHandler |
getHelpHandler()
Returns the help handler. |
String |
getHelpPage(LpexView view)
This is called from the editor whenever F1 is pressed. |
IQSYSMember |
getIncludeMember()
Subclasses should override if implementing the action ActionOpenInclude |
String |
getLanguage()
Declared in ISystemEditorParser |
String |
getLshToken()
Declared in LpexLanguageHelp. |
SystemTextEditorHelpHandler |
getMessageHelpHandler()
Returns the message help handler for this parser. |
LanguageModel |
getModel(boolean bUpdate)
Returns the element tree model for the outline view. |
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. |
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. |
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. |
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(LpexView lpexView)
Declared in IISeriesEditorParser |
protected void |
initializeTabs()
Initializes tab stops. |
protected void |
initParser()
initialize parser |
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. |
boolean |
isValidIncludeAction()
Method isValidIncludeAction. |
protected boolean |
isWordContinued(String strLine,
int iPosition)
|
protected LpexDocumentLocation |
matchToken(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 |
parseElement(int iElement)
CL must override the version in ISeriesEditorParser because it needs to handle continued lines |
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,
int iElement)
Port of l4clprs.c, subset of ParseLine. |
void |
parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor)
Subclasses must subclass. |
void |
parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor,
ISeriesEditorCLParser.ParserState state)
Parse the entire document. |
void |
populateModel()
Populate the model for the Outline view with labels and subroutines |
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(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(IBMiConnection as400,
String strCommand)
Displays the prompt dialog given the prompt command string. |
protected void |
split()
Method split. |
protected void |
splitLine()
Method splitLine. |
protected boolean |
supportsOutlineView()
CL supports outline view for specific types |
void |
terminateParser()
When parsing is disabled, turn off model |
protected void |
upperCaseElement(int iElement)
Method upperCaseElement. |
protected void |
upperCaseLine(int iLine)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 long _lClassSubroutine
protected long _lClassLabel
protected long _lClassInclude
protected long _lClassCallKeywords
protected long _lClassPGMKeywords
protected ISeriesEditorCLPrefixProcessor _prefixer
protected String _strCommandFromPrompter
protected ISeriesEditorCLSyntaxChecker _syntaxChecker
protected Vector<String> _vectorControlWords
protected Vector<String> _vectorKeywords
protected Vector<String> _vectorSymbols
protected Vector<String> _vectorSubroutineWords
protected Vector<String> _vectorCallKeywords
protected Vector<String> _vectorPGMKeywords
protected ISeriesEditorCLModel _model
| Constructor Detail |
|---|
public ISeriesEditorCLParser(LpexView view)
| Method Detail |
|---|
protected void initParser()
initParser in class ISeriesEditorParser
public void cleanupToolBar(ITextEditor editor,
IToolBarManager toolBarManager)
ISeriesEditorParsersubclasses which add other toolbar buttons should subclass and call super
cleanupToolBar in interface ISystemTextEditorContextContributorcleanupToolBar in class ISeriesEditorParserISystemTextEditorContextContributor.cleanupToolBar(ITextEditor, IToolBarManager)
protected void contributeMenuItems(IMenuManager menuRoot,
boolean bPopupMenu)
public void contributeToMenu(ITextEditor editor,
IMenuManager menuManager)
contributeToMenu in interface ISystemTextEditorContextContributorcontributeToMenu in class ISeriesEditorParser
public void contributeToPopupMenu(ITextEditor editor,
IMenuManager menuRoot)
contributeToPopupMenu in interface ISystemTextEditorContextContributor
public void contributeToToolBar(ITextEditor editor,
IToolBarManager toolBarManager)
contributeToToolBar in interface ISystemTextEditorContextContributorcontributeToToolBar in class ISeriesEditorParserprotected void createActions(ITextEditor editor)
public int cursorIndent(int element)
com.ibm.lpex.core.LpexCommonParser#cursorIndent(int)public void disableFormatting()
public void disableUppercasing()
public void enableFormatting()
public void enableUppercasing()
public void finishedSaving(ITextEditor editor)
finishedSaving in interface ISystemTextEditorContextContributorISystemTextEditorContextContributor.finishedSaving(ITextEditor)public void focusGained(FocusEvent event)
focusGained in class ISeriesEditorParserFocusListenerpublic boolean getAutoFormatting()
public int getAutoFormattingCommandPosition()
public int getAutoFormattingContinuedLineIndent()
public boolean getAutoFormattingLabelAboveCommand()
public int getAutoFormattingLabelPosition()
public boolean getAutoFormattingOneParmPerLine()
public int getAutoFormattingLineLength()
public boolean getAutoIndent()
com.ibm.lpex.core.LpexCommonParser#getAutoIndent()public boolean getAutoUppercase()
getAutoUppercase in class ISeriesEditorParserpublic String getCommentStyleCharacters()
com.ibm.lpex.core.LpexCommonParser#getCommentStyleCharacters()public IQSYSFile getFieldFile()
getFieldFile in interface IISeriesEditorParsergetFieldFile in class ISeriesEditorParsercom.ibm.etools.iseries.editor.IISeriesEditorParser#getFieldFile()public SystemTextEditorHelpHandler getHelpHandler()
getHelpHandler in interface IISeriesEditorParserpublic String getHelpPage(LpexView view)
public String getLanguage()
getLanguage in interface ISystemTextEditorParsergetLanguage in class ISeriesEditorParserpublic String getLshToken()
getLshToken in class ISeriesEditorParserpublic SystemTextEditorHelpHandler getMessageHelpHandler()
public String getPopupItems(int popupLocation)
getPopupItems in class ISeriesEditorParsercom.ibm.lpex.core.LpexCommonParser#getPopupItems(int)public ResourceBundle getProfile()
public IISeriesEditorPromptAdapter getPromptAdapter()
getPromptAdapter in interface IISeriesEditorParsergetPromptAdapter in class ISeriesEditorParserprotected String getRegularTextIndent(int iElement)
iElement - the element to find the indent for
public int getStatementEndElement(int iElement)
protected int getStatementEndLine(int iLine)
public int getStatementStartElement(int iElement)
protected int getStatementStartLine(int iLine)
public 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 IISeriesEditorParsergetSyntaxChecker in class ISeriesEditorParsercom.ibm.etools.iseries.editor.IISeriesEditorParser#getSyntaxChecker()public String getTextIndent(int iElement)
iElement - the element to determine the indent
com.ibm.lpex.core.LpexCommonParser#getTextIndent(int)protected void initializeColors()
public void initializeElementClassTypes()
public void initializeLpexView(LpexView lpexView)
initializeLpexView in interface IISeriesEditorParserinitializeLpexView in class ISeriesEditorParserprotected void initializeTabs()
protected boolean isElementContinued(int iElement)
protected boolean isLineContinued(int iLine)
public boolean isLineDebuggable(int iLine)
isLineDebuggable in interface ISystemTextEditorDebugContributoriLine - the line to check
public boolean isValidFieldAction()
isValidFieldAction in interface IISeriesEditorParserisValidFieldAction in class ISeriesEditorParsercom.ibm.etools.iseries.editor.IISeriesEditorParser#isValidFieldAction()
protected boolean isWordContinued(String strLine,
int iPosition)
protected LpexDocumentLocation matchToken(LpexDocumentLocation loc)
loc - the location of the token to match
com.ibm.lpex.core.LpexCommonParser#matchToken(LpexDocumentLocation)protected void newLine()
com.ibm.lpex.core.LpexCommonParser#newLine()protected void openLine()
com.ibm.lpex.core.LpexCommonParser#openLine()
public void parseElements(int iElementFirst,
int iElementLast,
int iElementCurrent)
ISeriesEditorParser
parseElements in class ISeriesEditorParsercom.ibm.etools.iseries.editor.ISeriesEditorParser#parseElements(int, int, int)public void parseLine(int iElement)
parseLine in class ISeriesEditorParsercom.ibm.etools.iseries.editor.ISeriesEditorParser#parseLine(int)
protected void parseLine(int iElement,
ISeriesEditorCLParser.ParserState state)
protected void parseLineIdentifier(String strLine,
int iIndex,
ISeriesEditorCLParser.ParserState state,
int iElement)
public void parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor)
ISeriesEditorParser
parseRegion in class ISeriesEditorParser
public void parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor,
ISeriesEditorCLParser.ParserState state)
public void prompt()
prompt in class ISeriesEditorParserpublic 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(LpexTextEditor editor)
IISeriesEditorParser
setEditor in interface IISeriesEditorParsersetEditor in class ISeriesEditorParsereditor - the editor for this parserThe 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(IBMiConnection as400,
String strCommand)
protected void split()
protected void splitLine()
com.ibm.lpex.core.LpexCommonParser#splitLine()protected void upperCaseElement(int iElement)
iElement - the Element to uppercaseprotected void upperCaseLine(int iLine)
iLine - the line to uppercaseprotected boolean supportsOutlineView()
supportsOutlineView in class ISeriesEditorParserpublic LanguageModel getModel(boolean bUpdate)
getModel in interface IISeriesEditorParsergetModel in class ISeriesEditorParser
public void cleanupMenu(ITextEditor editor,
IMenuManager menuManager)
ISeriesEditorParsersubclasses which add other menus should subclass and call super
cleanupMenu in interface ISystemTextEditorContextContributorcleanupMenu in class ISeriesEditorParserISystemTextEditorContextContributor.cleanupMenu(ITextEditor, IMenuManager)public void terminateParser()
terminateParser in class ISeriesEditorParsercom.ibm.lpex.core.LpexCommonParser#terminateParser()public void parseElement(int iElement)
parseElement in class ISeriesEditorParsercom.ibm.etools.iseries.editor.ISeriesEditorParser#parseElement(int),
com.ibm.lpex.core.LpexCommonParser#parseElement(int)public void doRefresh()
doRefresh in interface ISystemTextEditorParserdoRefresh in class ISeriesEditorParserISystemTextEditorParser.doRefresh()public void populateModel()
public boolean isValidIncludeAction()
isValidIncludeAction in interface IISeriesEditorParserisValidIncludeAction in class ISeriesEditorParsercom.ibm.etools.iseries.editor.IISeriesEditorParser#isValidIncludeAction()public IQSYSMember getIncludeMember()
ISeriesEditorParser
getIncludeMember in interface IISeriesEditorParsergetIncludeMember in class ISeriesEditorParsercom.ibm.etools.iseries.editor.IISeriesEditorParser#getIncludeMember()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||