In nightly we now have our own Spoofax editor instead of the IMP editor. However, the metadata in a workspace determines in which editor a file gets opened, if such metadata exists for that file (or extension?). This means that files in old workspaces will be opened in the IMP editor, which causes weird behaviour. Syntax highlighting seems to work but error checking does not, neither does the outline.

A workaround is to either delete the workspace and start a fresh one, or to manually select which editor should be used to open a file (right click, Open With -> Other… -> Spoofax Editor). Selecting the editor for one file seems to update all files of that extension.

Is there any way to automate this so that legacy workspaces don’t break?

Submitted by Gabriël Konat on 13 August 2013 at 02:59

On 13 August 2013 at 19:52 Oskar van Rest commented:

Quite surprisingly Eclipse has an editor association override extension point for problems like these.

This commit fixes most of the problem. If a user now opens a file that was last opened with the IMP editor, a Spoofax editor is opened instead. However, IMP editors that were open when you last shut down Eclipse, are still reopened upon start-up. I’ll add some code to UniversalEditor to close such editors and possibly reopen the file with the default editor (= Spoofax editor).


On 13 August 2013 at 20:17 Oskar van Rest commented:

I reverted the commit because older versions of Eclipse do not support it. It broke the build on the build farm.

Because there does not seem to be another nice way to solve this problem, we should maybe show a pop-up when an IMP editor is opened, explaining the user what to do.


On 20 August 2013 at 01:42 Oskar van Rest commented:

Fixed with these commits.


On 20 August 2013 at 01:42 Oskar van Rest closed this issue.

Log in to post comments