Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Menu Item Handler Execute() Results in IllegalStateException: Workbench has not been created yet(Menu Item Handler Execute() to Present Wizard Class Throws java.lang.IllegalStateException: Workbench has not been created yet)
Menu Item Handler Execute() Results in IllegalStateException: Workbench has not been created yet [message #1455934] Wed, 29 October 2014 22:44 Go to next message
Patty Eilers is currently offline Patty EilersFriend
Messages: 10
Registered: October 2014
Junior Member
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!
Re: Menu Item Handler Execute() Results in IllegalStateException: Workbench has not been created yet [message #1456713 is a reply to message #1455934] Thu, 30 October 2014 16:49 Go to previous message
Patty Eilers is currently offline Patty EilersFriend
Messages: 10
Registered: October 2014
Junior Member
After further investigation it appears that the problem has to do with the fact that I am developing an e4 (Eclipse 4.x) RCP application that requires 3rd party components developed for Eclipse 3.x.

For the benefit of others running into this same problem, I believe a good resource to help work around this may be Jonas Helming's tutorial on "soft migration" from Eclipse 3.x to 4.x.
Previous Topic:KeyBindings & KeysPreferencePage
Next Topic:Shortcuts / Keybinding doesn't work
Goto Forum:
  


Current Time: Fri Apr 26 12:14:23 GMT 2024

Powered by FUDForum. Page generated in 0.02758 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top