for installing: these plugins must be located next to other plugins (should be inside plugins subdirectory from eclipse)
Here a quick step by step what I did:
http://www.emftext.org/index.php/EMFText_Installation_Screencast- Install EMFText from
http://reuseware.org/update updatesite
http://reuseware.org/screencasts/screencast-EMFTextEdit-simple-gui.htm- create a new java project
- create a model subdirectory
- create an ecore model
- Create classes that represent different objects, link appropriate
-- container attributes (e.g. list of content) must set the correct boolean
- Create a genmodel for ecore model
- declare default package for code generation
- generate model code (from genmodel context menu)
- create a cs file for syntax
- fill in some syntax rules, keywords in "", content fields...
- the tricky part (I did not figure out what the next step was for some time as the wink source is somehow broken in the end):
on the cs file generate text resource (from context menu), this will create a second plugin project next to the one
- create a new launch configuration (new eclipse) which uses the newly created plugins.
- create a file with appropriate extension, be glad to see syntax highlighting and content assist
another example with audio, perhaps easier to understand:
http://www.emftext.org/index.php/EMFText_Getting_Started_Screencastsome things I noticed:
- if you change the underlying model, you have to generate the model and ressource code new, clean out the old (java) files before, otherwise there could be compile errors (e.g. for renamed/missing classes)
- root node of genmodel supports "reload model", so no need to throw away the genmodel file if you changed the ecore file.
my syntax and ecore model is in ufo_gui.jar/model, jar can be renamed to zip to extract.
I tried to move the definitions into a subpackages, so different script parts may be defined in different syntax files, these may be imported into one file for all (so that we have one editor supporting all ufo files)