Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 152844

Summary: RCP application cannot use GEF feature and update because of a dependency on the plug-in org.eclipse.platform
Product: [Tools] GEF Reporter: Ian Leslie <ian.leslie>
Component: GEF-Legacy GEF (MVC)Assignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, rnc000, sandro.weiser
Version: 3.2   
Target Milestone: 3.3.1 (Europa SR1)   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ian Leslie CLA 2006-08-04 10:21:21 EDT
I created and RCP application using the GEF feature.  Everything works except for update.  When I bring up the update dialog box I get the following error:

The current configuration contains errors and this operation can have unpredictable results.
  Graphical Editing Framework (3.2.0.v20060626) requires plug-in "org.eclipse.platform (3.2.0)", or compatible.

I only see this error in the update dialog box not in the Product Configuration window.  The Product Configuration window says all is well (including the status of the GEF feature).  I looked at the GEF feature and I found that it says it requires the org.eclipse.platform plug-in:

org.eclipse.gef_3.2.0.v20060626\feature.xml contains:
<requires>
  <import plugin="org.eclipse.platform" version="3.2.0" match="compatible" /> </requires>

However the plug-in org.eclipse.gef_3.2.0.v20060626.jar contains the following in its manifest.mf
Require-Bundle: org.eclipse.draw2d;visibility:=reexport;bundle-version
 ="[3.2.0,4.0.0)",org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.
 0)",org.eclipse.ui.views;resolution:=optional;bundle-version="[3.2.0,
 4.0.0)",org.eclipse.ui.workbench;bundle-version="[3.2.0,4.0.0)",org.e
 clipse.jface;bundle-version="[3.2.0,4.0.0)"

Which does not have a mention of the plug-in org.eclipse.platform only plug-ins included in the plaform feature.  The plug-ins GEF requires are also part of the RCP feature.  So GEF could be changed to require the RCP feature instead.  See the following thread in the GEF forum:

http://www.eclipse.org/newsportal/article.php?id=17354&group=eclipse.tools.gef#17354
Comment 1 Ian Leslie CLA 2006-08-04 10:23:39 EDT
I have verified that this works for my RCP application.  I if I replace:
<requires>
  <import plugin="org.eclipse.platform" version="3.2.0" match="compatible" /> 
</requires>
in the feature.xml file for GEF in my target platform with:
<requires>
  <import plugin="org.eclipse.rcp" version="3.2.0" match="compatible" /> 
</requires>

when I create my deployed image it works fine.
Comment 2 Randy Hudson CLA 2006-08-14 14:21:44 EDT
This change seems like it might break products that are using GEF 3.2.0.
Comment 3 Ian Leslie CLA 2006-08-15 11:21:00 EDT
I do not see what would break but I am sure you know better than I.

The real issue here is that as it stands now RCP applications cannot use GEF and update in the same application.  If there is another way to solve that problem then that would be fine too.  I should have written this bug's summary to describe the root problem rather than to propose a solution.
Comment 4 Anthony Hunter CLA 2006-09-14 09:54:52 EDT
I will test in GEF 3.2.2.
Comment 5 Anthony Hunter CLA 2007-08-14 13:09:04 EDT
      <import plugin="org.eclipse.platform" version="3.2.0" match="compatible"/>

needs to be replaced with the correct plug-in dependencies

      <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/>
      <import plugin="org.eclipse.ui.views" version="3.2.0" match="compatible"/>
      <import plugin="org.eclipse.ui.workbench" version="3.2.0" match="compatible"/>
      <import plugin="org.eclipse.jface" version="3.2.0" match="compatible"/>

Some of these should be at 3.3, but I will leave so I do not break anyone since the org.eclipse.gef plug-in also specifies bundle-version="[3.2.0,4.0.0)"
Comment 6 Anthony Hunter CLA 2007-08-14 14:36:34 EDT
Committed to R33_Maintenance and HEAD.