| java.lang.Object de.uka.ilkd.key.ocl.gf.PrintnameManager
PrintnameManager | class PrintnameManager (Code) | | author: daniels author: An object of this class manages a bunch of printlines which is comprised of author: storage and retrieval. Also giving the subcategory shortnames their long author: counterpart is done here. |
Field Summary | |
final static String | SELF_SUBCAT The name of the subcat, that is used for the easy property access
of self. | final protected static String | frontMatter | final protected Hashtable | printnames | final protected Hashtable | subcatNames The hashmap for the names of the sub categories,
with the shortname starting with '%' as the key.
It is important that all Printnames of one session share the same
instance of Hashtable here. |
Constructor Summary | |
public | PrintnameManager() This constructor is a bit of a hack.
It puts the \%SELF subcat into this.printnames.
This subcat does not appear in the grammars and thus is
introduced here. |
SELF_SUBCAT | final static String SELF_SUBCAT(Code) | | The name of the subcat, that is used for the easy property access
of self.
|
printnames | final protected Hashtable printnames(Code) | | contains all the Printnames with the fun names as keys
|
subcatNames | final protected Hashtable subcatNames(Code) | | The hashmap for the names of the sub categories,
with the shortname starting with '%' as the key.
It is important that all Printnames of one session share the same
instance of Hashtable here.
This field is not static because there can be several instances of
the editor that shouldn't interfere.
|
PrintnameManager | public PrintnameManager()(Code) | | This constructor is a bit of a hack.
It puts the \%SELF subcat into this.printnames.
This subcat does not appear in the grammars and thus is
introduced here. If it is defined there although, this
definition is used. So it does not hurt.
|
addNewPrintname | protected void addNewPrintname(String myFun, String myPrintname, String type)(Code) | | Constructs the actual printname and puts it into printnames
Parameters: myFun - the GF abstract fun name Parameters: myPrintname - the printname given by GF |
addNewPrintnameLine | public void addNewPrintnameLine(String line, Hashtable funTypes)(Code) | | processes a line from the "gf pg -printer=printnames" command
Parameters: line - the read line from GFShould look like printname fun neq = "<>," ++ ("parametrized" ++ ("disequality$to" ++ ("compare" ++ ("two" ++ ("instances" ++ ("on" ++ ("a" ++ ("specific" ++ "type%COMP"))))))))and needs to get likeprintname fun neq = "<>, parametrized disequality$to compare two instances on a specific type%COMP" Parameters: funTypes - contains funs, mapped to their types |
getFullname | public String getFullname(String shortname)(Code) | | looks up the full name for the subcategory name shortname.
This is the %SOMETHING from the printname.
Parameters: shortname - The subcat name which should get expanded the corresponding full name, maybe null! |
getPrintname | public Printname getPrintname(String myFun)(Code) | | looks for the Printname corresponding to the given fun.
If the fun is qualified with a module and no Printname
is found with module, another lookup without the module part
is made.
Parameters: myFun - the GF abstract fun name (with or without qualification) the corresponding Printname iff that one exists, null otherwise |
removePluses | protected static String removePluses(String line)(Code) | | The printname printer of pg spits out no String, but a wrapping of
small Strings conjoined with ++ which includes lots of parantheses.
Parameters: line - The GF line from pg -printer=printnames a String representing the actual printname without the clutter |
|
|