0

My beginner question is likely very badly phrased but I looked at

https://wiki.eclipse.org/E4/Install

and did not work out the answer.

On Mars RCP, I want to create a LifeCycle class which needs to use the package org.eclipse.e4.ui.model.application.ui and I have not found a way to determine which of the feature categories displayed by the download sites includes the containing plug in.

  • Since that is part of the `org.eclipse.e4.ui.model.workbench` plugin you almost certainly already have this. – greg-449 Sep 09 '15 at 10:01
  • Yes, you are absolutely right, Greg, I looked at this plugin in the Package Explorer (which, as you guessed, I already had) and it includes org.eclipse.e4.ui.model.application.ui. Thank you. – Joe Fernandez Sep 10 '15 at 08:11

1 Answers1

0

Are you using a target platform definition? If not, the respective plugin should already be in the target platform (i.e., the set of plugins you have available) as you will be using the running platform (of your IDE) as target. If you are developing on Mars against Mars, that's the case.

Also, if you start developing an E4 application, do so by creating a new application project via the New Wizard in Eclipse (File > New > Other > Eclipse 4 > Eclipse 4 Application Project). The wizard will give you the option (in Step 3 "Configure application with special values") to "Add a lifecycle class". This will also add the org.eclipse.e4.ui.model.application.ui plugin to the dependencies.

Note that such a default lifecycle class itself does not have any dependencies on org.eclipse.e4.ui.model.application.ui. Below is a list of imports from this default class.

import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate;
import org.eclipse.e4.ui.workbench.lifecycle.PreSave;
import org.eclipse.e4.ui.workbench.lifecycle.ProcessAdditions;
import org.eclipse.e4.ui.workbench.lifecycle.ProcessRemovals;

Btw, the plugin is included in the Eclipse RCP feature. If you are looking for it on a Software Site, use http://download.eclipse.org/releases/mars/, uncheck "Group by Category" in the Wizard, and search for Eclipse RCP.

s.d
  • 4,017
  • 5
  • 35
  • 65
  • I followed your detailed instructions here and it worked as you said. To answer your question, I started with a platform definition but when I ran into a problem I created a minimal test program on Mars to use the running platform. I would have used a different set of Wizard options. BTW, is there a place where I can look up what the different Wizard options actually do or does it need forensic analysis of the various config files generated? (and should this be another question :-) ) Thank you for the detailed & helpful answer. – Joe Fernandez Sep 10 '15 at 07:40
  • Glad I could help. Please consider upvoting and accepting the answer. As for understanding the Wizard options - most are pretty straightforward - have a look at the tutorials at http://www.vogella.com or consult A. Blewitt's book on e4 development (cf. http://alblue.bandlem.com/2013/07/eclipse-book-published.html). – s.d Sep 10 '15 at 09:14
  • Tried several times to upvote but it has no effect, probably because I am a new registrant. – Joe Fernandez Sep 13 '15 at 09:04