Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.parsers
Class ISeriesEditorRPGILEFreeFormConverter

java.lang.Object
  extended by com.ibm.etools.iseries.parsers.ISeriesEditorRPGILEFreeFormConverter
All Implemented Interfaces:
IISeriesEditorConstantsColors, IISeriesEditorConstantsRPG, IISeriesEditorConstantsRPGILE

public class ISeriesEditorRPGILEFreeFormConverter
extends Object
implements IISeriesEditorConstantsRPGILE

This class contains the ILE RPG Conversion tool to convert fixed format to free format


Nested Class Summary
 class ISeriesEditorRPGILEFreeFormConverter.OpcodeInfo
          This class describes how to handle each opcode
protected  class ISeriesEditorRPGILEFreeFormConverter.RunnableFreeFormConverter
          Inner class to run the converter in a different thread
 class ISeriesEditorRPGILEFreeFormConverter.SourceRecord
          Information about the Source record
 
Field Summary
protected  boolean _bContCharLit
           
protected  boolean _bContNumLit
           
protected  boolean _bEllipses
           
protected  boolean _bInCTData
           
protected  boolean _bInExecSQL
           
protected  boolean _bInFreeBlock
           
protected  boolean _bLineDeleted
           
protected  boolean _bRequireEvalCallp
           
protected  boolean _bSrcIsFree
           
protected  boolean _bStartOrExitSQL
           
protected  int _iAddedRecords
           
protected  int[] _iaNestedOpcode
           
protected  int _iCurrentElement
           
protected  int _iIndentAmount
           
protected  int _iNestChars
           
protected  int _iNestLevel
           
protected  int _iNewNestChars
           
protected  int _iNewNestLevel
           
protected  int _iPrevOpcode
           
 ISeriesEditorRPGILEParser _parser
           
protected  LinkedList _savedRecordList
           
protected  String _strFilename
           
protected  String _strSpecialChars
           
protected  LpexView _view
           
static String copyright
           
protected static ISeriesEditorRPGILEFreeFormConverter.OpcodeInfo[] OpcodeInfoTable
           
protected static String strAltSeq
           
protected static String strBifEOF
           
protected static String strBifEqual
           
protected static String strBifError
           
protected static String strBifNotErrorFound
           
protected static String strBifNotFound
           
protected static String strCopy
           
protected static String strCTData
           
protected static String strElse
           
protected static String strElseIf
           
protected static String strEndExec
           
protected static String strEndFreeDir
           
protected static String strEndIf
           
protected static String strEndOfFile
           
protected static String strEqual
           
protected static String strExecSQL
           
protected static String strFree
           
protected static String strFreeDir
           
protected static String strFTrans
           
protected static String strIf
           
protected static String strIn
           
protected static String strInclude
           
protected static String strOff
           
protected static String strOn
           
protected static String strOr
           
protected static String strSlashSlash
           
