Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.parsers
Class ISeriesEditorParser

java.lang.Object
  extended by LpexCommonParser
      extended by com.ibm.etools.iseries.parsers.ISeriesEditorParser
All Implemented Interfaces:
IISeriesCompileErrorInfoViewHandler, IISeriesEditorConstants, IISeriesEditorConstantsColors, IISeriesEditorParser, ISystemEditorConstants, ISystemTextEditorAdapterContributor, ISystemTextEditorContextContributor, ISystemTextEditorDebugContributor, ISystemTextEditorHelpContributor, ISystemTextEditorParser, ISystemTextEditorSourceViewerConfigurationContributor
Direct Known Subclasses:
ISeriesEditorCLParser, ISeriesEditorDDSParser, ISeriesEditorRPGILEParser, ISeriesEditorRPGOPMParser

public abstract class ISeriesEditorParser
extends LpexCommonParser
implements IISeriesEditorParser, ISystemTextEditorAdapterContributor, ISystemTextEditorContextContributor, ISystemTextEditorDebugContributor, ISystemTextEditorHelpContributor, ISystemTextEditorSourceViewerConfigurationContributor, IISeriesEditorConstantsColors, IISeriesEditorConstants, IISeriesCompileErrorInfoViewHandler


Nested Class Summary
protected  class ISeriesEditorParser.DataLineMarkListener
          Used to handle parsing of deleted compile time data elements
protected  class ISeriesEditorParser.RunnableParseAll
          Inner class to parser all in a different thread
 
Field Summary
protected  ISeriesEditorParserAction _action
           
protected  boolean _bDataElementChanged
           
protected  boolean _bDebugMode
           
protected  boolean _bFromStylePreview
           
protected  boolean _bIgnoreParseExtras
          whether or not the parser extras are being ignored
protected  boolean _bIsPrimaryLpexView
           
protected  boolean _bLocal
           
protected  boolean _bOutlineViewNeedsResetting
           
protected  boolean _bParseAll
           
protected  boolean _bParsing
          Whether or not a parse is taking place
protected  ISeriesCompileEditManager _compileEditManager
           
protected  QSYSErrorMarkerListener _compileErrorMarkerListener
           
protected  String _compileMarkNames
           
protected  int _dataLineMarkID
           
protected  ISeriesEditorParser.DataLineMarkListener _dataLineMarkListener
           
protected  LpexTextEditor _editor
           
protected  PropertyResourceBundle _helpResourceBundle
           
protected  int _iCCSID
           
protected  IFile _iFile
           
protected  ISeriesEditorLabelProvider _labelProvider
           
protected  IQSYSMember _member
           
protected  IMenuManager _menuLanguageHelp
           
protected  IMenuManager _menuSource
           
protected  IContentOutlinePage _outlinePage
           
protected static String _strImagePath
           
protected  String _strLocalFileName
           
protected  String _strSpecialChars
           
protected  LpexView _view
           
static String copyright
           
protected  String 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
 
Fields inherited from interface com.ibm.etools.iseries.edit.IISeriesEditorConstantsColors
COLOR_BLACK_WHITE, COLOR_BLUE_WHITE, COLOR_BRIGHTBLUE_WHITE, COLOR_BRIGHTGREEN_WHITE, COLOR_BRIGHTGREY_WHITE, COLOR_BRIGHTPINK_WHITE, COLOR_BRIGHTRED_WHITE, COLOR_BRIGHTRED_WHITE_SQUIGGLE, COLOR_BROWN_WHITE, COLOR_CYAN_WHITE, COLOR_DARK_BROWN_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.etools.iseries.edit.IISeriesEditorConstants
ACTION_VERIFYPROGRAM_ID, APPLICATION_DIAGRAM, COMPILE_ERROR_MESSAGE_STYLE, FILE_TYPE_CL, FILE_TYPE_DDS, FILE_TYPE_OTHER, FILE_TYPE_RPGILE, FILE_TYPE_RPGOPM, MAX_DS_NESTING, OUTLINE_VIEW, PREF_AUTO_FORMAT, PREF_AUTO_FORMAT_T, PREF_AUTO_UPPER, PREF_AUTO_UPPER_T, PREF_BASE_PREFIX, PREF_BLANK, PREF_BLANK_SUFFIX, PREF_BLANK_T, PREF_COMMAND_POS, PREF_COMMAND_POS_T, PREF_HIGHLIGHT, PREF_HIGHLIGHT_BACKGROUND, PREF_HIGHLIGHT_BACKGROUND_T, PREF_HIGHLIGHT_T, PREF_INDENT, PREF_INDENT_T, PREF_INDENTATION, PREF_INDENTATION_T, PREF_LABEL_ABOVE_CMD, PREF_LABEL_ABOVE_CMD_T, PREF_LABEL_POS, PREF_LABEL_POS_T, PREF_LINE_LENGTH, PREF_LINE_LENGTH_T, PREF_ONE_PARM_PER_LINE, PREF_ONE_PARM_PER_LINE_T, PREF_PARSER_ASSOC, PREF_PARSER_STYLES, PREF_SIGNATURE_T, PREF_SQL_SYNTAX_CHECK, PREF_SQL_SYNTAX_CHECK_T, PREF_SYNTAX_CHECK, PREF_SYNTAX_CHECK_T, PREF_TAB, PREF_TAB_GENERAL, PREF_TAB_GENERAL_T, PREF_TAB_T, PREF_TOOLTIP_SUFFIX, PROGRAM_VERIFICATION
 
Fields inherited from interface com.ibm.etools.systems.editor.ISystemEditorConstants
COMPILE_ERROR_CLASS_NAME, ICON_EDITOR_COMPILE, ICON_EDITOR_COMPILE_D, ICON_EDITOR_COMPILE_D_ID, ICON_EDITOR_COMPILE_D_ROOT, ICON_EDITOR_COMPILE_ID, ICON_EDITOR_COMPILE_ROOT, ICON_EDITOR_NEXT_ERROR, ICON_EDITOR_NEXT_ERROR_D, ICON_EDITOR_NEXT_ERROR_D_ID, ICON_EDITOR_NEXT_ERROR_D_ROOT, ICON_EDITOR_NEXT_ERROR_ID, ICON_EDITOR_NEXT_ERROR_ROOT, ICON_EDITOR_PREVIOUS_ERROR, ICON_EDITOR_PREVIOUS_ERROR_D, ICON_EDITOR_PREVIOUS_ERROR_D_ID, ICON_EDITOR_PREVIOUS_ERROR_D_ROOT, ICON_EDITOR_PREVIOUS_ERROR_ID, ICON_EDITOR_PREVIOUS_ERROR_ROOT, ICON_EXT, ICON_RELATIVE_PATH_DLCL16, ICON_RELATIVE_PATH_ELCL16, ICON_RELATIVE_PATH_FULL, ICON_SUFFIX, PREFIX, SYNTAX_ERROR_CLASS_NAME
 
Constructor Summary
ISeriesEditorParser(LpexView lpexView)
          Constructor
 
Method Summary
 void addCompileError(int iElement, String strError)
          adds specified verify/compile error after the last error for iElement
 void addError(int iElement, String strError, char cMessageStyle)
          adds specified syntax error after the last error for iElement
 void cleanupMenu(ITextEditor editor, IMenuManager menuManager)
          Removes the Source and Compile menu items
 void cleanupPopupMenu(ITextEditor editor, IMenuManager menuManager)
          There are no common popup menu items.
 void cleanupToolBar(ITextEditor editor, IToolBarManager toolBarManager)
          removes the next and previous error toolbar buttons
 void contributeToMenu(ITextEditor editor, IMenuManager menuManager)
          Contributes basic actions to source menu bar Subclasses should override to contribute menu bar items and call super.
 void contributeToToolBar(ITextEditor editor, IToolBarManager toolBarManager)
          Subclasses override to contribute tool bar items.
 void copyCompileErrorInfo(LpexView secondaryView)
          Used to copy the compile message markers from the primary view to the newly opened secondary view.
protected  IContentOutlinePage createOutlineView()
           
