Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362147 - Make e4 rcp feature self-sufficient
Summary: Make e4 rcp feature self-sufficient
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 365289 (view as bug list)
Depends on: 361877
Blocks:
  Show dependency tree
 
Reported: 2011-10-26 23:58 EDT by Brian de Alwis CLA
Modified: 2012-01-24 09:22 EST (History)
9 users (show)

See Also:


Attachments
Patch to org.eclipse.sdk-feature (12.80 KB, patch)
2011-11-03 14:09 EDT, Brian de Alwis CLA
no flags Details | Diff
Patch to platform.ui's features/org.eclipse.e4.rcp/feature.xml (23.33 KB, patch)
2011-11-03 14:11 EDT, Brian de Alwis CLA
no flags Details | Diff
Patch to platform.ui's features/org.eclipse.e4.rcp/feature.xml (revised) (14.37 KB, patch)
2011-11-07 13:19 EST, Brian de Alwis CLA
no flags Details | Diff
Revised patch to org.eclipse.sdk-feature/features/org.eclipse.rcp (13.00 KB, patch)
2011-12-05 16:45 EST, Brian de Alwis CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2011-10-26 23:58:58 EDT
+++ This bug was initially created as a clone of Bug #361877 +++

Provisioning a pure Eclipse 4 application is too difficult at the moment, for two reasons.

Bug 361877 tracks the first issue, to do with ensuring that OSGi's Declarative Services is available.

