Rob Rohan's Lab

Add a language in Afae

Write the Rules file using the xmode.dtd in {plugins}/com.rohanclan.afae_X.X.X/modes/ NOTE: you can use afae to do this by simply creating an XML document and adding

<!DOCTYPE MODE SYSTEM "xmode.dtd">

to the top of the file. However, the easiest way to make a new language is to use an already existing language definition as a base.

Add the mode file to the {plugins}/com.rohanclan.afae_X.X.X/modes/ directory, and add an entry into the catalog file (located in the same directory). The entry will need to looks something like the following:

<MODE NAME="hex" FILE="hex.xml" 
    FILE_NAME_GLOB="*.{hex,other}"
/>

Where FILE_NAME_GLOB is the extension of the file, FILE is your new language file name, and NAME is the unique name of the language.

Add the file extension to the plugin.xml file (located in {plugins}/com.rohanclan.afae_X.X.X/) so Eclipse knows Afae can handle the file. Search the file for the word "extensions" and add it to the end of the comma separated list (should be around line 67).

You can now restart Eclipse and the file will be opened in Afae using your rules. Note: if you've opened the file before in a different editor (i.e. the default editor), you might have to right click (control click on Mac) on the file and choose Open With then Afae Editor