protected  void doLpexAction(LpexView view, String action)
           
 void doPromptAction()
          Displays the prompt view as a result of a F4 key press.
 void doRefresh()
          The default implementation does nothing.
 void elementChanged(LpexView lpexView)
          Called for ALL lpex documents, the lpexView is for the current document v6.0.0 - ES - removed highlight line, use LPEX's version instead
 void focusGained(FocusEvent event)
          when focus is gained, refresh any settings which may have been set in the preferences Also check the needs for local file connection prompting v6.0.0 - ES - removed highlight line, use LPEX's version instead Called for ALL lpex documents, the lpexView is for the current document
 void focusLost(FocusEvent event)
          v6.0.0 - ES - removed highlight line, use LPEX's version instead
 Object getAdapter(LpexTextEditor editor, Class classRequired)
          Returns the requested adapter.
 AS400 getAS400()
          Method getAS400.
 boolean getAutoUppercase()
          Tells whether or not the parser should auto-uppercase text.
 LpexTextEditor getEditor()
          The parser returns the editor (if known)
 IQSYSFile getFieldFile()
          Method getFieldFile Always returns null.
 LpexFieldsProvider getFieldsProvider()
          Retrieves the fields provider for the parser.
 IISeriesEditorFormatLine getFormatLine()
          Returns the format line ruler.
 IFile getIFile()
          gets the IFile for the source in the editor
 Image getImage(String strImageName)
          Subclasses may override to provide images for the given image name.
 IQSYSMember getIncludeMember()
          Subclasses should override if implementing the action ActionOpenInclude
 IBMiConnection getISeriesConnection(boolean bPromptAllowed)
          This method returns an ISeries connection object.
 IQSYSMember getISeriesMember()
          Method getISeriesMember.
abstract  String getLanguage()
          Return the parser's language.
 String getLocalFileName()
          Get the local file name.
 LpexLanguageHelp getLpexLanguageHelpHandler()
          Declared in ISystemTextEditorHelpContributor
 LpexView getLpexView()
          Get the lpexView associated with the parser
 String getLshToken()
          Declared in LpexLanguageHelp.
 LanguageModel getModel(boolean bUpdate)
          Subclasses to return a model if it exists.
protected  String getPopupItems(int popupLocation)
          56708 Returns the items to show in the popup menu All parsers can filter by Date.
 IISeriesEditorProgramVerifier getProgramVerifier()
          Returns the program verifier.
abstract  IISeriesEditorPromptAdapter getPromptAdapter()
          Subclasses need to implement this method to return an adapter used to communicate between the editor and a prompt view.
 String getProperty(String key)
           
 IPropertySheetPage getPropertySheet()
          Get property sheet
 LpexSourceViewerConfiguration getSourceViewerConfiguration()
          Returns the source viewer configuration.
 String getSpecialChars()
          Method getSpecialChars.
 IISeriesEditorSyntaxChecker getSyntaxChecker()
          Returns the syntax checker.
 int getTextLimit()
          Returns the save text limit set by the editor into the LpexView, or -1
 boolean hasSequenceNumbers()
          Returns true if the file has sequence numbers
 void initializeLpexView(LpexView lpexView)
          Does base initialization for the parsers.
protected  void initParser()
          initialize parser
 boolean isDebugMode()
          Returns whether the state is in debug mode.
 boolean isElementAboveDataRegion(int iElement)
          Returns whether the given element number is above an existing data region.
protected  boolean isLineAboveDataRegion(int iLine)
          Deprecated.  
 boolean isLocal()
          Returns whether the input resource is local.
 boolean isReadOnly()
          Returns whether the editor is in read only mode.
 boolean isValidFieldAction()
          Method isValidFieldAction.
 boolean isValidIncludeAction()
          Method isValidIncludeAction.
 LpexDocumentLocation match(LpexDocumentLocation loc)
           
 boolean modelBuiltAsynchronous()
          Whether or not the parser supports building of the model asynchronously.
 void parseAll()
          Parse the entire document using a progress monitor.
 void parseElement(int iElement)
          Declared in LpexCommonParser.
 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.
abstract  void parseLine(int iLine)
          Subclasses must subclass.
protected abstract  void parseRegion(int iLineFirst, int iLineLast, IProgressMonitor progressMonitor)
          Subclasses must subclass.
 void prompt()
          Called by the editor whenever F4 is pressed.
abstract  void promptRequest()
          Called by the editor whenever F4 is pressed.
 int queryDataLine()
          Returns the element number of the compile time data
 void removeErrors(int iElement)
          Removes all the error messages from the specifed line number.
 void removeErrors(int iStartElement, int iEndElement)
          Removes the errors from the specified range of elements
