Search code examples
eclipsegtkrcpe4

Running e4 RCP application on GTK2


This question is a continuation of my attempts to make e4 rcp application run on recent Linux distros.

I am starting my RCP application with the following option:

--launcher.GTK_version 
2

The first launch fails and it took me a while to figure out the reason - missing xmi file:

.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

How do I make the workbench load without this file for the first time?
There are absolutely no traces on where and why it fails to load.

The workbench.xmi is produced when application gets closed for the first time. And I don't get a chance of the first time. I manually produce this file by running the application without --launcher.GTK_version 2 switch. Then having this file in place makes the application run fine with GTK2. And this is what I am trying to achieve.

Any help on how to overcome this chicken-or-egg problem will be greatly appreciated.


Solution

  • I have found the problem, it was an internal issue in my app where I was doing some illegal things in WorkbenchWindowAdvisor.preWindowOpen(). Once I moved the 'criminal' code to WorkbenchWindowAdvisor.postWindowOpen(), the problem is gone. I still have no idea why workbench.xmi file had such a side effect, but it's not relevant anymore.

    Just a reminder, we were trying to force the e4 RCP application fall back into GTK2 because as of now the SWT and GTK3 is so full of bugs and it's hard to understand who is who in all this. Frankly, I think such versions like neon shouldn't be released to public use.

    What helped me to resolve the issue was using remote debugging, it was one of those cases when you have no idea what is going on inside your eclipse application.