Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.parsers
Class ISeriesEditorSyntaxChecker

java.lang.Object
  extended by com.ibm.etools.iseries.parsers.ISeriesEditorSyntaxChecker
Direct Known Subclasses:
ISeriesEditorCLSyntaxChecker, ISeriesEditorCobolSyntaxChecker, ISeriesEditorDDSSyntaxChecker, ISeriesEditorRPGILESyntaxChecker, ISeriesEditorRPGOPMSyntaxChecker

public abstract class ISeriesEditorSyntaxChecker
extends Object

Base class for syntax checkers. Handles auto-syntax checking if the action passed to the constructor is not null.


Nested Class Summary
protected  class ISeriesEditorSyntaxChecker.RunnableSyntaxChecker
          Inner class to parser all in a different thread
 
Field Summary
protected static ISeriesEditorSyntaxError[] _aEmpty
           
protected  boolean _bIsPrimaryLpexView
           
protected  boolean _disableSyntaxCheckAuto
           
protected  boolean _invokedAuto
           
protected  IProgressMonitor _progressMonitor
           
protected  Point _ptRange
           
protected  String _strAutoPreferenceName
           
protected static String _strEmpty
           
protected  Vector _vectorSyntaxErrors
           
protected  LpexView _view
           
static String copyright
           
 
Constructor Summary
ISeriesEditorSyntaxChecker(LpexView view, String strAutoPreferenceName)
          Constructor.
 
Method Summary
 void callbackAddSyntaxError(int iElementNumber, byte[] byteaSyntaxError)
          Called by the native proxy for each syntax error string.
 byte[] callbackGetLineText(int iElement)
          Called by the native proxy to obtain the text at a Element number.
 int callbackGetNextLine(int iElement)
          Called by the native proxy to obtain the Element number of the next line.
 int callbackGetPreviousLine(int iElement)
          Called by the native proxy to obtain the line number of the previous line.
 boolean callbackIsCanceled()
          Called by the native proxy to determine whether the syntax check has been cancelled.
 boolean callbackIsShowLine(int iElement)
          Called by the native proxy to determine whether a line is a show line.
abstract  ISeriesEditorSyntaxError[] checkSyntax(int iElementStart, int iElementEnd)
          Subclasses to subclass.
protected  void checkSyntaxAuto(int iElement)
          Syntax checks the given element if conditions are correct.
 void checkSyntaxAuto(int iElementFirst, int iElementLast)
          Syntax checks the given element range if conditions are correct.
 void checkSyntaxOfCurrentLine()
          Syntax checks the current line
 void checkSyntaxOfDocument()
          Syntax checks the entire document.
abstract  void checkSyntaxOfRange(int iElementStart, int iElementEnd)
          Subclasses to subclass.
 void checkSyntaxOfRangeWithProgress(int iElementStart, int iElementEnd)
           
 void checkSyntaxOfSelection()
          Checks syntax of selected range.
 void displaySyntaxErrors(ISeriesEditorSyntaxError[] aSyntaxErrors, char cSyntaxErrorMessageStyle, char cSyntaxErrorHighlightStyle, int iElementStart, int iElementEnd)
          Displays the given error messages.
 int getHostCommunicationsPort()
          Returns the communications port that can be used by the verifier to communicate with the host.
abstract  boolean isAvailable()
          Subclasses to return whether syntax checking is available.
abstract  boolean isCancelable()
          Subclasses to return whether a syntax check may be canceled before completion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_strEmpty

protected static final String _strEmpty
See Also:
Constant Field Values

_disableSyntaxCheckAuto

protected boolean _disableSyntaxCheckAuto

_progressMonitor

protected IProgressMonitor _progressMonitor

_view

protected LpexView _view

_ptRange

protected Point _ptRange

_strAutoPreferenceName

protected String _strAutoPreferenceName

_vectorSyntaxErrors

protected Vector _vectorSyntaxErrors

_invokedAuto

protected boolean _invokedAuto

_bIsPrimaryLpexView

protected boolean _bIsPrimaryLpexView

_aEmpty

protected static ISeriesEditorSyntaxError[] _aEmpty
Constructor Detail

ISeriesEditorSyntaxChecker

public ISeriesEditorSyntaxChecker(LpexView view,
                                  String strAutoPreferenceName)
Constructor.

Parameters:
view - the view that this syntax checker belongs to
strAutoPreferenceName - the name of the preference which indicates whether automatic syntax checking is on or off
Method Detail

callbackAddSyntaxError

public void callbackAddSyntaxError(int iElementNumber,
                                   byte[] byteaSyntaxError)
Called by the native proxy for each syntax error string.


callbackGetLineText

public byte[] callbackGetLineText(int iElement)
Called by the native proxy to obtain the text at a Element number.


callbackGetNextLine

public int callbackGetNextLine(int iElement)
Called by the native proxy to obtain the Element number of the next line.


callbackGetPreviousLine

public int callbackGetPreviousLine(int iElement)
Called by the native proxy to obtain the line number of the previous line.


callbackIsCanceled

public boolean callbackIsCanceled()
Called by the native proxy to determine whether the syntax check has been cancelled.


callbackIsShowLine

public boolean callbackIsShowLine(int iElement)
Called by the native proxy to determine whether a line is a show line.


checkSyntax

public abstract ISeriesEditorSyntaxError[] checkSyntax(int iElementStart,
                                                       int iElementEnd)
Subclasses to subclass.


checkSyntaxAuto

protected void checkSyntaxAuto(int iElement)
Syntax checks the given element if conditions are correct.


checkSyntaxAuto

public void checkSyntaxAuto(int iElementFirst,
                            int iElementLast)
Syntax checks the given element range if conditions are correct. v6.0 - ES - only do on primary lpex view


checkSyntaxOfCurrentLine

public void checkSyntaxOfCurrentLine()
Syntax checks the current line


checkSyntaxOfDocument

public void checkSyntaxOfDocument()
Syntax checks the entire document.


checkSyntaxOfRange

public abstract void checkSyntaxOfRange(int iElementStart,
                                        int iElementEnd)
Subclasses to subclass.


checkSyntaxOfRangeWithProgress

public void checkSyntaxOfRangeWithProgress(int iElementStart,
                                           int iElementEnd)

checkSyntaxOfSelection

public void checkSyntaxOfSelection()
Checks syntax of selected range.


displaySyntaxErrors

public void displaySyntaxErrors(ISeriesEditorSyntaxError[] aSyntaxErrors,
                                char cSyntaxErrorMessageStyle,
                                char cSyntaxErrorHighlightStyle,
                                int iElementStart,
                                int iElementEnd)
Displays the given error messages.


getHostCommunicationsPort

public int getHostCommunicationsPort()
Returns the communications port that can be used by the verifier to communicate with the host.


isAvailable

public abstract boolean isAvailable()
Subclasses to return whether syntax checking is available. A false may be returned if libraries cannot be found.


isCancelable

public abstract boolean isCancelable()
Subclasses to return whether a syntax check may be canceled before completion.


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.