protected  void resetOutlineView()
          Resets the outline view
 void saving(ITextEditor editor)
          Method saving.
 void selectionLinesChanged(int iLineOrigin, int iLineExtent)
          Called when the selection has changed in the content outline view.
 void selectionLinesChanged(int iLineOrigin, int iLineExtent, int startPosition, int selectedLength)
          Called when the selection has changed in the content outline view.
 void selectionLinesChanged(int iLineOrigin, int iLineExtent, int iLineCursor, int startPosition, int selectedLength)
          Called when the selection has changed in the content outline view.
 void setAS400(AS400 as400)
          Called by the editor to set the AS400 object.
 void setCompileErrorInfo(ISeriesCompileEditManager compileEditManager, String markNames, QSYSErrorMarkerListener errorMarkerListener)
          Used to set the compile information to be used when splitting a view so that errors appear in the splits.
 void setDebugMode(boolean bDebugMode)
          Sets the debug state.
 void setEditor(LpexTextEditor editor)
          Method setEditor.
 void setEnableParseExtras(boolean bEnable)
          Method setEnableParseExtras.
 void setLocal(boolean bLocal)
          Sets whether the input resource is local.
protected  boolean supportsOutlineView()
          Returns false by default.
 void terminateParser()
          When parsing is disabled, turn off cursor and focus listeners
protected  void updateProfileForActions(LpexView lpexView)
          Updates the Lpex profile for F4 Prompt.
protected  void updateProfileForTabbing(LpexView lpexView)
          Overrides for the commands 'insertToTab' and 'prevTabStop'.
 String upperCase(String line)
          returns the upper cased version of the line passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.iseries.parsers.IISeriesEditorParser
getHelpHandler
 
Methods inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorContextContributor
contributeToPopupMenu, finishedSaving
 
Methods inherited from interface com.ibm.etools.systems.editor.ISystemTextEditorDebugContributor
isLineDebuggable
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_strImagePath

protected static final String _strImagePath
See Also:
Constant Field Values

_bDataElementChanged

protected boolean _bDataElementChanged

_bDebugMode

protected boolean _bDebugMode

_bLocal

protected boolean _bLocal

_bParseAll

protected boolean _bParseAll

_iCCSID

protected int _iCCSID

_menuSource

protected IMenuManager _menuSource

_menuLanguageHelp

protected IMenuManager _menuLanguageHelp

_outlinePage

protected IContentOutlinePage _outlinePage

_labelProvider

protected ISeriesEditorLabelProvider _labelProvider

_action

protected ISeriesEditorParserAction _action

_member

protected IQSYSMember _member

_editor

protected LpexTextEditor _editor

_view

protected LpexView _view

_helpResourceBundle

protected PropertyResourceBundle _helpResourceBundle

_strLocalFileName

protected String _strLocalFileName

_strSpecialChars

protected String _strSpecialChars

_iFile

protected IFile _iFile

_bIsPrimaryLpexView

protected boolean _bIsPrimaryLpexView

_bOutlineViewNeedsResetting

protected boolean _bOutlineViewNeedsResetting

_bFromStylePreview

protected boolean _bFromStylePreview

_dataLineMarkListener

protected ISeriesEditorParser.DataLineMarkListener _dataLineMarkListener

_dataLineMarkID

protected int _dataLineMarkID

_bIgnoreParseExtras

protected boolean _bIgnoreParseExtras
whether or not the parser extras are being ignored


_bParsing

protected boolean _bParsing
Whether or not a parse is taking place


_compileMarkNames

protected String _compileMarkNames

_compileErrorMarkerListener

protected QSYSErrorMarkerListener _compileErrorMarkerListener

_compileEditManager

protected ISeriesCompileEditManager _compileEditManager

DATA_LINE

protected final String DATA_LINE
See Also:
Constant Field Values
Constructor Detail

ISeriesEditorParser

public ISeriesEditorParser(LpexView lpexView)
Constructor

Method Detail

initParser

protected void initParser()
initialize parser


getEditor

public LpexTextEditor getEditor()
Description copied from interface: IISeriesEditorParser
The parser returns the editor (if known)

Specified by:
getEditor in interface IISeriesEditorParser

addError

public void addError(int iElement,
                     String strError,
                     char cMessageStyle)
adds specified syntax error after the last error for iElement

Specified by:
addError in interface IISeriesEditorParser
Parameters:
iElement - the element number where the error is to be inserted
error - the error text
the - character which represents the message style *** NOTE if you modify this method, you should also modify the COBOL parsers!

addCompileError

public void addCompileError(int iElement,
                            String strError)
adds specified verify/compile error after the last error for iElement

Specified by:
addCompileError in interface IISeriesEditorParser
Parameters:
iElement - the element number where the error is to be inserted
strError - the error text *** NOTE if you modify this method, you should also modify the COBOL parsers!

cleanupMenu

public void cleanupMenu(ITextEditor editor,
                        IMenuManager menuManager)
Removes the Source and Compile menu items

subclasses which add other menus should subclass and call super

Specified by:
cleanupMenu in interface ISystemTextEditorContextContributor
See Also:
ISystemTextEditorContextContributor.cleanupMenu(ITextEditor, IMenuManager)

cleanupPopupMenu

public void cleanupPopupMenu(ITextEditor editor,
                             IMenuManager menuManager)
There are no common popup menu items.

subclasses which add other popup menu items should subclass and call super

Specified by:
cleanupPopupMenu in interface ISystemTextEditorContextContributor
See Also:
ISystemTextEditorContextContributor.cleanupPopupMenu(ITextEditor, IMenuManager)

cleanupToolBar

public void cleanupToolBar(ITextEditor editor,
                           IToolBarManager toolBarManager)
removes the next and previous error toolbar buttons

subclasses which add other toolbar buttons should subclass and call super

Specified by:
cleanupToolBar in interface ISystemTextEditorContextContributor
See Also:
ISystemTextEditorContextContributor.cleanupToolBar(ITextEditor, IToolBarManager)

contributeToMenu

public void contributeToMenu(ITextEditor editor,
                             IMenuManager menuManager)
Contributes basic actions to source menu bar Subclasses should override to contribute menu bar items and call super.

Specified by:
contributeToMenu in interface ISystemTextEditorContextContributor

contributeToToolBar

public void contributeToToolBar(ITextEditor editor,
                                IToolBarManager toolBarManager)
Subclasses override to contribute tool bar items.

Specified by:
contributeToToolBar in interface ISystemTextEditorContextContributor

doLpexAction

protected void doLpexAction(LpexView view,
                            String action)

doPromptAction

public void doPromptAction()
Displays the prompt view as a result of a F4 key press.

Specified by:
doPromptAction in interface IISeriesEditorParser

elementChanged

public void elementChanged(LpexView lpexView)
Called for ALL lpex documents, the lpexView is for the current document v6.0.0 - ES - removed highlight line, use LPEX's version instead

See Also:
com.ibm.lpex.core.LpexCursorListener#elementChanged(LpexView)

focusGained

public void focusGained(FocusEvent event)
when focus is gained, refresh any settings which may have been set in the preferences Also check the needs for local file connection prompting v6.0.0 - ES - removed highlight line, use LPEX's version instead Called for ALL lpex documents, the lpexView is for the current document

See Also:
FocusListener

focusLost

public void focusLost(FocusEvent event)
v6.0.0 - ES - removed highlight line, use LPEX's version instead

See Also:
FocusListener

getAdapter

public Object getAdapter(LpexTextEditor editor,
                         Class classRequired)
Returns the requested adapter.

Specified by:
getAdapter in interface ISystemTextEditorAdapterContributor

createOutlineView

protected IContentOutlinePage createOutlineView()
Returns:

supportsOutlineView

protected boolean supportsOutlineView()
Returns false by default. Subclass that do support an outline view should override to return true


getAS400

public AS400 getAS400()
Method getAS400. returns the AS400 toolbox object for the connection associated with the connection for this source Used for CL prompting, help & syntax Checking

Returns:
AS400 the iSeries object

getAutoUppercase

public boolean getAutoUppercase()
Tells whether or not the parser should auto-uppercase text. The default is to not uppercase text. Subclasses may override.

Returns:
true if the parser should uppercase, false otherwise

getFieldFile

public IQSYSFile getFieldFile()
Method getFieldFile Always returns null. Subclasses should override if they enable the ISeriesEditorFieldAction

Specified by:
getFieldFile in interface IISeriesEditorParser
Returns:
an object that the action can run against
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#getFieldFile()

getFormatLine

public IISeriesEditorFormatLine getFormatLine()
Returns the format line ruler. Default implementation returns null. Subclasses to return a format line only if supported.

Specified by:
getFormatLine in interface IISeriesEditorParser

getImage

public Image getImage(String strImageName)
Subclasses may override to provide images for the given image name. This is used in the outline view.

Specified by:
getImage in interface IISeriesEditorParser

getIncludeMember

public IQSYSMember getIncludeMember()
Subclasses should override if implementing the action ActionOpenInclude

Specified by:
getIncludeMember in interface IISeriesEditorParser
Returns:
the ISeriesMember to edit/browse
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#getIncludeMember()

getISeriesMember

public IQSYSMember getISeriesMember()
Description copied from interface: IISeriesEditorParser
Method getISeriesMember. returns the iSeries member associated with the parser

Specified by:
getISeriesMember in interface IISeriesEditorParser
Returns:
ISeriesMember the member that this parser is parsing
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#getISeriesMember()

getIFile

public IFile getIFile()
Description copied from interface: IISeriesEditorParser
gets the IFile for the source in the editor

Specified by:
getIFile in interface IISeriesEditorParser
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#getIFile()

getISeriesConnection

public IBMiConnection getISeriesConnection(boolean bPromptAllowed)
This method returns an ISeries connection object. It first looks at the IFile for a connection. If there isn't one, then the file is probably a local file. The connection is then obtained from the user preferences. If a default connection has been specified, then it is used. If the user has asked to prompt for a connection, a prompt dialog is displayed that allows the user to select a connection.

Specified by:
getISeriesConnection in interface IISeriesEditorParser
Parameters:
bPromptAllowed - true if the user is allowed to be prompted, false otherwise
Returns:
ISeriesConnection the connection
See Also:
NOTE: If you change this method, you need to propagate the changes to all 4 COBOL parsers.

getLanguage

public abstract String getLanguage()
Return the parser's language.

Specified by:
getLanguage in interface ISystemTextEditorParser

getLocalFileName

public String getLocalFileName()
Description copied from interface: ISystemTextEditorParser
Get the local file name.

Specified by:
getLocalFileName in interface ISystemTextEditorParser
Returns:
the local file name
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#getFileName()

getLpexLanguageHelpHandler

public LpexLanguageHelp getLpexLanguageHelpHandler()
Declared in ISystemTextEditorHelpContributor

Specified by:
getLpexLanguageHelpHandler in interface ISystemTextEditorHelpContributor

getLshToken

public String getLshToken()
Declared in LpexLanguageHelp. Return the token (in this case the Help resource ID) for Language Sensitive Help. This implementation is valid for column based languages. Non-column based languages need to override this member function.


getModel

public LanguageModel getModel(boolean bUpdate)
Subclasses to return a model if it exists. The model is used to populate the outline view. This version returns null.

Specified by:
getModel in interface IISeriesEditorParser

modelBuiltAsynchronous

public boolean modelBuiltAsynchronous()
Whether or not the parser supports building of the model asynchronously.


getPopupItems

protected String getPopupItems(int popupLocation)
56708 Returns the items to show in the popup menu All parsers can filter by Date.

See Also:
com.ibm.lpex.core.LpexCommonParser#getPopupItems(int)

getProgramVerifier

public IISeriesEditorProgramVerifier getProgramVerifier()
Returns the program verifier. Default implementation returns null. Subclasses to return a program verifier only if supported.

Specified by:
getProgramVerifier in interface IISeriesEditorParser

getPromptAdapter

public abstract IISeriesEditorPromptAdapter getPromptAdapter()
Subclasses need to implement this method to return an adapter used to communicate between the editor and a prompt view.

Specified by:
getPromptAdapter in interface IISeriesEditorParser

getPropertySheet

public IPropertySheetPage getPropertySheet()
Get property sheet

Specified by:
getPropertySheet in interface IISeriesEditorParser

getSourceViewerConfiguration

public LpexSourceViewerConfiguration getSourceViewerConfiguration()
Returns the source viewer configuration. Default implementation returns null.

Specified by:
getSourceViewerConfiguration in interface ISystemTextEditorSourceViewerConfigurationContributor

getSpecialChars

public String getSpecialChars()
Method getSpecialChars. returns the special chars according to the CCSID set

Returns:
String the special chars

getSyntaxChecker

public IISeriesEditorSyntaxChecker getSyntaxChecker()
Returns the syntax checker. Default implementation returns null. Subclasses to return a syntax checker only if supported.

Specified by:
getSyntaxChecker in interface IISeriesEditorParser

getTextLimit

public int getTextLimit()
Returns the save text limit set by the editor into the LpexView, or -1


hasSequenceNumbers

public boolean hasSequenceNumbers()
Returns true if the file has sequence numbers


initializeLpexView

public void initializeLpexView(LpexView lpexView)
Does base initialization for the parsers.

Specified by:
initializeLpexView in interface IISeriesEditorParser

isDebugMode

public boolean isDebugMode()
Returns whether the state is in debug mode.


isReadOnly

public boolean isReadOnly()
Returns whether the editor is in read only mode.

Specified by:
isReadOnly in interface IISeriesEditorParser

isValidFieldAction

public boolean isValidFieldAction()
Method isValidFieldAction. always returns false. Subclasses should override if they are providing the Show Fields action

Specified by:
isValidFieldAction in interface IISeriesEditorParser
Returns:
boolean true if the current line has a file name for show field action, false otherwise.
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#isValidFieldAction()

isValidIncludeAction

public boolean isValidIncludeAction()
Method isValidIncludeAction. always returns false. Subclasses should override if they are providing the action ActionOpenInclude

Specified by:
isValidIncludeAction in interface IISeriesEditorParser
Returns:
boolean true id the current line has a valid member for the include action, false otherwise
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#isValidFieldAction()

isLineAboveDataRegion

protected boolean isLineAboveDataRegion(int iLine)
Deprecated. 

Returns whether the given line number is above an existing data region. Port of evfritok.c, LineAboveData


isElementAboveDataRegion

public boolean isElementAboveDataRegion(int iElement)
Returns whether the given element number is above an existing data region. Port of evfritok.c, LineAboveData


isLocal

public boolean isLocal()
Description copied from interface: ISystemTextEditorParser
Returns whether the input resource is local.

Specified by:
isLocal in interface ISystemTextEditorParser
Returns:
true if the input resource is local, or false if input resource is of remote origin.
See Also:
ISystemTextEditorParser.isLocal()

parseAll

public void parseAll()
Parse the entire document using a progress monitor.


parseElement

public void parseElement(int iElement)
Declared in LpexCommonParser. Parses an element if it is not a show element.


parseElements

public 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. only calling a syntax checker once for the whole range of lines instead of once per line).


parseLine

public abstract void parseLine(int iLine)
Subclasses must subclass.


parseRegion

protected abstract void parseRegion(int iLineFirst,
                                    int iLineLast,
                                    IProgressMonitor progressMonitor)
Subclasses must subclass.


prompt

public void prompt()
Called by the editor whenever F4 is pressed. promptRequest is called first. Default implementation gives focus to the source prompt view. CL parser asks the AS400 to display a prompt dialog.


promptRequest

public abstract void promptRequest()
Called by the editor whenever F4 is pressed. This notifies the parser before the focus is moved to the Source Prompter view.


removeErrors

public void removeErrors(int iElement)
Removes all the error messages from the specifed line number.

Specified by:
removeErrors in interface ISystemTextEditorParser
Parameters:
iLineNum - the line number where you want to remove all the messages
See Also:
*** NOTE if you modify this method, you should also modify the COBOL parsers!

removeErrors

public void removeErrors(int iStartElement,
                         int iEndElement)
Removes the errors from the specified range of elements

Specified by:
removeErrors in interface ISystemTextEditorParser
See Also:
*** NOTE if you modify this method, you should also modify the COBOL parsers!

saving

public void saving(ITextEditor editor)
Method saving. Called before saving. Does the resequence on save

Specified by:
saving in interface ISystemTextEditorContextContributor

selectionLinesChanged

public void selectionLinesChanged(int iLineOrigin,
                                  int iLineExtent)
Called when the selection has changed in the content outline view. The line numbers are used to highlight the editor's vertical ruler.

Specified by:
selectionLinesChanged in interface IISeriesEditorParser

selectionLinesChanged

public void selectionLinesChanged(int iLineOrigin,
                                  int iLineExtent,
                                  int iLineCursor,
                                  int startPosition,
                                  int selectedLength)
Called when the selection has changed in the content outline view. The line numbers are used to highlight the editor's vertical ruler.

