Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » porting sirius prototype from eclipse 3 to eclipse 4(java.lang.IllegalStateException: Workbench has not been created yet.)
porting sirius prototype from eclipse 3 to eclipse 4 [message #1856253] Tue, 29 November 2022 16:41 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: porting sirius prototype from eclipse 3 to eclipse 4 [message #1856355 is a reply to message #1856253] Tue, 06 December 2022 11:00 Go to previous message
Arnault Bonafos is currently offline Arnault BonafosFriend
Messages: 5
Registered: November 2022
Junior Member
To answer my own question what seems to be the solution is to run sirius as an e3 plugin through the compatibility layer, this way sirius can be run in a e4 environnement (Application.e4xmi).
I've found a great tutorial that explains and demonstrates how to enable the compatibility layer, here is the link:
https://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/

Hope this helps.
Previous Topic:Opening a sirius aird with an E4 application
Next Topic:If statement for edge creation not working as expected
Goto Forum:
  


Current Time: Thu Mar 28 14:17:11 GMT 2024

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

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

Back to the top