Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » No Diagram found for URI
No Diagram found for URI [message #1234224] Tue, 21 January 2014 13:47 Go to next message
Soeren M is currently offline Soeren MFriend
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 #1234677 is a reply to message #1234224] Wed, 22 January 2014 14:45 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 17:13 Go to previous messageGo to next message
Soeren M is currently offline Soeren MFriend
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

Re: No Diagram found for URI [message #1236457 is a reply to message #1234224] Mon, 27 January 2014 09:01 Go to previous messageGo to next message
Soeren M is currently offline Soeren MFriend
Messages: 77
Registered: September 2011
Member
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 09:36 Go to previous message
Soeren M is currently offline Soeren MFriend
Messages: 77
Registered: September 2011
Member
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 Aug 08 18:45:15 GMT 2020

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

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

Back to the top