No Diagram found for URI [message #1234224] |
Tue, 21 January 2014 13:47 |
Soeren M Messages: 77 Registered: September 2011 |
Member |
|
|
Hey,
I've got a problem if I restart my editor. I always get "No Diagram found for URI 'platform:/resource/alsufvhisvf/src/diagrams/asd.diagram#/0".
I've found something about it and Michael wrote in another thread that I should start debugging in the DiagramEditorInputFactory, but the path seems to be correct.
Another thing is, that if I save an empty diagram, everything is fine and I can open it again and again.
Is there a point where I can start to debug? Or is it possible that the BusinessObjects are wrong? I've noticed that in some examples no one seems to add their Transitions to a resource, but I have to it, if not I get "... is not contained in a resource".
Maybe thats something what takes some kind of influence on the save/open mechanism?
[Updated on: Tue, 21 January 2014 13:51] Report message to a moderator
|
|
|
|
Re: No Diagram found for URI [message #1234728 is a reply to message #1234677] |
Wed, 22 January 2014 17:13 |
Soeren M Messages: 77 Registered: September 2011 |
Member |
|
|
Hey Michael,
I compared the file created by my editor with a file created by the tutorial editor and there is one difference.
After "<pi:Diagram visible="true" gridUnit="10" ...>", my file starts with "<link businessObjects="/1"/>",
where the tutorial created file starts with their children "<children xsi:type="pi:ContainerShape" visible="true" active="true">" and that child contains the BO.
My CreateFeature looks like this:
State state = MobyFactory.eINSTANCE.createState();
state.setDescriptionText("name");
state.setDelayText("0s, { }");
state.setID(Util.getNextId(getDiagram(), getFeatureProvider()));
// Add model element to resource.
ContainerShape container = context.getTargetContainer();
if(container instanceof Diagram) {
moby.Diagram diagramBO = Util.getRoot(getDiagram());
diagramBO.eResource().getContents().add(state);
} else {
context.getTargetContainer().eResource().getContents().add(state);
}
moby.Diagram diagramBO = Util.getRoot(getDiagram()); this line is added to add my States to my Root-BusinessObject. Anyways, even if I add it to the Diagram, the error still persists.
[Updated on: Wed, 22 January 2014 17:28] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03466 seconds