Since feb 25 or 26 the Ctrl+Alt+B shortcut to build the project does not work anymore. Both on OSX and Windows.

Going to the menu: build project (by mouse) works fine.

Preferences > General > Keys > Build Project shows no key binding conflicts.
Changing the key binding to Ctrl+B doesn’t work either (removing it from build all as keybind). However Ctrl+B for build all works fine. So it seems to be happening after the key-bind triggers the build, the build just doesn’t start.

Is anyone else running on nightly experiencing the same problem?

Submitted by Daco Harkes on 27 February 2014 at 22:25

On 27 February 2014 at 22:38 Oskar van Rest commented:

I have the same issue on Linux since a day or two.


On 28 February 2014 at 00:00 Augusto commented:

Same here, though I did not relate that to a particular version. In any case, as per Gabriel’s suggestion, just changing anything in the project’s xml file and saving it restores the build capability (once, that is). Is that also the same on your side?


On 28 February 2014 at 14:17 Daco Harkes commented:

For me changing and saving build.main.xml file also restores ctrl+alt+b.


On 28 February 2014 at 14:21 Gabriël Konat commented:

I suspect that it has something to do with the current editor being a Stratego (or Spoofax editor), which somehow intercepts the shortcut, because the build project action in the project menu still works! It seems similar to the issue where a copy/paste with the keyboard in a Stratego editor would sometimes copy/paste from or into a different Stratego editor that was opened before.


On 28 February 2014 at 14:29 Daco Harkes commented:

I think you are right, I’ve noticed that it breaks after opening a str file.


On 5 March 2014 at 13:11 Guido Wachsmuth tagged !guwac

On 5 March 2014 at 13:13 Guido Wachsmuth commented:

The shortcut still works, if you focus to another view or editor. It’s only broken, when you focus an Spoofax (not only Stratego) editor.


On 18 March 2014 at 11:50 Gabriël Konat tagged !gohla

On 18 March 2014 at 18:06 Oskar van Rest commented:

It broke when I changed the selection provider in commit https://github.com/metaborg/spoofax/commit/55bc5bc48a2f657f33b4726970b076404e63be52
I’m now having a look into it.


On 18 March 2014 at 18:16 Gabriël Konat commented:

Great :) Today I also noticed that it also happens in an NaBL editor, so it’s not just limited to Stratego editors.


On 23 March 2014 at 07:53 Oskar van Rest commented:

I’ll have to blame IMP for this issue :-)
But I submitted a workaround: https://github.com/metaborg/spoofax/commit/5a066de35e393e3f300353864c43211f298cd906

By default all editors in Eclipse support the shortcut, so even if you open a .str or .sdf3 file with a text editor (Open With -> Text Editor), the short cut works. However, to create support for the properties view, I had to extend JFace’s TextSelection by implementing JFace’s IStructuredSelection. This turns the selection objects into both TextSelection and IStructuredSelection instances and somehow IMP disables the shortcut because the selection is an IStructuredSelection. I think IMP tries to obtain the projects that need to be build via the IStructuredSelection or something, but fails to do so. There are indeed some if (selection instanceof IStructuredSelection) {...} else {...} statements in IMP’s code but I haven’t been able to figure out where it’s actually happening.

The workaround simply doesn’t turn the selections into IStructuredSelections if the editor doesn’t provide a properties view. This means that since SDF and Stratego editors do not provide a properties view, you can always build your projects when such an editor is open.
I guess this workaround will do for now. Either we need to further investigate IMP’s code, or simply wait until we removed our dependency on IMP.

Log in to post comments