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

On 29 November 2010 at 10:52 Lennart Kats commented:

The .def file format has a different start symbol, as it starts with a definition keyword. I think the SDF editor only supports the Module start symbol and not the SDF start symbol. I suppose the grammar could be changed so it only has one start symbol for both cases, but then the SDF.def file in the plugin would have to be changed, which is really a generated file. It may be better to create a new SDF.sdf grammar in the plugin and import the SDF.def one, and then add the start symbols. (To import a .def file, add -Idef "${basedir}/lib/SDF.def&quot to build.main.xml>build.sdf.imports.) Note that the editor.main.esv file supports multiple file extensions, separated by comma’s.


On 29 November 2010 at 11:39 Tobi Vollebregt commented:

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 :)


On 29 November 2010 at 11:45 Tobi Vollebregt closed this issue.

On 29 November 2010 at 12:40 Lennart Kats commented:

By all means!

Log in to post comments