Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF4 Zest in Eclipse 4 RCP(Dependency nightmare adding GEF4's Zest to Eclipse 4 RCP Application)
GEF4 Zest in Eclipse 4 RCP [message #1737535] Sat, 09 July 2016 13:21 Go to next message
RM ZQ is currently offline RM ZQFriend
Messages: 2
Registered: July 2016
Junior Member
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 #1737696 is a reply to message #1737535] Tue, 12 July 2016 05:51 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: Lünen
Senior Member
As you have not linked your original StackOverflow post here, its hard to give a qualified answer, as you have not provided any details (stack traces, manifest file).
Please provide these details (or a link to the post where you provided them), so we are able to help.

[Updated on: Tue, 12 July 2016 10:45]

Report message to a moderator

Re: GEF4 Zest in Eclipse 4 RCP [message #1738145 is a reply to message #1737696] Sat, 16 July 2016 08:11 Go to previous messageGo to next message
RM ZQ is currently offline RM ZQFriend
Messages: 2
Registered: July 2016
Junior Member
Hi Alex

There is no other information. The steps to reproduce the issue are listed in my original message. I can't post a link here because the forum prevents it for new members.

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.

Maybe a note to improve the E4 RCP Application Wizard?

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).

The issue is that using the current latest "Eclipse Neon for RCP Developers" on Linux Ubuntu 12.04, I can easily use the E4 RCP Wizard to create a RCP and run it with no issues. However, the same package for MacOSX (I mean the current latest "Eclipse Neon for RCP Developers" for MacOSX), if you use a Wizard to generate the same plugin (the E4 RCP Application) then you will get an error like this:

"Unresolved resource Application.e4xmi"

There is another error which follows this which says something like "Couldn't find bundle /plugins/testrcp01/Application.e4xmi".

Sorry I don't have the exact message as I am on my phone right now but it's really that easy to reproduce.

I did compare the generated sources and files from the MacOSX EclipseNeon with the ones I generated on Linux Ubuntu 12.04 and they are identical. I have no other modifications to the Eclipse and both systems run JDK1.8 (although on Mac I have 8u77 but on Linux I have 8u92 from Oracle). I have also made sure that I have added "Required Bundles" in both Run Configurations.

Searching the net doesn't show anything why this could happen.

Any ideas why identical EclipseNeon packages, both with JDK1.8 and identical projects fresh from the Wizard would have this difference? One running the RCP fine but the other telling me it can't find Application.e4xmi?

If you need logs then can you please explain which log I should post and how I can generate it?

Thanks
Re: GEF4 Zest in Eclipse 4 RCP [message #1738150 is a reply to message #1738145] Sat, 16 July 2016 09:16 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: Lünen
Senior Member
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.
Previous Topic:[GEF4] Immutable geometry primitives
Next Topic:Feature Request Draw2d (ToolTip)
Goto Forum:
  


Current Time: Fri Sep 21 13:24:21 GMT 2018

Powered by FUDForum. Page generated in 0.02812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top