protected static String strStarStar
           
 
Fields inherited from interface com.ibm.etools.iseries.editor.IISeriesEditorConstantsRPGILE
_straControlWords, _straDataWords, _straMacroWords, _straRPGFonts, _straXF2_opcodes, _straXF2_possible_opcodes, CHANGE_CFREE_DIRECTIVE_ADDED, CHANGE_CFREE_DIRECTIVE_REMOVED, CHANGE_CFREESQL_END_ADDED, CHANGE_CFREESQL_START_ADDED, CHANGE_CFREESQL_START_END_ADDED, CHANGE_CFREESQL_START_REMOVED, CHANGE_ENDCFREE_DIRECTIVE_ADDED, CHANGE_ENDCFREE_DIRECTIVE_REMOVED, CHANGE_FIXFORM_SQL_END_ADDED, CHANGE_FIXFORM_SQL_END_REMOVED, CHANGE_FIXFORM_SQL_START_ADDED, CHANGE_FIXFORM_SQL_START_REMOVED, CHANGE_NONE, CLASS_BWDLINK, CLASS_CFREE, CLASS_CFREE_DIRECTIVE, CLASS_CFREE_END, CLASS_CFREE_SQL, CLASS_CFREE_SQLEND, CLASS_CFREE_SQLEND_REAL, CLASS_CFREE_SQLSTART, CLASS_COMMENT, CLASS_CONTROL, CLASS_ENDCFREE_DIRECTIVE, CLASS_ERROR, CLASS_FIXFORM_SQL_END, CLASS_FIXFORM_SQL_START, CLASS_FWDLINK, CLASS_PROCEDURE, CLASS_SPACE, CLASS_SQL, CLASS_SUBROUTINE, CLEVEL_LEN, CLEVEL_POS, COMMENT_POS, CONDIND_LEN, CONDIND_POS, CONTINUATION_INDENT, DECPOS_LEN, DECPOS_POS, DIRECTIVE_POS, EOLCOMMENT_POS, EXTFACTOR2_LEN, EXTFACTOR2_POS, FACTOR1_LEN, FACTOR1_POS, FACTOR2_LEN, FACTOR2_POS, FIELDDEF_LEN, FIELDDEF_POS, FIELDLEN_LEN, FIELDLEN_POS, FONT_COMMENT, FONT_DEFAULT, FREE_LEN, FREE_POS, IND_LEN, INDENT_LIMIT, LENGTH_C_OPCODE, MAX_NEST, NUM_OF_OPCODES, OPCODE_LEN, OPCODE_POS, PAGE_INDEX_ILE_C_Calculation, PAGE_INDEX_ILE_C_Calculation_Extended_Factor_2, PAGE_INDEX_ILE_C_Calculation_Extended_Factor_2_Continuation, PAGE_INDEX_ILE_C_Calculation_Free_Form, PAGE_INDEX_ILE_Comment, PAGE_INDEX_ILE_D_Definition, PAGE_INDEX_ILE_D_Definition_Continuation, PAGE_INDEX_ILE_D_Definition_Continued_Name_Line, PAGE_INDEX_ILE_F_File_Description, PAGE_INDEX_ILE_F_File_Description_Continuation, PAGE_INDEX_ILE_Full_Line, PAGE_INDEX_ILE_H_Control, PAGE_INDEX_ILE_I_Input_Field_Description, PAGE_INDEX_ILE_I_Input_Field_Description_Externally_Described_File, PAGE_INDEX_ILE_I_Input_Record_Identification, PAGE_INDEX_ILE_I_Input_Record_Identification_Externally_Described_File, PAGE_INDEX_ILE_I_Input_Record_Identification_Logical_Relationship, PAGE_INDEX_ILE_O_Output_Field_Description, PAGE_INDEX_ILE_O_Output_Field_Description_Continuation, PAGE_INDEX_ILE_O_Output_Record_Identification, PAGE_INDEX_ILE_O_Output_Record_Identification_AND_OR, PAGE_INDEX_ILE_O_Output_to_Disk, PAGE_INDEX_ILE_P_Procedure, PAGE_INDEX_ILE_P_Procedure_Continued_Name_Line, PREF_COLUMN_CFIXED_MAX, PREF_COLUMN_CFREE_MAX, PREF_COLUMN_CFREE_MIN, PREF_COLUMN_CFREE_START, PROMPT_C, PROMPT_CF, PROMPT_CFE, PROMPT_CFS, PROMPT_CFSQL, PROMPT_CM, PROMPT_D, PROMPT_DATA, PROMPT_DC, PROMPT_DX, PROMPT_F, PROMPT_FC, PROMPT_H, PROMPT_IF, PROMPT_IFX, PROMPT_IR, PROMPT_IR2, PROMPT_IRX, PROMPT_LAST, PROMPT_MACRO, PROMPT_NONE, PROMPT_OD, PROMPT_OF, PROMPT_OFC, PROMPT_OR, PROMPT_OR2, PROMPT_P, PROMPT_PC, PROMPT_SPACE, PROMPT_SQL, PROMPT_XF2, PROMPT_XF2C, RESINDEQ_POS, RESINDER_POS, RESINDNR_POS, RESINDS_LEN, RESINDS_POS, RESULTFIELD_LEN, RESULTFIELD_POS, RPGSPEC_C, RPGSPEC_CF, RPGSPEC_D, RPGSPEC_E, RPGSPEC_F, RPGSPEC_H, RPGSPEC_I, RPGSPEC_L, RPGSPEC_O, RPGSPEC_P, RPGSPEC_U, SIGNIFICANT_LEN, SLASHSLASHEOL_POS, SPECTYPE_POS, SRCRECLEN, 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, XACQ, XADD, XADDDUR, XALLOC, XANDEQ, XANDGE, XANDGT, XANDLE, XANDLT, XANDNE, XBEGSR, XBITOFF, XBITON, XBLANK, XCAB, XCABEQ, XCABGE, XCABGT, XCABLE, XCABLT, XCABNE, XCALL, XCALLB, XCALLP, XCAS, XCASEQ, XCASGE, XCASGT, XCASLE, XCASLT, XCASNE, XCAT, XCHAIN, XCHECK, XCHECKR, XCLEAR, XCLOSE, XCOMMIT, XCOMP, XDEALLOC, XDEFINE, XDELETE, XDIV, XDO, XDOU, XDOUEQ, XDOUGE, XDOUGT, XDOULE, XDOULT, XDOUNE, XDOW, XDOWEQ, XDOWGE, XDOWGT, XDOWLE, XDOWLT, XDOWNE, XDSPLY, XDUMP, XELSE, XELSEIF, XEND, XENDCS, XENDDO, XENDFOR, XENDIF, XENDMON, XENDSL, XENDSR, XEVAL, XEVAL_CORR, XEVALR, XEXCEPT, XEXFMT, XEXSR, XEXTRCT, XFEOD, XFOR, XFORCE, XGOTO, XIF, XIFEQ, XIFGE, XIFGT, XIFLE, XIFLT, XIFNE, XIN, XITER, XKFLD, XKLIST, XLEAVE, XLEAVESR, XLOOKUP, XMHHZO, XMHLZO, XMLHZO, XMLLZO, XMONITOR, XMOVE, XMOVEA, XMOVEL, XMULT, XMVR, XNEXT, XOCCUR, XON_ERROR, XOPEN, XOREQ, XORGE, XORGT, XORLE, XORLT, XORNE, XOTHER, XOUT, XPARM, XPLIST, XPOST, XREAD, XREADC, XREADE, XREADP, XREADPE, XREALLOC, XREL, XRESET, XRETURN, XROLBK, XSCAN, XSELECT, XSETGT, XSETLL, XSETOFF, XSETON, XSHTDN, XSORTA, XSQRT, XSUB, XSUBDUR, XSUBST, XTAG, XTEST, XTESTB, XTESTN, XTESTZ, XTIME, XUNLOCK, XUPDATE, XWHEN, XWHENEQ, XWHENGE, XWHENGT, XWHENLE, XWHENLT, XWHENNE, XWRITE, XXFOOT, XXLATE, XXML_INTO, XXML_SAX, XZ_ADD, XZ_SUB
 
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
 
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
 
Constructor Summary
ISeriesEditorRPGILEFreeFormConverter(LpexView lpexView, ISeriesEditorRPGILEParser parser)
          Constructor for ISeriesEditorRPGILEFreeFormConverter
 
Method Summary
 void convertCurrentLine(int iIndent)
          Convert current line to free form
 void convertDocumentToFreeForm()
          Convert the whole document to free form
 void convertRangeToFreeForm(int iElementStart, int iElementEnd, int iIndent, IProgressMonitor monitor)
          Converts the specified range of elements to free form
 void convertSelectionToFreeForm()
          Convert the selected source to free form
 
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

strFreeDir

protected static final String strFreeDir
See Also:
Constant Field Values

strEndFreeDir

protected static final String strEndFreeDir
See Also:
Constant Field Values

strStarStar

protected static final String strStarStar
See Also:
Constant Field Values

strCTData

protected static final String strCTData
See Also:
Constant Field Values

strFTrans

protected static final String strFTrans
See Also:
Constant Field Values

strAltSeq

protected static final String strAltSeq
See Also:
Constant Field Values

strCopy

protected static final String strCopy
See Also:
Constant Field Values

strInclude

protected static final String strInclude
See Also:
Constant Field Values

strIf

protected static final String strIf
See Also:
Constant Field Values

strElseIf

protected static final String strElseIf
See Also:
Constant Field Values

strElse

protected static final String strElse
See Also:
Constant Field Values

strEndIf

protected static final String strEndIf
See Also:
Constant Field Values

strEndOfFile

protected static final String strEndOfFile
See Also:
Constant Field Values

strExecSQL

protected static final String strExecSQL
See Also:
Constant Field Values

strEndExec

protected static final String strEndExec
See Also:
Constant Field Values

strFree

protected static final String strFree
See Also:
Constant Field Values

strSlashSlash

protected static final String strSlashSlash
See Also:
Constant Field Values

strBifError

protected static final String strBifError
See Also:
Constant Field Values

strBifNotFound

protected static final String strBifNotFound
See Also:
Constant Field Values

strBifNotErrorFound

protected static final String strBifNotErrorFound
See Also:
Constant Field Values

strBifEOF

protected static final String strBifEOF
See Also:
Constant Field Values

strBifEqual

protected static final String strBifEqual
See Also:
Constant Field Values

strOn

protected static final String strOn
See Also:
Constant Field Values

strOff

protected static final String strOff
See Also:
Constant Field Values

strIn

protected static final String strIn
See Also:
Constant Field Values

strEqual

protected static final String strEqual
See Also:
Constant Field Values

strOr

protected static final String strOr
See Also:
Constant Field Values

OpcodeInfoTable

protected static ISeriesEditorRPGILEFreeFormConverter.OpcodeInfo[] OpcodeInfoTable

_parser

public ISeriesEditorRPGILEParser _parser

_strFilename

protected String _strFilename

_strSpecialChars

protected String _strSpecialChars

_view

protected LpexView _view

_savedRecordList

protected LinkedList _savedRecordList

_bSrcIsFree

protected boolean _bSrcIsFree

_bInFreeBlock

protected boolean _bInFreeBlock

_bInCTData

protected boolean _bInCTData

_bStartOrExitSQL

protected boolean _bStartOrExitSQL

_bInExecSQL

protected boolean _bInExecSQL

_bLineDeleted

protected boolean _bLineDeleted

_bRequireEvalCallp

protected boolean _bRequireEvalCallp

_bContCharLit

protected boolean _bContCharLit

_bContNumLit

protected boolean _bContNumLit

_bEllipses

protected boolean _bEllipses

_iIndentAmount

protected int _iIndentAmount

_iNestLevel

protected int _iNestLevel

_iNestChars

protected int _iNestChars

_iNewNestLevel

protected int _iNewNestLevel

_iNewNestChars

protected int _iNewNestChars

_iAddedRecords

protected int _iAddedRecords

_iaNestedOpcode

protected int[] _iaNestedOpcode

_iPrevOpcode

protected int _iPrevOpcode

_iCurrentElement

protected int _iCurrentElement
Constructor Detail

ISeriesEditorRPGILEFreeFormConverter

public ISeriesEditorRPGILEFreeFormConverter(LpexView lpexView,
                                            ISeriesEditorRPGILEParser parser)
Constructor for ISeriesEditorRPGILEFreeFormConverter

Parameters:
LpexView -
ISeriesEditorRPGILEParser -
Method Detail

convertDocumentToFreeForm

public void convertDocumentToFreeForm()
Convert the whole document to free form

Parameters:
None -

convertSelectionToFreeForm

public void convertSelectionToFreeForm()
Convert the selected source to free form

Parameters:
None -

convertRangeToFreeForm

public void convertRangeToFreeForm(int iElementStart,
                                   int iElementEnd,
                                   int iIndent,
                                   IProgressMonitor monitor)
Converts the specified range of elements to free form

Parameters:
iElementStart - first line to convert
iElementEnd - last line to convert
iIndent - amount to indent each level
IProgressMonitor - the progress monitor

convertCurrentLine

public void convertCurrentLine(int iIndent)
Convert current line to free form

Parameters:
iIndent - amount to indent

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.