| Summary: | Editor not in registry leads to NPE | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Jens Li <skrap> |
| Component: | Core | Assignee: | Maxime Porhel <maxime.porhel> |
| Status: | CLOSED FIXED | QA Contact: | Julien Dupont <julien.dupont> |
| Severity: | normal | ||
| Priority: | P3 | CC: | julien.dupont, maxime.porhel, pierre-charles.david |
| Version: | 4.0.0 | Keywords: | triaged |
| Target Milestone: | 4.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/81793 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4d55ea1ff4fba5b01edcba33c4bfc16b78b05e91 https://git.eclipse.org/r/83116 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6244b543d75102602fef55b36c3dc301caf04528 https://git.eclipse.org/r/83837 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0f387e84a668ef1c376d17e380914e60d47e5dcb |
||
| Whiteboard: | |||
|
Description
Jens Li
New Gerrit change created: https://git.eclipse.org/r/81793 Hi Lii, thanks for your feedback. I can see the cause of the NPE in the code. There is no support of the MultiPageEditor, so I am not sure we can find a scenario to reproduce this NPE with standard Sirius editors. The potential NPE can be corrected in DDiagramEditorSessionListenerDelegate.getInitialImage but this bugzilla will be validated as technical issue. Hi.
Just to complete Maxime's answer: the use cases you mention ("diagram editor is not present in platform editor registry", "the Sirius editor is part of a MultiPageEditor") are not supported by Sirius. While we agree it would be a nice feature to have, it would probably require significant work, beyond fixing immediatly visible crashes like this one. This is not something we have planned for a future release at the moment (although if you wanted to work on this and/or sponsor the required development, we can probably discuss about it).
In the meantime, we'll fix this particular NPE because it is easy and low risk, but we can't give any guarantee about the behavior of Sirius in such a context, or that we'll fix other issues you could find (again, unless you want to contribute fixes and/or sponsor them).
Regards,
Pierre-Charles
Gerrit change https://git.eclipse.org/r/81793 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4d55ea1ff4fba5b01edcba33c4bfc16b78b05e91 Moving to 4.1.0 since the patch fixing the NPE was merged, but only this particular scenario will be treated here. Great to have this fixed so promptly. Thank! Before the fix this issue could be worked around by overriding to host editors createSite method and return an IEditorSite with an ID. We are currently experimenting with a Sirius editor inside a multi page editor. So far we are able to more around entities, preform undo/redo and save. Undo/redo took some work to get working. The next step is to connect the toolbars. If we manage to get this to work in a nice way maybe we'll do a writeup somewhere about our solution. (In reply to Lii Woo from comment #6) > Great to have this fixed so promptly. Thank! > > Before the fix this issue could be worked around by overriding to host > editors createSite method and return an IEditorSite with an ID. > > We are currently experimenting with a Sirius editor inside a multi page > editor. So far we are able to more around entities, preform undo/redo and > save. Undo/redo took some work to get working. The next step is to connect > the toolbars. > > If we manage to get this to work in a nice way maybe we'll do a writeup > somewhere about our solution. Thanks for the information, that sounds promising! Like I said, we recognize it would be a nice feature to have, but it's just not part of our priorities at the moment. If you pursue this effort, don't hesitate to keep us informed (you can contact me directly by email), and if you find isolated bugs like this one that we can fix quickly to help you moving forward, don't hesitate. We will probably not be able to invest significant time in complex bug fixes and refactorings (unless sponsored), but for small things like this one, don't hesistate and we'll do our best with available resources. New Gerrit change created: https://git.eclipse.org/r/83116 Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details. Gerrit change https://git.eclipse.org/r/83116 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6244b543d75102602fef55b36c3dc301caf04528 Gerrit change https://git.eclipse.org/r/83837 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0f387e84a668ef1c376d17e380914e60d47e5dcb |