Cannot extend DDiagramImpl or AbstractSpecificDDiagramEditor [message #1768710] |
Fri, 21 July 2017 20:57 |
Chris Mamorella Messages: 34 Registered: June 2013 |
Member |
|
|
When I try the following simple class declaration :
public class MyEditor extends AbstractSpecificDDiagramEditor { }
-or-
public class MyEditor extends DDiagramEditorImpl { }
I get this build error: "The hierarchy of the type "MyEditor" is inconsistent"
This error suggests that a plugin dependency references a class that is not accessible. From stack overflow:
"That means class which implemented by you has reference to the interface or class which again references some other classes or interfaces in other libraries and those are not available."
Both DDiagramEditor and AbstractSpecificDDiagramEditor are in:
--- org.eclipse.sirius.diagram.ui --- but it seems like guesswork to know which plugin(s) are needed from here.
Below is a list of my project's current plugin dependencies so the missing plugin(s) must exist somewhere else?
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.sirius,
org.eclipse.emf.transaction,
org.eclipse.sirius.ui,
org.eclipse.ui.ide,
org.eclipse.gef,
org.eclipse.gmf.runtime.diagram.ui,
org.eclipse.sirius.common,
org.eclipse.sirius.diagram,
org.eclipse.ui.navigator,
org.eclipse.jface,
org.eclipse.sirius.ecore.extender;bundle-version="3.1.1",
org.eclipse.emf.mwe.core,
org.eclipse.emf.ecore,
org.eclipse.ui.navigator.resources,
org.eclipse.core.expressions;bundle-version="3.4.600",
org.eclipse.sirius.diagram.ui;bundle-version="3.1.1",
org.eclipse.sirius.ext.base;bundle-version="3.1.1"
[Updated on: Sat, 22 July 2017 01:35] Report message to a moderator
|
|
|
Re: Cannot extend DDiagramImpl or AbstractSpecificDDiagramEditor [message #1768835 is a reply to message #1768710] |
Mon, 24 July 2017 09:05 |
|
Hello,
I think your project is missing the dependency to "org.eclipse.gmf.runtime.diagram.ui.resources.editor". I tested on the sample project "org.eclipse.sirius.sample.ecore.design" where "EcoreEntitiesReadOnlyEditor extends AbstractSpecificDDiagramEditor" and I also had this "The hierarchy of the type "MyEditor" is inconsistent" error when I removed "org.eclipse.gmf.runtime.diagram.ui.resources.editor".
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Cannot extend DDiagramImpl or AbstractSpecificDDiagramEditor [message #1768893 is a reply to message #1768879] |
Mon, 24 July 2017 16:07 |
|
Indeed, I do not see a good reason for this ID to be hardcoded in DialectUIManager or having another openEditor method where you could give the editor ID. I guess that contributed editors are usually opened using the UI and not programatically. You can open a bugzilla, but I do not known when we will add this to the API.
You will have to either override org.eclipse.sirius.ui.business.internal.dialect.DialectUIManagerImpl.init() to provide your own ID or open you editor using the default expression final IEditorPart editorPart = WorkbenchUtil.getActivePage().openEditor(editorInput, EDITOR_ID);
Regards,
Steve
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Cannot extend DDiagramImpl or AbstractSpecificDDiagramEditor [message #1769714 is a reply to message #1768893] |
Wed, 02 August 2017 20:37 |
Chris Mamorella Messages: 34 Registered: June 2013 |
Member |
|
|
Steve,
I considered using the default expression: final IEditorPart editorPart = WorkbenchUtil.getActivePage().openEditor(editorInput, EDITOR_ID); but this looks different than the DialectUIServices#openEditor process. As a bit of an experiment to avoid the need to override any Sirius init code, I set the id for my custom editor to:
"org.eclipse.sirius.diagram.ui.part.SiriusDiagramEditorID"
This was mostly an experiment to see if my editor would be activated instead of its parent class DDiagramEditorImpl which uses the same editor ID. Apparently my editor is in fact the one that gets called... but I'm not familiar enough with the extension point contribution mechanisms to know if this can be considered deterministic.
Regards,
Chris
[Updated on: Wed, 02 August 2017 20:40] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04136 seconds