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
.deffile format has a different start symbol, as it starts with adefinitionkeyword. I think the SDF editor only supports theModulestart symbol and not theSDFstart symbol. I suppose the grammar could be changed so it only has one start symbol for both cases, but then theSDF.deffile in the plugin would have to be changed, which is really a generated file. It may be better to create a newSDF.sdfgrammar in the plugin and import theSDF.defone, and then add the start symbols. (To import a.deffile, add-Idef "${basedir}/lib/SDF.def"tobuild.main.xml>build.sdf.imports.) Note that theeditor.main.esvfile 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