Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » java.lang.IllegalStateException: Workbench has not been created yet.(porting sirius prototype from eclipse 3 to eclipse 4)
java.lang.IllegalStateException: Workbench has not been created yet. [message #1856247] Tue, 29 November 2022 14:05 Go to next message
Arnault Bonafos is currently offline Arnault BonafosFriend
Messages: 5
Registered: November 2022
Junior Member
Hello,

We have a prototype with eclipse 3 on top of sirius which creates a new project and opens a window, the window is almost empty but it works fine for a demo.

We are porting this prototype to eclipse 4 and after porting some Wizard code to Open an existing project we are seeing an IllegalStateException after completion of the wizard:

java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:102)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.scheduleNewWhenPossible(OpenRepresentationsFileJob.java:137)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.manager.ModelingProjectManagerImpl.loadAndOpenRepresentationsFiles(ModelingProjectManagerImpl.java:199)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.manager.ModelingProjectManagerImpl.loadAndOpenRepresentationsFiles(ModelingProjectManagerImpl.java:152)
at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.manager.ModelingProjectManagerImpl.loadAndOpenRepresentationsFile(ModelingProjectManagerImpl.java:132)
at org.eclipse.sirius.ui.tools.api.views.modelexplorerview.resourcelistener.DefaultModelingProjectResourceListener.resourceChanged(DefaultModelingProjectResourceListener.java:101)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:307)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:297)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:160)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:388)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1514)
at Org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:50)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

I've searched the code an on internet and it could be that I am not calling PlatformUI.createAndRunWorkbench, this used to be called in an Application startup in eclipse 3 but I'm not sure of the corresponding concept with eclipse4.
Any help appreciated!
Re: java.lang.IllegalStateException: Workbench has not been created yet. [message #1856251 is a reply to message #1856247] Tue, 29 November 2022 16:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32663
Registered: July 2009
Senior Member
Ask here about Sirius:

https://www.eclipse.org/forums/index.php?t=thread&frm_id=262




Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Error while installing the new software in the eclipse for Java
Next Topic:Does Eclipse work on a Raspberry Pi 3 B+
Goto Forum:
  


Current Time: Sat Feb 04 15:17:02 GMT 2023

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

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

Back to the top