A second reason is that we do not provide a feature that provides the fundamental base bundles required to provide the Eclipse 4 application platform.  The Eclipse 3.x platform provides the org.eclipse.rcp feature (cf http://wiki.eclipse.org/Eclipse_RCP_How-to#Feature).  We do have org.eclipse.e4.rcp feature, presumably intended to be analogous to org.eclipse.rcp, but it is incomplete: it is missing key bundles, including Declarative Services (org.eclipse.equinox.ds) and Equinox Events (org.eclipse.equinox.event), as well as a number of supporting bundles such as Batik.  Interestingly, org.eclipse.rcp has been updated for the Eclipse 4.x stream to incorporate the compatibility layer, and actually includes the org.eclipse.e4.rcp feature.

I'd suggest that we change org.eclipse.e4.rcp to be self-sufficient for a pure Eclipse 4.x application, and remove the overlapping bundles from org.eclipse.rcp.

(These issues are being encountered by prospective developers, e.g., as reported in the e4 forum at <http://www.eclipse.org/forums/index.php/mv/msg/246581/737042/>)
Comment 1 Brian de Alwis CLA 2011-11-03 14:09:28 EDT
Created attachment 206423 [details]
Patch to org.eclipse.sdk-feature

This is a patch against org.eclipse.sdk-feature/features/org.eclipse.rcp/feature.xml in the R4_HEAD branch that moves most of the platform requirements into the org.eclipse.e4.rcp feature.
Comment 2 Brian de Alwis CLA 2011-11-03 14:11:29 EDT
Created attachment 206424 [details]
Patch to platform.ui's features/org.eclipse.e4.rcp/feature.xml

Move the required bundles and features into this feature.  Instead of including the EMF bundles individually, I included the org.eclipse.emf.core and org.eclipse.emf.ecore bundles; although they *may* pull in a few additional bundles, it should shield us from changes in their implementation.  I think.
Comment 3 John Arthorne CLA 2011-11-03 15:19:06 EDT
(In reply to comment #2)
> Move the required bundles and features into this feature.  Instead of including
> the EMF bundles individually, I included the org.eclipse.emf.core and
> org.eclipse.emf.ecore bundles; although they *may* pull in a few additional
> bundles, it should shield us from changes in their implementation.  I think.

-1 on the EMF change. We just switched from including EMF to requiring it at the request of the EMF team. It is quite important for their consumer community to have this flexibility. See bug 356644 for details.
Comment 4 Brian de Alwis CLA 2011-11-07 13:19:40 EST
Created attachment 206540 [details]
Patch to platform.ui's features/org.eclipse.e4.rcp/feature.xml (revised)

(In reply to comment #3)
> -1 on the EMF change. We just switched from including EMF to requiring it at
> the request of the EMF team. It is quite important for their consumer community
> to have this flexibility. See bug 356644 for details.

Oops, makes sense — I hadn't realized features now have <requires>.  Reverted that change and backed out the inadvertent line-ending changes.

The downside to not using includes is that products still have to include the org.eclipse.emf.common and org.eclipse.emf.ecore features.  At least PDE doesn't cause them to be included when running from a .product specification in my tests.

The final list of required bundles is as follows.  The CSS + Batik bundles could arguably be put into a separate org.eclipse.e4.rcp.css feature.

com.ibm.icu
javax.annotation
javax.inject
javax.xml
org.apache.batik.css
org.apache.batik.util
org.apache.batik.util.gui
org.eclipse.core.commands
org.eclipse.core.contenttype
org.eclipse.core.databinding
org.eclipse.core.databinding.beans
org.eclipse.core.databinding.observable
org.eclipse.core.databinding.property
org.eclipse.core.expressions
org.eclipse.core.jobs
org.eclipse.core.runtime
org.eclipse.e4.core.commands
org.eclipse.e4.core.contexts
org.eclipse.e4.core.di
org.eclipse.e4.core.di.extensions
org.eclipse.e4.core.services
org.eclipse.e4.ui.bindings
org.eclipse.e4.ui.css.core
org.eclipse.e4.ui.css.swt
org.eclipse.e4.ui.css.swt.theme
org.eclipse.e4.ui.di
org.eclipse.e4.ui.model.workbench
org.eclipse.e4.ui.services
org.eclipse.e4.ui.widgets
org.eclipse.e4.ui.workbench
org.eclipse.e4.ui.workbench.renderers.swt
org.eclipse.e4.ui.workbench.renderers.swt.cocoa
org.eclipse.e4.ui.workbench.swt
org.eclipse.e4.ui.workbench3
org.eclipse.equinox.app
org.eclipse.equinox.common
org.eclipse.equinox.concurrent
org.eclipse.equinox.ds
org.eclipse.equinox.event
org.eclipse.equinox.launcher
org.eclipse.equinox.launcher
org.eclipse.equinox.launcher.cocoa.macosx
org.eclipse.equinox.launcher.cocoa.macosx
org.eclipse.equinox.launcher.cocoa.macosx.x86_64
org.eclipse.equinox.launcher.gtk.aix.ppc
org.eclipse.equinox.launcher.gtk.aix.ppc64
org.eclipse.equinox.launcher.gtk.linux.ppc64
org.eclipse.equinox.launcher.gtk.linux.s390
org.eclipse.equinox.launcher.gtk.linux.s390x
org.eclipse.equinox.launcher.gtk.linux.x86
org.eclipse.equinox.launcher.gtk.linux.x86_64
org.eclipse.equinox.launcher.gtk.solaris.sparc
org.eclipse.equinox.launcher.gtk.solaris.x86
org.eclipse.equinox.launcher.win32.win32.x86
org.eclipse.equinox.launcher.win32.win32.x86_64
org.eclipse.equinox.preferences
org.eclipse.equinox.registry
org.eclipse.equinox.simpleconfigurator
org.eclipse.equinox.util
org.eclipse.jface
org.eclipse.jface.databinding
org.eclipse.osgi
org.eclipse.osgi.services
org.eclipse.swt
org.eclipse.swt.cocoa.macosx
org.eclipse.swt.cocoa.macosx
org.eclipse.swt.cocoa.macosx.x86_64
org.eclipse.swt.gtk.aix.ppc
org.eclipse.swt.gtk.aix.ppc64
org.eclipse.swt.gtk.hpux.ia64_32
org.eclipse.swt.gtk.linux.ppc64
org.eclipse.swt.gtk.linux.s390
org.eclipse.swt.gtk.linux.s390x
org.eclipse.swt.gtk.linux.x86
org.eclipse.swt.gtk.linux.x86_64
org.eclipse.swt.gtk.solaris.sparc
org.eclipse.swt.gtk.solaris.x86
org.eclipse.swt.win32.win32.x86
org.eclipse.swt.win32.win32.x86_64
org.w3c.css.sac
org.w3c.dom.smil
org.w3c.dom.svg
Comment 5 Paul Webster CLA 2011-12-01 07:30:08 EST
*** Bug 365289 has been marked as a duplicate of this bug. ***
Comment 6 Paul Webster CLA 2011-12-01 08:20:30 EST
*** Bug 365289 has been marked as a duplicate of this bug. ***
Comment 7 Paul Webster CLA 2011-12-02 13:23:32 EST
I wasn't able to apply the patches as they were (potentially to many changes).  Brian, could you please take another crack at them?

PW
Comment 8 Brian de Alwis CLA 2011-12-05 16:45:02 EST
Created attachment 207949 [details]
Revised patch to org.eclipse.sdk-feature/features/org.eclipse.rcp

Revised patch against HEAD
Comment 9 Brian de Alwis CLA 2011-12-05 16:49:23 EST
And I've pushed up a revised branch for eclipse.platform.ui.git to 

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/log/?h=bdealwis/bug/362147-feature-split

I made one change: I also included the Equinox console and the Felix gogo shell bundles.
Comment 10 Raj CLA 2011-12-06 06:57:03 EST
Hi Paul,

I had applied all these patches and tried to running, but still I am getting same "Handler service cannot be null" problem. Previously I had created the bug with "https://bugs.eclipse.org/bugs/show_bug.cgi?id=365289" details.

Can you please help me how I can make progress?

My launch configuration is:
eclipse.buildId=M20110912-1510
java.version=1.6.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -verbose
Command-line arguments:  -os win32 -ws win32 -arch x86 -verbose -console -consoleLog -console -consoleLog -clean

The plugins are working on eclipse platform plugins 3.2 but After updating platform plugins our product launch throwing this exception. Is it possible that there any guide to upgrade from eclipse 3.2 to 4.1.1 buildID M20110912-1510

Thanks.
Rajesh
Comment 11 Paul Webster CLA 2011-12-06 07:44:52 EST
(In reply to comment #10)
>
> 
> The plugins are working on eclipse platform plugins 3.2 but After updating
> platform plugins our product launch throwing this exception. Is it possible
> that there any guide to upgrade from eclipse 3.2 to 4.1.1 buildID
> M20110912-1510

you must delete your launch config and then re-create it from a feature based product, if you are using these patches.

For more help with your specific problem, please post to the E4 forum at http://www.eclipse.org/forums/

PW
Comment 12 Lars Vogel CLA 2012-01-18 05:03:41 EST
Can this applied to master? Would be nice to have a working feature for e4 RCP applications?
Comment 13 Paul Webster CLA 2012-01-18 06:57:25 EST
John, could you go through and vet the org.eclipse.e4.rcp feature is the e4 equivalent of the 3.x org.eclipse.rcp feature, and 4.x org.eclipse.rcp simply includes that and adds the extra IWorkbench RCP bundles?

PW
Comment 14 John Arthorne CLA 2012-01-18 14:00:00 EST
Brian I have a couple of questions. Since org.eclipse.rcp has been migrated to Git I wasn't able to apply that patch, but I went through the process manually and I want to confirm that we end up with only the following bundles in org.eclipse.rcp:

org.eclipse.help
org.eclipse.rcp
org.eclipse.ui
org.eclipse.ui.workbench
org.eclipse.update.configurator

Also, your patch seems to have added org.eclipse.equinox.concurrent which wasn't in either feature before. Is there a real dependency on that somewhere?
Comment 15 John Arthorne CLA 2012-01-18 14:41:18 EST
Pushed org.eclipse.e4.rcp change to master:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ad5c5a7a6568b7a6a7bf7aeea68af2373e895d20

Pushed org.eclipse.rcp change to R4_HEAD:

http://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?h=R4_HEAD&id=bad52f1eadf45f5193496752f59e879150427650

We'll need a test build to verify.
Comment 16 Lars Vogel CLA 2012-01-18 14:47:52 EST
Thanks John, that was fast!
Comment 17 Brian de Alwis CLA 2012-01-18 14:55:49 EST
(In reply to comment #14)
> I went through the process manually
> and I want to confirm that we end up with only the following bundles in
> org.eclipse.rcp:
> 
> org.eclipse.help
> org.eclipse.rcp
> org.eclipse.ui
> org.eclipse.ui.workbench
> org.eclipse.update.configurator

That's right.

> Also, your patch seems to have added org.eclipse.equinox.concurrent which
> wasn't in either feature before. Is there a real dependency on that somewhere?

It's a real dependency: org.eclipse.equinox.concurrent is depended upon by both org.eclipse.e4.core.services and org.eclipse.e4.ui.workbench.

My test cases were the E4 Contacts demo (once configured to only specify the org.eclipse.e4.rcp feature; requires creating a trivial org.eclipse.e4.demo.contacts.feature feature) and the RCP Mail example (once configured to use the org.eclipse.rcp feature).
Comment 18 John Arthorne CLA 2012-01-18 16:08:45 EST
> (In reply to comment #14)
> > Also, your patch seems to have added org.eclipse.equinox.concurrent which
> > wasn't in either feature before. Is there a real dependency on that somewhere?
> 
> It's a real dependency: org.eclipse.equinox.concurrent is depended upon by both
> org.eclipse.e4.core.services and org.eclipse.e4.ui.workbench.

I have opened bug 369006 to look at this. This looks like an experiment that never went anywhere and I can't find any platform code using it. I'd like to consider removing it rather than adding a new bundle to our RCP stack that we aren't really using.
Comment 19 Brian de Alwis CLA 2012-01-18 17:05:19 EST
I changed the e4 Contacts Demo to be feature-based to help identify missing bundles in the future.

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=113de722707193caf9943d1802f52c2b62afe68a
Comment 20 John Arthorne CLA 2012-01-19 09:17:24 EST
Looks like this patch was missing the addons bundle from org.eclipse.e4.rcp. None of my tests found this because I guess there is no direct dependency on it. Anyway Paul has fixed it up.
Comment 21 John Arthorne CLA 2012-01-24 09:22:43 EST
All released.