Community
Participate
Working Groups
Steps to reproduce: 1. Start a fresh installation of eclipse >=2021.06( without any sphinx plugins) - the workspace selection dialog will appear. There is a setting in Preferences -> General -> Startup and Shutdown -> Workspaces: "Prompt for workspace on startup" that can be used to always enforce the workspace selection dialog. 2. Install Sphinx plugins (tested with 0.11.2 and 0.12.0) shutdown and start eclipse again (do not use "Restart" from the File menu) - the workspace selection dialog will never show again... 3. Uninstall all Sphinx plugins and the workspace selection dialog will be back. After some digging we found out that the new Service-Component org.eclipse.e4.ui.internal.workbench.ModelAssembler seems to be the cause. The ModelAssembler activates EMF which activates Sphinx. And Sphinx assumes the workspace to be already set (defaults to $USER_HOME\workspace), so it loads it -> workspace selection dialog can never appear.
(In reply to Raphael Weber from comment #0) Hi Raphael, thanks for reporting this. Many of the sphinx plugins uses eager loading through its Activator, so I have some suspects what might be causing this. I will try to look into this on next week
You're right, the ModelAssembler loads EMF plugins which in turn instantiates every extension. (the first from sphinx I've encountered is org.eclipse.sphinx.emf.resource.SphinxManagedModelFileContentHandlerImpl) This causes the workspace to be accessed via org.eclipse.sphinx.emf.Activator.Implementation.startWorkspaceSynchronizing() before the application could start and prompt the user for the workspace settings (org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(Shell, Map)) However, this is not the only point where this happens. So far I've found the following accesses to the workspace from the context of a bundle activation: - org.eclipse.sphinx.emf.Activator.Implementation.start(BundleContext) - org.eclipse.sphinx.platform.internal.Activator.start(BundleContext) - org.eclipse.sphinx.emf.workspace.Activator.Implementation.start(BundleContext)
Hi Balazs, any chances to get this fixed?
Hi Raphael, unfortunately this kind of eager behavior is inherent to sphinx and I don't see any quick way to resolve this without breaking functionality. There were a change replacing the affected calls to using ServiceCaller (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=580733), however it still enforces the initialization so this issue persists. Therefore the answer to your question currently is no, I don't work on this actively.
This issue will be migrated to gitlab.
This issue has been migrated to https://gitlab.eclipse.org/eclipse/sphinx/org.eclipse.sphinx/-/issues/6.