treat .def file the same as .sdf file
Sometimes it’s useful to look in a .def file (if the syntax for a language has been defined using a .def file only), but this has no editor support at this moment.
I think it would be useful if .def files have the same editor support as .sdf files.
Related question:
I tried importing the sdf editor into my eclipse workspace and changing the file extension of the language there to .def, but this didn’t work. Do eclipse-installation-wide installed plugins override plugins built in the current workspace?
Submitted by Tobi Vollebregt on 29 November 2010 at 10:32
Issue Log
The
.def
file format has a different start symbol, as it starts with adefinition
keyword. I think the SDF editor only supports theModule
start symbol and not theSDF
start symbol. I suppose the grammar could be changed so it only has one start symbol for both cases, but then theSDF.def
file in the plugin would have to be changed, which is really a generated file. It may be better to create a newSDF.sdf
grammar in the plugin and import theSDF.def
one, and then add the start symbols. (To import a.def
file, add-Idef "${basedir}/lib/SDF.def"
tobuild.main.xml>build.sdf.imports
.) Note that theeditor.main.esv
file supports multiple file extensions, separated by comma’s.
Ahh, I hadn’t seen the extension field in editor.main.esv (was modifying it in the editor that comes up when you doubleclick plugin.xml), thanks!
As far as I can see the sdf editor works fine for .def files.
I’ll test it a bit more and then commit it unless you object :)
By all means!
Log in to post comments