SWT LPEX
v3.0.5

com.ibm.lpex.hlasm
Class InstrColorAssoc

java.lang.Object
  extended bycom.ibm.lpex.hlasm.InstrColorAssoc

public final class InstrColorAssoc
extends Object

This class is used to extract custom colors from an XML file. The XML file specifies groups of HLASM instructions and colors. An association is created between the colors and the instructions groups.


Constructor Summary
InstrColorAssoc(String xmlFileName)
          Constructor.
 
Method Summary
 Vector getAllColors()
          Retrieve all the colors.
 Vector getAllGroups()
          Retrieve all the groups.
 char getInstructionColor(String instructionName)
          This method is used to determine whether a special color code will be used for syntax-highlighting a given instruction.
 String toXMLString()
          Return a string of the XML document defining the custom colors.
 void writeToFile(String xmlFileName)
          This method will write the XML string produced by this color association to the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrColorAssoc

public InstrColorAssoc(String xmlFileName)
Constructor.

Parameters:
xmlFileName - XML file with custom color definitions
Method Detail

getAllColors

public Vector getAllColors()
Retrieve all the colors.


getAllGroups

public Vector getAllGroups()
Retrieve all the groups.


getInstructionColor

public char getInstructionColor(String instructionName)
This method is used to determine whether a special color code will be used for syntax-highlighting a given instruction.

Parameters:
instructionName - the HLASM instruction that you want to find the color for
Returns:
color character, or ' ' if no color is set

writeToFile

public void writeToFile(String xmlFileName)
This method will write the XML string produced by this color association to the given file.

Parameters:
xmlFileName - the file name where the XML will be written to; the file does not need to exist

toXMLString

public String toXMLString()
Return a string of the XML document defining the custom colors.

Returns:
a string ready to be written to a file. The string is a well-formed XML document that contains a DOCTYPE tag to allow the ColorFileResolver DTD to validate the XML

SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.