javaeclipse-rcpeclipse-gef

Adding GEF4's Zest to Eclipse 4 RCP Application - Dependency nightmare


I am trying to create an Eclipse RCP application which uses GEF4's Zest.

What works OK:

I have downloaded Eclipse Neon last week and have been playing with it to do this. I have found a few GEF4 Zest examples online and I am able to run them in Eclipse using the simple "Run As > Java Application" option after adding a bunch of dependencies. In addition, I have created and successfully run a simple RCP application using the "Eclipse 4 RCP Application" wizard. So far so good.

What does not work and I need help with:

I am trying to add a simple single line of code from the GEF4 Zest sample code to this fresh "Eclipse 4 RCP Application":

... ZestContentViewer viewer = new ZestContentViewer(null); ...

I do have the following import as well: import org.eclipse.gef4.zest.fx.jface.ZestContentViewer;

It should be easy given I have already run this successfully by adding those dependencies manually to the first simple Java App.

However, I have spent the last three days trying to resolve the dependencies just to run this one line of code. I virtually and practically have spent three days and I am getting no where.

I have tried many possible fixes as I am going to mention below but the errors all end up being of the following:

Error type 1: A missing org.eclipse.swt.widgets.Control class. Error type 2: Two bundles trying to load the same class. Error type 3: One of com.google.inject or similar classes not being found. and there are a few other types of errors which I have encountered.

Note that in all cases I do compile the application with no errors. It's only at run-time when everything breaks apart.

What I have tried which did not help:

1) Create a separate bundle from those jar files and export them. 2) Play with Run Configurations to make sure the required plugins are loaded. 3) Adding "Required Plug-ins" to the MANIFEST.MF 4) Importing the jar files under the /lib/ in the project 5) Extracting all the jar file .class files and importing them into the project

And referring to lots of questions and answers including the following:

Adding zest libraries to Eclipse 4 app

Unfortunately none of these have helped.

Please give me some suggestions or if possible a "ready to use" empty project template which fixes this "GEF4 Zest in RCP" problem which I can modify and make work on my local machine.

Thanks


Solution

  • In order to setup an application with GEF Zest (or GEF4 Zest), you can follow the instructions given at github.

    If you still run into errors/problems after following these instructions, feel free to report them here and we will find a solution.