Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.verifiers
Class Verifier

java.lang.Object
  extended by com.ibm.etools.iseries.edit.verifiers.Verifier
All Implemented Interfaces:
IISeriesEditorConstants, IVerifier, ISystemEditorConstants
Direct Known Subclasses:
VerifierCobolILE, VerifierDDS, VerifierRPGILE

public abstract class Verifier
extends Object
implements IVerifier, IISeriesEditorConstants


Nested Class Summary
protected  class Verifier.RunnableProgramVerifier
          Inner class to parser all in a different thread
 
Field Summary
protected  boolean _bDBCS
           
protected  boolean _bLocal
           
protected  boolean _bShowListingsView
           
protected  IBMiConnection _connection
           
protected  IDocument _document
           
protected  int _iCCSID
           
protected  IQSYSJob _job
           
protected  IQSYSMember _member
           
protected  IFile _sourceIFile
           
protected  String _strFullLocalFileName
           
protected  String _strMessage
           
protected  String _strProjectName
           
protected  IVerifierView _view
           
static String copyright
           
static Object lock
           
 
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
Verifier()
           
 
Method Summary
 byte[] callbackGetLinePrefixText(int iLine)
          Called by the native proxy to obtain the text at a line number.
 byte[] callbackGetLineText(int iLine)
          Called by the native proxy to obtain the text at a line number.
 int callbackGetNextLine(int iLine)
          Called by the native proxy to obtain the line number of the next line.
 int callbackGetPreviousLine(int iLine)
          Called by the native proxy to obtain the line number of the previous line.
 boolean callbackIsShowLine(int iLine)
          Called by the native proxy to determine whether a line is a show line.
 String doVerification(int iMode)
          Called by the editor and the RSE view.
 String doVerificationWithOptionsDialog()
          Called by the editor and the RSE view.
protected  IBMiConnection findIBMiConnection(IQSYSMember member)
          Find IBMiConnection associated with the given member.
 int getCCSID()
          Returns the remote CCSID previously set.
protected  IFile getErrorListFile(IPath path)
          Retrieves the previous IFile from the error list view.
 String getEventDirectoryPath()
          Returns the directory that holds event files of extension "evt".
 String getEventName()
          Returns either the member name, or the filename without the file extension.
 String getFullLocalFileName()
          Get the file name if not a remote file.
 String getHostAlias()
          Returns the alias string to be used for the host.
 int getHostCommunicationsPort()
          Returns the communications port that can be used by the verifier to communicate with the host.
static IPath getInformationDirectoryPath()
          Returns the directory that holds listing files of extension "lst".
 String getInformationName()
          Returns either the member name, or the filename without the file extension.
 String getISeriesMemberFullName()
          Returns the fully qualified ISeries member name.
static String getListingDirectoryPath()
          Returns the directory that holds listing files of extension "lst".
 String getListingName()
          Returns either the member name, or the filename without the file extension.
 String getLocalFileName()
           
 IQSYSMember getQSYSMember()
          Returns the ISeries member if a remote file.
 String getShortFileName()
          Returns the member name if available, or the local file name
 String getSpecialCharsXLate()
          Returns the special characters using the current CCSID
 void initializeViewFromDocument(IDocument document)
           
 void initializeViewFromFile(IFile file)
           
 void initializeViewFromLpexView(LpexView view)
           
 boolean isDBCS()
          Returns the state of the DBCS flag.
 boolean isIFSFile()
          Returns true if is an IFS file, false otherwise
 boolean isLocal()
          Queries whether the resource we are verifying is local or remote.
 void setIBMiConnection(IBMiConnection connection)
          Method setIBMiConnection.
 void setIFile(IFile sourceIFile)
          set the IFile to use for retrieving necessary info
 void setLocal(boolean bLocal)
          Sets whether the resource we are verifying is local or remote.
 void setShowListingsView(boolean bShow)
          Sets the displaying of the listings view.
protected  void showErrorListView()
          Displays the error list (event) file in the error list view.
protected  void showListingsView()
          Displays the listings view.
protected abstract  String verify(int iMode)
          Subclasses to do the verification.
protected abstract  String verifyWithOptionsDialog()
          Subclasses to display a verify options dialog, and do the verification.
 
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.edit.verifiers.IVerifier
getCacheRefresh
 

Field Detail

copyright

public static String copyright

lock

public static Object lock

_bDBCS

protected boolean _bDBCS

_bLocal

protected boolean _bLocal

_bShowListingsView

protected boolean _bShowListingsView

_iCCSID

protected int _iCCSID

_document

protected IDocument _document

_sourceIFile

protected IFile _sourceIFile

_member

protected IQSYSMember _member

_view

protected IVerifierView _view

_connection

protected IBMiConnection _connection

_strFullLocalFileName

protected String _strFullLocalFileName

_strMessage

protected String _strMessage

_strProjectName

protected String _strProjectName

_job

