|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.edit.wizards.RPGWizardUtil
public class RPGWizardUtil
Field Summary | |
---|---|
static String |
copyright
|
Constructor Summary | |
---|---|
RPGWizardUtil()
|
Method Summary | |
---|---|
static void |
addCommentLineToList(List codeList,
char specType,
int len,
boolean isCursorInFreeForm)
Add a comment line to the vector of generated code. |
static void |
addDataSetType(Vector procCode,
String dsType)
|
static void |
addDataStructureLength(Vector code,
int length)
|
static void |
addDSpec(Vector code,
String prefix,
String spec,
String attr)
|
static void |
addKeyword(List code,
String keyword)
Adds keyword to the keyword section of the previous line of code. |
static void |
addKeyword(List code,
StringBuffer sb,
String keyword,
boolean inFreeForm)
Adds keyword to the keyword section of sb. |
static void |
addKeywords(List code,
Collection keywords)
Adds a list of keywords to the last line in the list code. |
static Vector |
addLikeField(StringBuffer value,
String likeField)
|
static void |
addName(Vector code,
INFDSpec dspec)
|
static StringBuffer |
addNameToSpec(List list,
StringBuffer buffer,
String name)
Deprecated. use addNameToSpec(List, String, String) if possible |
static void |
addNameToSpec(List list,
String spec,
String name)
adds the spec to the list and returns a new string buffer that is a copy of the last element in the list, after it has been modified (ie returns last line that was generated and added to the list) |
static Vector |
addNameToSpec(Vector vector,
String spec,
String name)
Deprecated. use addNameToSpec(List list,String spec,String name) instead |
static void |
addNonFreeFormLineToList(List codeList,
String theLine,
boolean isCursorInFreeForm)
|
static void |
addNonFreeFormLineToList(List codeList,
StringBuffer theLine,
boolean isCursorInFreeForm)
|
static Vector |
addSubfield(RPGDSpecSubField subfield)
|
static StringBuffer |
addTypeCodeToLine(StringBuffer prLine,
String typeCode)
|
static StringBuffer |
appendToSB(StringBuffer sb,
List codeLines)
|
static Vector |
combineFieldWithName(Vector code,
Vector lenTypeDecs)
|
static Vector |
configureOptions(StringBuffer options)
|
static RPGKeywordComboEntry |
createKeywordComboEntry(Composite cmp,
ModifyListener listener,
String label,
boolean readOnly,
String[] items,
String cmbTooltip)
|
static RPGKeywordComboEntry |
createKeywordComboEntry(Composite cmp,
String label,
boolean readOnly,
String[] items)
|
static RPGKeywordTextEntry |
createKeywordEntry(Composite cmp,
ModifyListener listener,
String label,
String tooltipId)
|
static RPGKeywordTextEntry |
createKeywordEntry(Composite cmp,
String label)
|
static RPGKeywordLCComboEntry |
createKeywordLCComboEntry(Composite cmp,
ModifyListener listener,
String label,
boolean readOnly,
String[] items,
String cmbTooltip,
String specialChars)
|
static RPGKeywordLCComboEntry |
createKeywordLCComboEntry(Composite cmp,
String label,
boolean readOnly,
String[] items,
String specialChars)
|
static RPGKeywordTextComboEntry |
createKeywordTextComboEntry(Composite cmp,
ModifyListener listener,
String label,
boolean readOnly,
String[] items,
String txtTooltip,
String cmbTooltip)
|
static RPGKeywordTextComboEntry |
createKeywordTextComboEntry(Composite cmp,
String label,
boolean readOnly,
String[] items)
|
static RPGKeywordLCTextEntry |
createLCKeywordEntry(Composite cmp,
ModifyListener listener,
String label,
String tooltipId,
String specialChars)
|
static RPGKeywordLCTextEntry |
createLCKeywordEntry(Composite cmp,
String label,
String specialChars)
|
static int |
findEnd(LpexView view,
int from)
|
static int |
findEndOfSpec(LpexView view,
int from)
|
static int |
findEndOfSpec(LpexView view,
int from,
boolean ignoreLinesWithComments)
|
static int |
findFirstExec(LpexView view,
int from)
returns the line number of the first executable line after from |
static int |
findLast(LpexView view,
int from)
|
static boolean |
genCallCodeProcedureHeader(List procCode,
String procedureName,
int commentLength)
|
static void |
genDbInf(INFDSpec dspec,
Vector code)
|
static void |
genDspfattInf(INFDSpec dspec,
Vector code)
|
static void |
genDspfInf(INFDSpec dspec,
Vector code)
|
static void |
genFileInf(INFDSpec dspec,
Vector code)
|
static void |
genIcfattInf(INFDSpec dspec,
Vector code)
|
static void |
genIcfInf(INFDSpec dspec,
Vector code)
|
static void |
genIoInf(INFDSpec dspec,
Vector code)
|
static Vector |
genLongLenTypeDecimals(StringBuffer value,
String header)
|
static Vector |
genLongTextCode(String text,
String header)
|
static void |
genOpenInf(INFDSpec dspec,
Vector code)
|
static Vector |
genOtherKeywords(Vector keywds)
|
static StringBuffer |
genProtoTypeCodeInfo(StringBuffer prLine,
String lentypedecs)
Deprecated. |
static void |
genPrtfInf(INFDSpec dspec,
Vector code)
|
static Vector |
genPSDS(PSDSpec dspec)
|
static String |
genRPGProcedureName(String javaMethodName)
|
static int |
getByteLength(RPGFieldType field)
Get the number of bytes of the specified field multiplies the size if it's defind to be an array. |
static int |
getEndOfSubfield(RPGDSpecSubField sf)
|
static int |
getEndPosition(RPGDSpecSubField sf)
|
static Vector |
getLengthTypeDecimals(RPGFieldType fieldType)
|
static Vector |
getLengthTypeDecimals(RPGFieldType fieldType,
String dsName)
|
static RPGDSpecSubField |
getOverlayedSubfieldByName(String name,
Vector fields)
|
static String |
getPackageName(Class c)
Gets the package name via the fully qualified name of the class, not via the c.getPackage().getName() method |
static String |
getPackageName(String fullyQualifiedClassName)
Gets the package name via the fully qualified name of the class |
static String[] |
getTooltips(ResourceBundle rb,
String key,
int count)
|
static String |
getUnqualifiedName(Class c)
Handles classes that are arrays; if c is an array, returns unqualified name of c's content type[] Otherwise, returns the same as if you called getUnqualifiedName(String s). |
static String |
getUnqualifiedName(String fullyQualifiedClassName)
Turns a fully qualified name (as provided by fullyQualifiedClassName
if no . |
static StringBuffer |
insertNameToSpec(StringBuffer spec,
String name,
int startIdx)
|
static boolean |
isCompileTimeData(String text)
|
static boolean |
isCursorInFreeForm(LpexView view)
|
static boolean |
isNumeric(RPGFieldType field)
|
static boolean |
isNumericLiteral(String text)
check whether the string is a numeric literal |
static boolean |
isOverlayDataStructure(RPGDSpecSubField sf,
String dsName)
|
static boolean |
isOverlaySubfield(RPGDSpecSubField sf,
String dsName)
|
static boolean |
isQuoted(String text)
check whether or not the string is quoted |
static String |
rightJustify(String input,
int newLen,
char padChar)
Helper method to right justify a string padding it with the given character. |
static void |
setFieldToPositionValue(RPGFieldType field)
|
static void |
setInzItems(RPGFieldType field,
RPGKeywordLCComboEntry inz,
boolean export)
|
static void |
setQuickMark(LpexView view)
Set a quick mark at the position to insert the generated code This method has to be called after setting the LpexDocumentLocation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String copyright
Constructor Detail |
---|
public RPGWizardUtil()
Method Detail |
---|
public static RPGKeywordTextEntry createKeywordEntry(Composite cmp, String label)
public static RPGKeywordTextEntry createKeywordEntry(Composite cmp, ModifyListener listener, String label, String tooltipId)
public static RPGKeywordLCTextEntry createLCKeywordEntry(Composite cmp, String label, String specialChars)
public static RPGKeywordLCTextEntry createLCKeywordEntry(Composite cmp, ModifyListener listener, String label, String tooltipId, String specialChars)
public static RPGKeywordTextComboEntry createKeywordTextComboEntry(Composite cmp, String label, boolean readOnly, String[] items)
public static RPGKeywordTextComboEntry createKeywordTextComboEntry(Composite cmp, ModifyListener listener, String label, boolean readOnly, String[] items, String txtTooltip, String cmbTooltip)
public static RPGKeywordComboEntry createKeywordComboEntry(Composite cmp, String label, boolean readOnly, String[] items)
public static RPGKeywordComboEntry createKeywordComboEntry(Composite cmp, ModifyListener listener, String label, boolean readOnly, String[] items, String cmbTooltip)
public static RPGKeywordLCComboEntry createKeywordLCComboEntry(Composite cmp, String label, boolean readOnly, String[] items, String specialChars)
public static RPGKeywordLCComboEntry createKeywordLCComboEntry(Composite cmp, ModifyListener listener, String label, boolean readOnly, String[] items, String cmbTooltip, String specialChars)
public static boolean isNumeric(RPGFieldType field)
public static void setInzItems(RPGFieldType field, RPGKeywordLCComboEntry inz, boolean export)
public static boolean isCompileTimeData(String text)
public static Vector genLongTextCode(String text, String header)
public static void addDataSetType(Vector procCode, String dsType)
public static Vector addNameToSpec(Vector vector, String spec, String name)
public static void addNameToSpec(List list, String spec, String name)
list
- spec
- name
- public static StringBuffer insertNameToSpec(StringBuffer spec, String name, int startIdx)
public static Vector genLongLenTypeDecimals(StringBuffer value, String header)
public static Vector getLengthTypeDecimals(RPGFieldType fieldType, String dsName)
public static Vector getLengthTypeDecimals(RPGFieldType fieldType)
public static String rightJustify(String input, int newLen, char padChar)
public static Vector addLikeField(StringBuffer value, String likeField)
public static Vector genOtherKeywords(Vector keywds)
public static Vector combineFieldWithName(Vector code, Vector lenTypeDecs)
public static Vector configureOptions(StringBuffer options)
public static void addKeywords(List code, Collection keywords)
code
- keywords
- public static void addKeyword(List code, String keyword)
keyword
to the keyword section of the previous line of code. If there already was a keyword in that
previous line, a new line will be added to the end of the list (with the same spectype as the last line) and the keyword will be
added to this new line instead.
If the line that the keyword is being added to does not have enough space, the keyword will continue to a new spec that is of the
same spec type as the previous line.
Cavaets:
code
- the list of generated codekeyword
- the keyword string to addpublic static void addKeyword(List code, StringBuffer sb, String keyword, boolean inFreeForm)
keyword
to the keyword section of sb.
code
- sb
- keyword
- public static void genFileInf(INFDSpec dspec, Vector code)
public static void addName(Vector code, INFDSpec dspec)
public static void addDSpec(Vector code, String prefix, String spec, String attr)
public static void genOpenInf(INFDSpec dspec, Vector code)
public static void genIoInf(INFDSpec dspec, Vector code)
public static void genPrtfInf(INFDSpec dspec, Vector code)
public static void genDspfInf(INFDSpec dspec, Vector code)
public static void genIcfInf(INFDSpec dspec, Vector code)
public static void genDbInf(INFDSpec dspec, Vector code)
public static void genDspfattInf(INFDSpec dspec, Vector code)
public static void genIcfattInf(INFDSpec dspec, Vector code)
public static Vector genPSDS(PSDSpec dspec)
public static Vector addSubfield(RPGDSpecSubField subfield)
code
- the main Vector to contain generated codesubfield
- the subfield to be added of the generated data structure
public static void setFieldToPositionValue(RPGFieldType field)
subfield
- field
- public static int getByteLength(RPGFieldType field)
field
- a field of type RPGFieldType
public static boolean isOverlaySubfield(RPGDSpecSubField sf, String dsName)
public static boolean isOverlayDataStructure(RPGDSpecSubField sf, String dsName)
public static int getEndPosition(RPGDSpecSubField sf)
public static int getEndOfSubfield(RPGDSpecSubField sf)
public static int findEndOfSpec(LpexView view, int from)
public static int findEndOfSpec(LpexView view, int from, boolean ignoreLinesWithComments)
public static int findEnd(LpexView view, int from)
public static int findLast(LpexView view, int from)
public static int findFirstExec(LpexView view, int from)
view
- the view to searchfrom
- the line to search from
public static String getPackageName(Class c)
c
-
public static String getPackageName(String fullyQualifiedClassName)
fullyQualifiedClassName
- Fully qualified class name of the class that you want the package name of
public static String getUnqualifiedName(String fullyQualifiedClassName)
fullyQualifiedClassName
if no .
fullyQualifiedClassName
-
public static String getUnqualifiedName(Class c)
c
-
public static void addCommentLineToList(List codeList, char specType, int len, boolean isCursorInFreeForm)
public static StringBuffer addNameToSpec(List list, StringBuffer buffer, String name)
public static StringBuffer genProtoTypeCodeInfo(StringBuffer prLine, String lentypedecs)
public static StringBuffer addTypeCodeToLine(StringBuffer prLine, String typeCode)
public static String genRPGProcedureName(String javaMethodName)
public static boolean genCallCodeProcedureHeader(List procCode, String procedureName, int commentLength)
public static StringBuffer appendToSB(StringBuffer sb, List codeLines)
public static String[] getTooltips(ResourceBundle rb, String key, int count)
public static boolean isCursorInFreeForm(LpexView view)
view
-
public static void setQuickMark(LpexView view)
view
- the LPEX editor view to hold the specified filepublic static void addDataStructureLength(Vector code, int length)
code
- i
- public static void addNonFreeFormLineToList(List codeList, StringBuffer theLine, boolean isCursorInFreeForm)
public static void addNonFreeFormLineToList(List codeList, String theLine, boolean isCursorInFreeForm)
public static RPGDSpecSubField getOverlayedSubfieldByName(String name, Vector fields)
public static boolean isQuoted(String text)
text
- the text to check
public static boolean isNumericLiteral(String text)
text
- the string to check
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |