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

Bug 440986

Summary: Minimize dependencies of org.eclipse.gef4.dot and org.eclipse.gef.dot4.ui
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steeg
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-08-01 09:34:57 EDT
Currently, org.eclipse.gef4.dot.ui introduces dependencies on JDT and PDE. We should adopt the bundle to not require these dependencies, so GEF4 can be bundled against the RCP platform alone. We have done that for one of our products already, so this is feasible.
Comment 1 Fabian Steeg CLA 2014-08-01 20:11:31 EDT
Neither JDT nor PDE were actually used any longer in org.eclipse.gef4.dot.ui. I probably forgot these when moving the Zest view to a different bundle. I've removed the dependencies:
http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=cb666a0fcc148a
Comment 2 Alexander Nyßen CLA 2014-08-02 04:01:59 EDT
Much better! 

Couldn't we try to further minimize the dependencies (try to remove the unnecessary reexports and only include optional, what is used for generation and not at runtime)? 

I have created a new sample Xtext-language using 2.6.0 and took a look at the dependencies that were generated there. From this, it seems the following should already be sufficient (I tested it and it looks ok):

...
Bundle-Name: GEF4 DOT
Bundle-SymbolicName: org.eclipse.gef4.dot;singleton:=true
Bundle-Version: 0.1.0.qualifier
Require-Bundle: org.eclipse.xtext;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
 org.eclipse.xtext.generator;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
 org.eclipse.emf.mwe2.launch;bundle-version="2.0.0";resolution:=optional,
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.gef4.graph,
 org.eclipse.gef4.layout
Import-Package: org.apache.log4j
...

...
Bundle-Name: org.eclipse.gef4.dot.ui
Bundle-SymbolicName: org.eclipse.gef4.dot.ui;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: org.eclipse.gef4.internal.dot.DotUiActivator
Require-Bundle: org.eclipse.core.runtime,
 org.eclipse.core.filesystem;bundle-version="1.3.100",
 org.eclipse.xtext.ui;bundle-version="[2.0.0,3.0.0)",
 org.eclipse.xtext.ui.shared;bundle-version="[2.0.0,3.0.0)",
 org.eclipse.xtext.builder;bundle-version="[2.0.0,3.0.0)",
 org.eclipse.ui,
 org.eclipse.ui.editors,
 org.eclipse.ui.ide,
 org.antlr.runtime,
 org.eclipse.gef4.layout;bundle-version="0.1.0",
 org.eclipse.gef4.dot;bundle-version="0.1.0"
Import-Package: org.apache.log4j
...
Comment 3 Fabian Steeg CLA 2014-08-03 17:36:36 EDT
(In reply to Alexander Nyßen from comment #2)

I have updated the dependencies according to your suggestion (I have removed the version numbers for the gef4 dependencies and the upper bounds for Xtext):
http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=7965a7e9d915a2
Comment 4 Alexander Nyßen CLA 2014-08-04 05:00:10 EDT
I re-added the versions for the GEF4 bundles, as we have set them in all other cases as well.
Comment 5 Alexander Nyßen CLA 2014-08-07 10:48:31 EDT
I have considered https://wiki.eclipse.org/Version_Numbering again w.r.t. to the version ranges. IMHO we should have them for all external dependencies. However, I will open a separate bug for this (where we should also clarify how to deal with reexports).