protected IQSYSJob _job
Constructor Detail

Verifier

public Verifier()
Method Detail

callbackGetLineText

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


callbackGetLinePrefixText

public byte[] callbackGetLinePrefixText(int iLine)
Called by the native proxy to obtain the text at a line number.


callbackGetNextLine

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


callbackGetPreviousLine

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


callbackIsShowLine

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


doVerification

public String doVerification(int iMode)
Called by the editor and the RSE view.

Specified by:
doVerification in interface IVerifier

doVerificationWithOptionsDialog

public String doVerificationWithOptionsDialog()
Called by the editor and the RSE view.

Specified by:
doVerificationWithOptionsDialog in interface IVerifier

getCCSID

public int getCCSID()
Returns the remote CCSID previously set.


getErrorListFile

protected IFile getErrorListFile(IPath path)
Retrieves the previous IFile from the error list view.


getEventDirectoryPath

public String getEventDirectoryPath()
Returns the directory that holds event files of extension "evt".


getEventName

public String getEventName()
Returns either the member name, or the filename without the file extension.


getInformationDirectoryPath

public static IPath getInformationDirectoryPath()
Returns the directory that holds listing files of extension "lst".


getHostAlias

public String getHostAlias()
Returns the alias string to be used for the host.


getHostCommunicationsPort

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


getInformationName

public String getInformationName()
Returns either the member name, or the filename without the file extension.


getQSYSMember

public IQSYSMember getQSYSMember()
Returns the ISeries member if a remote file.

Specified by:
getQSYSMember in interface IVerifier
Returns:
the hostname if the resource is remote, null otherwise

getISeriesMemberFullName

public String getISeriesMemberFullName()
Returns the fully qualified ISeries member name.


getListingDirectoryPath

public static String getListingDirectoryPath()
Returns the directory that holds listing files of extension "lst".


getListingName

public String getListingName()
Returns either the member name, or the filename without the file extension.


getShortFileName

public String getShortFileName()
Returns the member name if available, or the local file name


getLocalFileName

public String getLocalFileName()

getFullLocalFileName

public String getFullLocalFileName()
Description copied from interface: IVerifier
Get the file name if not a remote file.

Specified by:
getFullLocalFileName in interface IVerifier
Returns:
the file name
See Also:
com.ibm.etools.iseries.editor.verifiers.IVerifier#getFullLocalFileName()

getSpecialCharsXLate

public String getSpecialCharsXLate()
Returns the special characters using the current CCSID


initializeViewFromDocument

public void initializeViewFromDocument(IDocument document)
                                throws IOException,
                                       CoreException
Throws:
IOException
CoreException

initializeViewFromFile

public void initializeViewFromFile(IFile file)
                            throws IOException,
                                   CoreException
Throws:
IOException
CoreException

initializeViewFromLpexView

public void initializeViewFromLpexView(LpexView view)

isDBCS

public boolean isDBCS()
Returns the state of the DBCS flag.


isIFSFile

public boolean isIFSFile()
Returns true if is an IFS file, false otherwise


isLocal

public boolean isLocal()
Description copied from interface: IVerifier
Queries whether the resource we are verifying is local or remote.

Specified by:
isLocal in interface IVerifier
Returns:
true if resource is a local resource, false if resource is a remote resource.
See Also:
com.ibm.etools.iseries.editor.verifiers.IVerifier#isLocal()

setIFile

public void setIFile(IFile sourceIFile)
set the IFile to use for retrieving necessary info

Specified by:
setIFile in interface IVerifier

setIBMiConnection

public void setIBMiConnection(IBMiConnection connection)
Description copied from interface: IVerifier
Method setIBMiConnection. sets the connection to be used by communications during the verify when accessing host info

Specified by:
setIBMiConnection in interface IVerifier
Parameters:
connection - the connection to use when verify
See Also:
com.ibm.etools.iseries.editor.verifiers.IVerifier#setIBMiConnection(IBMiConnection)

setLocal

public void setLocal(boolean bLocal)
Description copied from interface: IVerifier
Sets whether the resource we are verifying is local or remote.

Specified by:
setLocal in interface IVerifier
See Also:
com.ibm.etools.iseries.editor.verifiers.IVerifier#setLocal(boolean)

setShowListingsView

public void setShowListingsView(boolean bShow)
Sets the displaying of the listings view.


showErrorListView

protected void showErrorListView()
Displays the error list (event) file in the error list view.


showListingsView

protected void showListingsView()
Displays the listings view.


verify

protected abstract String verify(int iMode)
Subclasses to do the verification.


verifyWithOptionsDialog

protected abstract String verifyWithOptionsDialog()
Subclasses to display a verify options dialog, and do the verification.


findIBMiConnection

protected IBMiConnection findIBMiConnection(IQSYSMember member)
Find IBMiConnection associated with the given member.

Parameters:
member -
Returns:
IBMiConnection instance.

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.