Skip to main content



      Home
Home » Modeling » Graphiti » No Diagram found for URI
No Diagram found for URI [message #1234224] Tue, 21 January 2014 08:47 Go to next message
Eclipse UserFriend
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 08:51] by Moderator

Re: No Diagram found for URI [message #1234677 is a reply to message #1234224] Wed, 22 January 2014 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Soeren,

did you also check the index into the resource file? The #/0 at the end of
the URI indicates the first root EObject in the file. maybe your domain
objects were stored in the same resource as the diagram and moved the
diagram entry to another index?

Michael
Re: No Diagram found for URI [message #1234728 is a reply to message #1234677] Wed, 22 January 2014 12:13 Go to previous messageGo to next message
Eclipse UserFriend
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 12:28] by Moderator

Re: No Diagram found for URI [message #1236457 is a reply to message #1234224] Mon, 27 January 2014 04:01 Go to previous messageGo to next message
Eclipse UserFriend
I still need help with this...

If I ask the diagram resource for its uri fragment I get /1, is that correct if the entrypoint is #/0?

sa.getURIFragment((EObject) getBusinessObjectForPictogramElement(getDiagram()))


I would love to get any answer or hint what I should try to find the error for this...
Re: No Diagram found for URI [message #1236881 is a reply to message #1234224] Tue, 28 January 2014 04:36 Go to previous message
Eclipse UserFriend
Solved: It seems that I am not allowed to name my root model element "Diagram".
Ive renamed it and everything works fine.
Previous Topic:Draw Dashed Line for connections
Next Topic:Moving the center point possible?
Goto Forum:
  


Current Time: Sat Jul 05 06:23:49 EDT 2025

Powered by FUDForum. Page generated in 0.03421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top