|
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.ISeriesEditorRPGILEParser
com.ibm.etools.iseries.parsers.ISeriesEditorRPGILESQLParser
public class ISeriesEditorRPGILESQLParser
Nested Class Summary | |
---|---|
protected class |
ISeriesEditorRPGILESQLParser.SQLCompondStatement
Used to record the compond statement (BEGIN<->END) in free form SQL |
Nested classes/interfaces inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorParser |
---|
ISeriesEditorParser.DataLineMarkListener, ISeriesEditorParser.RunnableParseAll |
Field Summary | |
---|---|
protected ISeriesEditorRPGILESQLSourceViewerConfiguration |
_configuration
The source viewer configuration for this parser |
protected boolean |
_disableFormatting
|
protected SQLFormatter |
_formatter
|
protected boolean |
_inEnterRPG
|
protected boolean |
_inNewLine
|
protected boolean |
_inOpenLine
|
protected long |
_lClass_CFreeSQL
|
protected long |
_lClass_CFreeSQLEnd
|
protected long |
_lClass_CFreeSQLEndReal
|
protected long |
_lClass_CFreeSQLStart
|
protected long |
_lClassMaskAll
|
protected boolean |
_removeFromParsePending
|
protected int |
_thisSQLEndStatement
|
static String |
Copyright
|
protected int |
lastSQLLineParsed
|
Fields inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorRPGILEParser |
---|
_alreadyParseAll, _bInCF, _bInCFSQL, _bundle, _freeFormConverter, _helpHandler, _helpMessageHandler, _lClass_CFree, _lClass_CFreeDirective, _lClass_EndCFreeDirective, _lClass_FixSQLEnd, _lClass_FixSQLStart, _lClassBackwardLink, _lClassComment, _lClassControl, _lClassError, _lClassForwardLink, _lClassMask, _lClassProcedure, _lClassSpace, _lClassSql, _lClassSubroutine, _lineClassChangedFlag, _model, _needToAutoSyntaxCheck, _prefixer, _programVerifier, _prompter, _ruler, _store, _syntaxChecker, _tokenizer, copyright |
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.editor.IISeriesEditorConstantsRPG |
---|
_straSQLWords, _straSQLWordsWithComment, CMD_SETFORMATLINETEXT, CMD_SETTABS, COLUMN_C_FREE, COLUMN_C_OPCODE, COLUMN_COMMENT, COLUMN_FACTOR1, COLUMN_FACTOR2, COLUMN_KEYWORDS, COLUMN_PROC_NAME_BEGIN, COLUMN_PROC_NAME_END, COLUMN_PROC_SPEC, COLUMN_SPEC, FIELD_FACTOR1, FIELD_FACTOR2, FIELD_FROM, FIELD_OPCODE, FIELD_TOLENGTH, OPM_COLUMN_FACTOR1 |
Constructor Summary | |
---|---|
ISeriesEditorRPGILESQLParser(LpexView view)
The constructor for the ILE RPG SQL parser |
Method Summary | |
---|---|
void |
contributeToMenu(ITextEditor editor,
IMenuManager menuRoot)
Contributes menu bar items. |
protected void |
createActions(ITextEditor editor)
Creates menubar and toolbar actions. |
int |
cursorIndent(int iElement)
|
int |
endOfSQL(int iElement)
Find the end of the SQL statement |
protected void |
enterRPG()
Method enterRPG enhanced version which handles formatting appropriately |
protected int |
getElementSpecTypeAndUpdateClasses(int iElement)
Returns the spec type of an element D62355 - the flag needToSetSQLType to determine if we need to update the CFreeSQL related tabs for in the range of line for this SQL statement. |
protected int |
getElementSpecTypeOnly(int iElement)
Returns the spec type of an element D62355 - the flag needToSetSQLType to determine if we need to update the CFreeSQL related tabs for in the range of line for this SQL statement. |
protected int |
getElementSpecTypeWhenFileLoading(int iElement)
Returns the spec type of an element D62355 - the flag needToSetSQLType to determine if we need to update the CFreeSQL related tabs for in the range of line for this SQL statement. |
protected int |
getFreeFormSQLEndElement(int startElement)
Get the end of the SQL statement. |
protected int |
getFreeFormSQLEndElementByTaggedClass(int iElement)
Get the end of the SQL statement using the classes information of the elements. |
protected int |
getFreeFormSQLStartElement(int iElement)
Get the start of the SQL statement for an free form embedded SQL statement. |
protected int |
getFreeFormSQLStartElementByTaggedClass(int iElement)
Get the start of the SQL statement using the classes information of the elements. |
SystemTextEditorHelpHandler |
getHelpHandler()
Returns the help handler for this parser. |
String |
getLanguage()
Declared in ISystemEditorParser D62355 - the language for this parser is "RPGLESQL", which is used to retrieve the portion of the samples |
protected int |
getLastElementInThisCFreeBlock(int iElement,
boolean updateCFreeSQLFlag)
This element will find the last element in a CFree block. |
protected long |
getLineClassTypes(int iElement,
String strLine,
int iSpecType)
Set the line classes of the current element. |
ResourceBundle |
getProfile()
|
SqlLexer |
getRPGLEFixedSqlLexer(LpexCharStream stream)
Returns the SqlLexer for fixed form RPG. |
SqlLexer |
getRPGLEFreeSqlLexer(LpexCharStream stream)
Returns the SqlLexer for free form RPG. |
LpexSourceViewerConfiguration |
getSourceViewerConfiguration()
Returns the source viewer configuration. |
int |
getStatementEndElement(int iElement)
retrives the statement end element number. |
int |
getStatementStartElement(int iElement)
retrives the statement start element number. |
String |
getTextIndent(int iElement)
|
void |
initializeColors(LpexView view)
Initializes the display colors for tokens. |
void |
initializeElementClassTypes()
Registers the element class types with Lpex D62355 |
protected void |
initParser()
initializes the parser |
protected boolean |
isElementStartSQLStatement(int iElement)
Determines whether or not an element has an EXEC SQL statement, assuming C free format, after comments have been stripped. |
boolean |
isSQLElement(int iElement)
Indicates whether or not the element is part of an SQL statement |
protected void |
newLine()
Method newLine. |
protected void |
openLine()
Method openLine. |
protected int |
parseAndAddLinesCFreeClasses(int iElement)
This method will parse and tag the lines starting at the input line as CFree, until it reach non-blank column 6 or 7, or data spec After parsing and updating the CFree class of those lines, it also makes sure the CFreeSQL related classes are also been tagged to those line properly. |
protected void |
parseElementAfterDelete(int iElement)
This method will handle the case for parseElement, where its previous element is deleted. |
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)
Port of evfripp.c, LineParse This really parses an element and not a line...... |
protected void |
parseRegion(int iElementFirst,
int iElementLast,
IProgressMonitor progressMonitor)
Parses a contiguous set of Elements given the first and last Element numbers. |
protected int |
parseRegionForElement(int iElement,
int iSpecType)
D62355 - This method will do the parse region job for one particular element The type of this element is known already. |
protected void |
printLineClasses(int iElementFirst,
int iElementLast)
|
protected void |
split()
Method split. |
protected void |
splitLine()
Method splitLine. |
int |
startOfSQL(int iElement)
Find the beginning of the SQL statement |
protected int |
updateFreeSQLRelatedClass(int iElementPrevious,
int iElementLast)
This element will find the last element in a CFree block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
protected ISeriesEditorRPGILESQLSourceViewerConfiguration _configuration
protected long _lClass_CFreeSQLStart
protected long _lClass_CFreeSQL
protected long _lClass_CFreeSQLEnd
protected long _lClass_CFreeSQLEndReal
protected long _lClassMaskAll
protected int lastSQLLineParsed
protected int _thisSQLEndStatement
protected SQLFormatter _formatter
protected boolean _disableFormatting
protected boolean _inOpenLine
protected boolean _inNewLine
protected boolean _inEnterRPG
protected boolean _removeFromParsePending
Constructor Detail |
---|
public ISeriesEditorRPGILESQLParser(LpexView view)
view
- Method Detail |
---|
protected void initParser()
initParser
in class ISeriesEditorRPGILEParser
com.ibm.etools.iseries.editor.ISeriesEditorRPGILEParser#initParser()
public ResourceBundle getProfile()
getProfile
in class ISeriesEditorRPGILEParser
public String getLanguage()
getLanguage
in interface ISystemTextEditorParser
getLanguage
in class ISeriesEditorRPGILEParser
protected void createActions(ITextEditor editor)
createActions
in class ISeriesEditorRPGILEParser
public LpexSourceViewerConfiguration getSourceViewerConfiguration()
getSourceViewerConfiguration
in interface ISystemTextEditorSourceViewerConfigurationContributor
getSourceViewerConfiguration
in class ISeriesEditorRPGILEParser
com.ibm.etools.iseries.editor.ISeriesEditorRPGILEParser#getSourceViewerConfiguration()
public void contributeToMenu(ITextEditor editor, IMenuManager menuRoot)
contributeToMenu
in interface ISystemTextEditorContextContributor
contributeToMenu
in class ISeriesEditorRPGILEParser
public void initializeColors(LpexView view)
initializeColors
in class ISeriesEditorRPGILEParser
public void initializeElementClassTypes()
initializeElementClassTypes
in class ISeriesEditorRPGILEParser
protected long getLineClassTypes(int iElement, String strLine, int iSpecType)
public void parseElements(int iElementFirst, int iElementLast, int iElementCurrent)
ISeriesEditorParser
parseElements
in interface ISQLParser
parseElements
in class ISeriesEditorRPGILEParser
iElementFirst
- the first element to parseiElementLast
- the last element to parseiElementCurrent
- the current element in the viewD62355 - this method will parse each line in the iElementFirst <-> iElementLast range.
protected int getElementSpecTypeOnly(int iElement)
getElementSpecTypeOnly
in class ISeriesEditorRPGILEParser
protected int getElementSpecTypeAndUpdateClasses(int iElement)
getElementSpecTypeAndUpdateClasses
in class ISeriesEditorRPGILEParser
protected int getElementSpecTypeWhenFileLoading(int iElement)
getElementSpecTypeWhenFileLoading
in class ISeriesEditorRPGILEParser
public void parseLine(int iElement)
parseLine
in class ISeriesEditorRPGILEParser
protected void parseRegion(int iElementFirst, int iElementLast, IProgressMonitor progressMonitor)
parseRegion
in class ISeriesEditorRPGILEParser
public int startOfSQL(int iElement)
iElementStart
-
public int endOfSQL(int iElement)
iElementStart
-
protected int getFreeFormSQLStartElement(int iElement)
iElement
- The element to search for its start statement
protected int getFreeFormSQLStartElementByTaggedClass(int iElement)
iElement
- The element to search for its start statement
protected int getFreeFormSQLEndElementByTaggedClass(int iElement)
iElement
- The element to search for its start statement
protected int getFreeFormSQLEndElement(int startElement)
startElement
- The start element of this SQL statement
protected boolean isElementStartSQLStatement(int iElement)
isElementStartSQLStatement
in class ISeriesEditorRPGILEParser
iElement
- the element to check
public SqlLexer getRPGLEFreeSqlLexer(LpexCharStream stream)
public SqlLexer getRPGLEFixedSqlLexer(LpexCharStream stream)
protected int getLastElementInThisCFreeBlock(int iElement, boolean updateCFreeSQLFlag)
protected int updateFreeSQLRelatedClass(int iElementPrevious, int iElementLast)
protected int parseRegionForElement(int iElement, int iSpecType)
parseRegionForElement
in class ISeriesEditorRPGILEParser
protected int parseAndAddLinesCFreeClasses(int iElement)
protected void parseElementAfterDelete(int iElement)
parseElementAfterDelete
in class ISeriesEditorRPGILEParser
iElement
- public int getStatementStartElement(int iElement)
getStatementStartElement
in class ISeriesEditorRPGILEParser
iElement
- The element to search for its start statement
public int getStatementEndElement(int iElement)
getStatementEndElement
in class ISeriesEditorRPGILEParser
iElement
- The element to search for its end statement
protected void printLineClasses(int iElementFirst, int iElementLast)
printLineClasses
in class ISeriesEditorRPGILEParser
protected void openLine()
com.ibm.lpex.core.LpexCommonParser#openLine()
protected void newLine()
com.ibm.lpex.core.LpexCommonParser#newLine()
protected void split()
protected void splitLine()
com.ibm.lpex.core.LpexCommonParser#splitLine()
protected void enterRPG()
com.ibm.lpex.core.LpexCommonParser#enterRPG()
public int cursorIndent(int iElement)
public String getTextIndent(int iElement)
public boolean isSQLElement(int iElement)
ISQLParser
isSQLElement
in interface ISQLParser
iElement
- the element to check
public SystemTextEditorHelpHandler getHelpHandler()
ISeriesEditorRPGILEParser
getHelpHandler
in interface IISeriesEditorParser
getHelpHandler
in class ISeriesEditorRPGILEParser
com.ibm.etools.iseries.editor.ISeriesEditorRPGILEParser#getHelpHandler()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |