Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.parsers
Class ISeriesEditorDDSSyntaxChecker

java.lang.Object
  extended by com.ibm.etools.iseries.parsers.ISeriesEditorSyntaxChecker
      extended by com.ibm.etools.iseries.parsers.ISeriesEditorDDSSyntaxChecker
All Implemented Interfaces:
IISeriesEditorConstants, IISeriesEditorConstantsColors, IISeriesEditorConstantsDDS, IISeriesEditorSyntaxChecker, ISystemEditorConstants

public class ISeriesEditorDDSSyntaxChecker
extends ISeriesEditorSyntaxChecker
implements IISeriesEditorSyntaxChecker, IISeriesEditorConstantsDDS, IISeriesEditorConstants

DDS Syntax checker.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorSyntaxChecker
ISeriesEditorSyntaxChecker.RunnableSyntaxChecker
 
Field Summary
protected  ISeriesEditorDDSParser _parser
           
static String copyright
           
 
Fields inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorSyntaxChecker
_aEmpty, _bIsPrimaryLpexView, _disableSyntaxCheckAuto, _invokedAuto, _progressMonitor, _ptRange, _strAutoPreferenceName, _strEmpty, _vectorSyntaxErrors, _view
 
Fields inherited from interface com.ibm.etools.iseries.parsers.IISeriesEditorSyntaxChecker
Copyright
 
Fields inherited from interface com.ibm.etools.iseries.editor.IISeriesEditorConstantsDDS
AS400_DISPLAY_FILE, AS400_ICOMM_FILE, AS400_LOGICAL_FILE, AS400_PHYSICAL_FILE, AS400_PRINTER_FILE, AS400_UNKNOWN_FILE, COLUMN_AND_OR_COMMENT, COLUMN_COMMENT, COLUMN_COND_IND_1, COLUMN_COND_IND_2, COLUMN_COND_IND_3, COLUMN_COND_IND_DSP, COLUMN_CONSTBLNK, COLUMN_DATA_TYPE, COLUMN_DDS_EXTRA, COLUMN_DEC, COLUMN_KEY_ENTRY, COLUMN_LAST, COLUMN_LENGTH, COLUMN_LOCATION_LINE, COLUMN_LOCATION_POS, COLUMN_NAME, COLUMN_NOT_COND_IND_1, COLUMN_NOT_COND_IND_2, COLUMN_NOT_COND_IND_3, COLUMN_REFERENCE, COLUMN_RESERVED, COLUMN_SPEC, COLUMN_USAGE, LENGTH_COND_IND_1, LENGTH_COND_IND_2, LENGTH_COND_IND_3, LENGTH_COND_IND_DSP, LENGTH_CONSTBLNK, LENGTH_DATA_TYPE, LENGTH_KEY_ENTRY, LENGTH_LENGTH, LENGTH_LOCATION_LINE, LENGTH_LOCATION_POS, LENGTH_NAME, LENGTH_NOT_COND_IND, LENGTH_NOT_COND_IND_1, LENGTH_NOT_COND_IND_2, LENGTH_NOT_COND_IND_3, LENGTH_POS17TO44, LENGTH_POS17TO80, LENGTH_POS7TO44, LENGTH_REFERENCE, LENGTH_RESERVED, LENGTH_RESPONSE_INDICATOR, PREF_DDS_PREFIX, PROMPT_ALL, PROMPT_COMMENT, PROMPT_FIELD_HEADING, PROMPT_FIELD_KEYWORD, PROMPT_FILE_KEYWORD, PROMPT_HELP_HEADING, PROMPT_HELP_KEYWORD, PROMPT_JOIN_HEADING, PROMPT_JOIN_KEYWORD, PROMPT_KEY_HEADING, PROMPT_KEY_KEYWORD, PROMPT_LAST, PROMPT_NONE, PROMPT_RECORD_HEADING, PROMPT_RECORD_KEYWORD, PROMPT_SELECT_OMIT_HEADING, PROMPT_SPECIAL, PROMPT_UNDEFINED, SPEC_FIELD, SPEC_HELP, SPEC_JOIN, SPEC_KEYFIELD, SPEC_OMIT, SPEC_RECORD, SPEC_SELECT, STRING_DDS_SPECIAL_COMMENT, STRING_DDS_SPECIAL_FA, STRING_FONT_COMMENT, STRING_FONT_FIELD_HEADING_DT, STRING_FONT_FIELD_HEADING_I, STRING_FONT_FIELD_HEADING_L, STRING_FONT_FIELD_HEADING_P, STRING_FONT_FIELD_KEYWORD_DTI, STRING_FONT_FIELD_KEYWORD_PL, STRING_FONT_FILE_KEYWORD_DTI, STRING_FONT_FILE_KEYWORD_PL, STRING_FONT_HELP_HEADING_D, STRING_FONT_HELP_KEYWORD_D, STRING_FONT_JOIN_HEADING_L, STRING_FONT_JOIN_KEYWORD_L, STRING_FONT_KEY_HEADING_PL, STRING_FONT_KEY_KEYWORD_PL, STRING_FONT_NONE, STRING_FONT_RECORD_HEADING_DTI, STRING_FONT_RECORD_HEADING_PL, STRING_FONT_RECORD_KEYWORD_DTI, STRING_FONT_RECORD_KEYWORD_PL, STRING_FONT_SELECT_OMIT_HEADING_L, STRING_FONT_SPECIAL, STRING_FONT_UNDEFINED, STRING_HELP_DOC_PLUGIN_ID, STRING_HELP_TABLE_FILENAME, STRING_HELP_TABLE_PLUGIN_ID, STRING_MESSAGE_HELP_DOC_PLUGIN_ID, STRING_MESSAGE_HELP_TABLE_FILENAME, STRING_MESSAGE_HELP_TABLE_PLUGIN_ID, STRING_NOT_COND_IND
 
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
ISeriesEditorDDSSyntaxChecker(LpexView lpexView, ISeriesEditorDDSParser parser)
          Constructor.
 
Method Summary
protected  void addSyntaxMessage(int iElement, String strMessageId, int iPosition, int iLength)
          Adds syntax checker messages to the list.
protected  String checkAndOrCommentFlag(String strToken, int iDDSType)
          Port of evfslxck.c checkAndOrCommentFlag, getValidCharsAOC.
protected  String checkDataType(char cDataType, int iDDSType)
          Port of evfslxck.c checkDataType.
protected  String checkDecimalPosition(String strNumber, int iDDSType, char cReference)
          Port of evfslxck.c checkDecimalPos.
protected  int checkElementDspf(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementDspf.
protected  int checkElementGeneric(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementGeneric.
protected  int checkElementIcff(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementIcff.
protected  int checkElementLf(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementLf.
protected  int checkElementPf(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementPf.
protected  int checkElementPrtf(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkElementPrtf.
protected  String checkFieldLength(String strFieldLength, int iDDSType, char cFieldType, char cReference, boolean hasLocation)
          Port of evfslxck.c checkFieldLength.
protected  String checkFunctions(String strElement, int iDDSType)
          Port of evfslxck.c checkFunctions.
protected  String checkIndicator(String strIndicator)
          Port of evfslxck.c, checkIndicator.
protected  String checkIndicatorDspf(int iElement, String strIndicator, int iDDSType)
          Port of evfslxck.c, checkDspfIndicator, checkDspInd.
protected  String checkIndicators(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, checkIndicators.
protected  String checkIndicators3(int iElement, String strElement, int iDDSType)
          Port of evfslxck.c, check3Indicators.
protected  String checkLocationElement(String strLocation, int iDDSType, String strPositions)
          Check the line number for validity
protected  String checkLocationPosition(String strPosition, int iDDSType)
          Port of evfslxck.c checkLocPos.
protected  String checkLocationPositionDspf(int iPosition)
          Port of evfslxck.c checkLocPosDspf.
protected  String checkLocationPositionPrtf(int iPosition)
          Port of evfslxck.c checkLocPosPrtf.
protected  String checkName(String strName, int iDDSType)
          Port of evfslxck.c checkName
protected  String checkNameAny(String strName)
          Port of evfslxck.c checkNameAny
protected  String checkNameIcff(String strName)
          Port of evfslxck.c checkNameIcff
protected  String checkNameType(char cNameType, int iDDSType)
          Port of evfslxck.c checkNameType, getValidCharsNameType.
protected  String checkReferenceField(String strField)
          Port of evfslxck.c, checkRef.
 ISeriesEditorSyntaxError[] checkSyntax(int iElementStart, int iElementEnd)
          Invokes the syntax checker proxy if available.
 void checkSyntaxOfRange(int iElementStart, int iElementEnd)
          Syntax checks the specified range of Elements.
protected  String checkUsage(char cUsage, int iDDSType)
          Port of evfslxck.c checkUse, getValidCharsUse.
 boolean isAvailable()
          Returns whether syntax checking is available.
 boolean isCancelable()
          Returns whether the syntax checker is cancelable before the operation is complete.
protected  char mapShiftToDataType(char shift, boolean isDecimalPositionSpecified, int iDDSType)
          Return the datatype given the shift, and whether the decimal position is specified
 
Methods inherited from class com.ibm.etools.iseries.parsers.ISeriesEditorSyntaxChecker
callbackAddSyntaxError, callbackGetLineText, callbackGetNextLine, callbackGetPreviousLine, callbackIsCanceled, callbackIsShowLine, checkSyntaxAuto, checkSyntaxAuto, checkSyntaxOfCurrentLine, checkSyntaxOfDocument, checkSyntaxOfRangeWithProgress, checkSyntaxOfSelection, displaySyntaxErrors, getHostCommunicationsPort
 
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.IISeriesEditorSyntaxChecker
checkSyntaxOfCurrentLine, checkSyntaxOfDocument, checkSyntaxOfSelection
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_parser

protected ISeriesEditorDDSParser _parser
Constructor Detail

ISeriesEditorDDSSyntaxChecker

public ISeriesEditorDDSSyntaxChecker(LpexView lpexView,
                                     ISeriesEditorDDSParser parser)
Constructor.

Method Detail

addSyntaxMessage

protected void addSyntaxMessage(int iElement,
                                String strMessageId,
                                int iPosition,
                                int iLength)
Adds syntax checker messages to the list. The message is obtained from the message file, iseriesmessages.xml by its subcomponent prefix 'EVFD' prepended to its number. The message ID displayed has prefix 'DDS' rather than 'EVFD'.


checkAndOrCommentFlag

protected String checkAndOrCommentFlag(String strToken,
                                       int iDDSType)
Port of evfslxck.c checkAndOrCommentFlag, getValidCharsAOC.


checkDataType

protected String checkDataType(char cDataType,
                               int iDDSType)
Port of evfslxck.c checkDataType. getValidCharsDataType.


checkDecimalPosition

protected String checkDecimalPosition(String strNumber,
                                      int iDDSType,
                                      char cReference)
Port of evfslxck.c checkDecimalPos.


checkFieldLength

protected String checkFieldLength(String strFieldLength,
                                  int iDDSType,
                                  char cFieldType,
                                  char cReference,
                                  boolean hasLocation)
Port of evfslxck.c checkFieldLength.


checkFunctions

protected String checkFunctions(String strElement,
                                int iDDSType)
Port of evfslxck.c checkFunctions. Does nothing.


checkIndicator

protected String checkIndicator(String strIndicator)
Port of evfslxck.c, checkIndicator. This method is called only by checkIndicators3.


checkIndicatorDspf

protected String checkIndicatorDspf(int iElement,
                                    String strIndicator,
                                    int iDDSType)
Port of evfslxck.c, checkDspfIndicator, checkDspInd. Messages are added.


checkIndicators

protected String checkIndicators(int iElement,
                                 String strElement,
                                 int iDDSType)
Port of evfslxck.c, checkIndicators. Original code always returns 0.


checkIndicators3

protected String checkIndicators3(int iElement,
                                  String strElement,
                                  int iDDSType)
Port of evfslxck.c, check3Indicators. Original code always returns 0.


checkElementDspf

protected int checkElementDspf(int iElement,
                               String strElement,
                               int iDDSType)
Port of evfslxck.c, checkElementDspf.


checkElementGeneric

protected int checkElementGeneric(int iElement,
                                  String strElement,
                                  int iDDSType)
Port of evfslxck.c, checkElementGeneric.


mapShiftToDataType

protected char mapShiftToDataType(char shift,
                                  boolean isDecimalPositionSpecified,
                                  int iDDSType)
Return the datatype given the shift, and whether the decimal position is specified

Parameters:
shift -
isDecimalPositionSpecified -
iDDSType - - the mapping only needs to be done if DSPF
Returns:

checkElementIcff

protected int checkElementIcff(int iElement,
                               String strElement,
                               int iDDSType)
Port of evfslxck.c, checkElementIcff.


checkElementLf

protected int checkElementLf(int iElement,
                             String strElement,
                             int iDDSType)
Port of evfslxck.c, checkElementLf.


checkElementPf

protected int checkElementPf(int iElement,
                             String strElement,
                             int iDDSType)
Port of evfslxck.c, checkElementPf.


checkElementPrtf

protected int checkElementPrtf(int iElement,
                               String strElement,
                               int iDDSType)
Port of evfslxck.c, checkElementPrtf.


checkLocationElement

protected String checkLocationElement(String strLocation,
                                      int iDDSType,
                                      String strPositions)
Check the line number for validity

Parameters:
strLocation - - line number from [40-42]
iDDSType -
strPositions - - column number from [42-44]
Returns:
message id or null if nothing wrong

checkLocationPosition

protected String checkLocationPosition(String strPosition,
                                       int iDDSType)
Port of evfslxck.c checkLocPos.

Parameters:
position - [40-43]
DDS - type

checkLocationPositionDspf

protected String checkLocationPositionDspf(int iPosition)
Port of evfslxck.c checkLocPosDspf.


checkLocationPositionPrtf

protected String checkLocationPositionPrtf(int iPosition)
Port of evfslxck.c checkLocPosPrtf.


checkName

protected String checkName(String strName,
                           int iDDSType)
Port of evfslxck.c checkName


checkNameAny

protected String checkNameAny(String strName)
Port of evfslxck.c checkNameAny


checkNameIcff

protected String checkNameIcff(String strName)
Port of evfslxck.c checkNameIcff


checkNameType

protected String checkNameType(char cNameType,
                               int iDDSType)
Port of evfslxck.c checkNameType, getValidCharsNameType.


checkReferenceField

protected String checkReferenceField(String strField)
Port of evfslxck.c, checkRef.


checkSyntax

public ISeriesEditorSyntaxError[] checkSyntax(int iElementStart,
                                              int iElementEnd)
Invokes the syntax checker proxy if available. The proxy is given the instance to this class. The proxy calls this instance's addSyntaxError method for each syntax error string.

Specified by:
checkSyntax in interface IISeriesEditorSyntaxChecker
Specified by:
checkSyntax in class ISeriesEditorSyntaxChecker

checkSyntaxOfRange

public void checkSyntaxOfRange(int iElementStart,
                               int iElementEnd)
Syntax checks the specified range of Elements.

Specified by:
checkSyntaxOfRange in interface IISeriesEditorSyntaxChecker
Specified by:
checkSyntaxOfRange in class ISeriesEditorSyntaxChecker

checkUsage

protected String checkUsage(char cUsage,
                            int iDDSType)
Port of evfslxck.c checkUse, getValidCharsUse.


isAvailable

public boolean isAvailable()
Returns whether syntax checking is available. Syntax checking is available for all DDS types.

Specified by:
isAvailable in interface IISeriesEditorSyntaxChecker
Specified by:
isAvailable in class ISeriesEditorSyntaxChecker

isCancelable

public boolean isCancelable()
Returns whether the syntax checker is cancelable before the operation is complete.

Specified by:
isCancelable in class ISeriesEditorSyntaxChecker

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.