Menu Item Handler Execute() Results in IllegalStateException: Workbench has not been created yet [message #1455934] |
Wed, 29 October 2014 18:44  |
Eclipse User |
|
|
|
I am developing an RCP application using the e4 Application Model and tools.
I have created an application model with a menu handler that attempts to open a WizardDialog object using an object of a class type that extends a class within an external JAR (included as an OSGi plug-in in the manifest.mf).
The application launches fine but when the menu handler is executed the following error occurs:
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalStateException: Workbench has not been created yet.
The handler class follows:
public class NewProject {
@Execute
public void execute(Shell shell) {
WizardDialog dialog = new WizardDialog(shell, new CreateDefaultProjectWizard());
if (dialog.open() == WizardDialog.OK) {
System.out.println("Handler called for New Project");
}
}
}
Shouldn't the Workbench have already been created if the application launches successfully and the main window is presented? Can anyone suggest why this might be happening and how to resolve it?
Thanks much!
|
|
|
|
Powered by
FUDForum. Page generated in 0.05387 seconds