| Summary: | Illegal State Exception: Workbench has not been created yet when running in headless mode | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Alain Picard <picard> |
| Component: | Core | Assignee: | Cedric Brun <cedric.brun> |
| Status: | CLOSED FIXED | QA Contact: | Belqassim Djafer <belqassim.djafer> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cedric.brun, maxime.porhel, pierre-charles.david |
| Version: | unspecified | Keywords: | triaged |
| Target Milestone: | 3.0.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/47018 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ced42b0e68fae6b6eea898136ca8cdafb9d75d13 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 462490 | ||
I've pushed the proposed change as a Gerrit review, at https://git.eclipse.org/r/#/c/46265/. Currently just to see if this causes any regression (I don't see why it would). Note that the whole logging logic in that class is conditioned by a preference: SiriusUIPreferencesKeys.PREF_REACT_TO_PERMISSION_ISSUES_BY_GRAPHICAL_DISPLAY. It is not a preference accessible in the Eclipse UI, but if you set it explicitly to false in your code, it should fix the issue without waiting for a new release of Sirius. Maybe Sirius should set the initial value of that preference to false by itself when running in headless mode. I stumbled on the same issue when launching the EcoreTools tests. I proposed a patch without even knowing about the one you provided Pierre Charles, it is slightly different as it will check for the relevance of the exception first. https://git.eclipse.org/r/#/c/47018/ Here is an test failing because of this : https://hudson.eclipse.org/sirius/view/ecoretools/job/ecoretools-master/157/testReport/org.eclipse.emf.ecoretools.design.tests/VsmValidationTests/isValid/ Gerrit change https://git.eclipse.org/r/47018 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ced42b0e68fae6b6eea898136ca8cdafb9d75d13 It's been merged, built and I checked through the EcoreTool tests : https://hudson.eclipse.org/sirius/view/ecoretools/job/ecoretools-master/158/ Validated as technical change Validated on Sirius 3.0.0 RC1 (ecore tools builds/tests are also ok) Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0. |
When running in headless mode, we sometimes get an Illegal State Exception: Workbench has not been created yet. This happens in the LogThroughActiveDialectEditorLogListener method logging. The test should be changed to: if (!hasBeenLoggedThroughDialect && PlatformUI.isWorkbenchRunning() && !PlatformUI.getWorkbench().isStarting()) { adding the isWorkenchRunning before checking the isStarting.