Community
Participate
Working Groups
If the ID of an image provider is invalid, the diagram editor can't be instantiated at all. I suggest to * log a runtime error or write to the console if an image provider can't be created (for easier debugging) * catch the situation that an image provider is null and to create the diagram editor nonetheless (for more robustness).
Currently a not meaningfull NPE is thrown in this case: java.lang.NullPointerException at org.eclipse.gef.ui.parts.GraphicalEditor.getCommandStack(GraphicalEditor.java:252) at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:347) at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1093) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828) Should target for Juno and for Indigo SR1
I have created a fix for this and checked it in into head. Now an invalid image provider does not prevent the editor from opening. Instead an IllegalArgumentException is logged. Also created a JUnit plugin test in org.eclipse.graphiti.bot.tests.ExtensionManagerTest#testCreateDiagramTypeProvider
Created attachment 200077 [details] Patch for the fix
I have also downported the fix to Indigo SR1 (Graphiti 0.8)
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)