GEF4 Zest in Eclipse 4 RCP [message #1737535] |
Sat, 09 July 2016 09:21  |
Eclipse User |
|
|
|
Hi Guys
I am trying to create an Eclipse RCP application which uses GEF4's Zest.
Could someone please give me some suggestions or if possible a "ready to use" empty project template which fixes this "GEF4 Zest in RCP" dependency problem out of box which I can modify and make work on my local machine?
Posted this question on Stackoverflow and then realised I might be better off posting it here - so I just joined and am posting it here:
== 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.
Thanks for any help
|
|
|
|
|
Re: GEF4 Zest in Eclipse 4 RCP [message #1738150 is a reply to message #1738145] |
Sat, 16 July 2016 05:16  |
Eclipse User |
|
|
|
RM ZQ wrote on Sat, 16 July 2016 10:11
However, I have managed to fix that issue finally by adding VM arguments that force the RCP Application to load the Eclipse OSGI SWT library. It is really not easy for a starter to understand there is a difference between the SWT bundles that you can add to plugin.xml and this specific bundle which must be loaded via a VM argument.
This is fine. However, there is no such thing as an 'Eclipse OSGI SWT library'. You are probably referring to the SWT JNI libraries, which are required by the SWT OSGi bundle (or more precisely the platform specific SWT OSGi fragments) to interact with the native widget toolkits on the respective platforms (e.g. GTK, Cocoa, etc.).
RM ZQ wrote on Sat, 16 July 2016 10:11
Maybe a note to improve the E4 RCP Application Wizard?
This is probably a good idea. I propose that you contact the E4 guys to notify them about this (or even raise a Bugzilla against E4).
RM ZQ wrote on Sat, 16 July 2016 10:11
Anyway, now I have another strange problem which I would like to also post here (this is a good thread for starters in E4 RCP Applications).
No, it isn't. This newsgroup is related to GEF, not E4. If you have problems with GEF, or with integrating GEF with E4, this is the right place to ask and discuss. However, if you have problems with E4, this is not the right place. Please refer to the dedicated E4 newsgroup (https://www.eclipse.org/forums/index.php/f/12/) for such kind of questions.
|
|
|
Powered by
FUDForum. Page generated in 0.08375 seconds