Parameters:
iLineOrigin - - begin of higlighted range
iLineExtent - - number of lines in highlighted range
iLineCursor - - cursored line
startPosition - - column of begin of selection

selectionLinesChanged

public void selectionLinesChanged(int iLineOrigin,
                                  int iLineExtent,
                                  int startPosition,
                                  int selectedLength)
Called when the selection has changed in the content outline view. The line numbers are used to highlight the editor's vertical ruler.


setAS400

public void setAS400(AS400 as400)
Called by the editor to set the AS400 object. The iSeries CCSID is converted to a code page and the code page is regisitered with the editor so that the editor can process DBCS correctly.


setDebugMode

public void setDebugMode(boolean bDebugMode)
Sets the debug state.

Specified by:
setDebugMode in interface ISystemTextEditorDebugContributor

setLocal

public void setLocal(boolean bLocal)
Description copied from interface: ISystemTextEditorParser
Sets whether the input resource is local.

Specified by:
setLocal in interface ISystemTextEditorParser
See Also:
ISystemTextEditorParser.setLocal(boolean)

setEditor

public void setEditor(LpexTextEditor editor)
Description copied from interface: IISeriesEditorParser
Method setEditor. Sets up the editor and related info for the parser

Specified by:
setEditor in interface IISeriesEditorParser
Parameters:
editor - the editor for this parser
See Also:
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


setEnableParseExtras

public void setEnableParseExtras(boolean bEnable)
Description copied from interface: IISeriesEditorParser
Method setEnableParseExtras. disables/enables the parser from doing extra things like uppercasing and formatting

Specified by:
setEnableParseExtras in interface IISeriesEditorParser
Parameters:
bEnable - whether or not the parsers should ignore the extra features they may have
See Also:
com.ibm.etools.iseries.editor.IISeriesEditorParser#setEnableParseExtras(boolean)

updateProfileForActions

protected void updateProfileForActions(LpexView lpexView)
Updates the Lpex profile for F4 Prompt. There may not always be an Lpex text window, such as during a compare function.


updateProfileForTabbing

protected void updateProfileForTabbing(LpexView lpexView)
Overrides for the commands 'insertToTab' and 'prevTabStop'.


upperCase

public String upperCase(String line)
returns the upper cased version of the line passed in. Subclasses may override.

Parameters:
line - the line to uppercase
Returns:
the uppercased line or null if an error occured

getProperty

public String getProperty(String key)

terminateParser

public void terminateParser()
When parsing is disabled, turn off cursor and focus listeners

See Also:
com.ibm.lpex.core.LpexCommonParser#terminateParser()

setCompileErrorInfo

public void setCompileErrorInfo(ISeriesCompileEditManager compileEditManager,
                                String markNames,
                                QSYSErrorMarkerListener errorMarkerListener)
Description copied from interface: IISeriesCompileErrorInfoViewHandler
Used to set the compile information to be used when splitting a view so that errors appear in the splits.

Specified by:
setCompileErrorInfo in interface IISeriesCompileErrorInfoViewHandler
markNames - the list of names of marks in the primary view

copyCompileErrorInfo

public void copyCompileErrorInfo(LpexView secondaryView)
Description copied from interface: IISeriesCompileErrorInfoViewHandler
Used to copy the compile message markers from the primary view to the newly opened secondary view.

Specified by:
copyCompileErrorInfo in interface IISeriesCompileErrorInfoViewHandler

getLpexView

public LpexView getLpexView()
Get the lpexView associated with the parser

Specified by:
getLpexView in interface IISeriesEditorParser

queryDataLine

public int queryDataLine()
Returns the element number of the compile time data

Returns:
the element number of the compile time data, if no compile time data exists then the number of elements+1 in the view is returned.
Since:
6.0.0.3

getFieldsProvider

public LpexFieldsProvider getFieldsProvider()
Retrieves the fields provider for the parser. Returns null if there is no fields provider

Specified by:
getFieldsProvider in interface IISeriesEditorParser
Since:
6.0.1 //SE23218

resetOutlineView

protected void resetOutlineView()
Resets the outline view

Since:
6.0.1.1

match

public LpexDocumentLocation match(LpexDocumentLocation loc)

doRefresh

public void doRefresh()
The default implementation does nothing. Subclasses can override as necessary.

Specified by:
doRefresh in interface ISystemTextEditorParser
See Also:
ISystemTextEditorParser.doRefresh()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.