Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Creating diagram using UML2 tools APIs
Creating diagram using UML2 tools APIs [message #623520] Thu, 22 January 2009 05:22
Kishore Kushwaha is currently offline Kishore KushwahaFriend
Messages: 36
Registered: July 2009
Location: Lucknow, India
Member

Hi All;

I am creating a UML file into Eclipse workspace and want to create/open
diagram as well for this file using UML2 Tools APIs as :


String uriFile = file.getFullPath().toString();
URI resourceURI = URI.createPlatformResourceURI(uriFile, false);
URI diagramURI = URI.createPlatformResourceURI(uriFile + "act", false);
Resource diagram = UMLDiagramEditorUtil.createDiagram(diagramURI,
resourceURI, new NullProgressMonitor());
UMLDiagramEditorUtil.openDiagram(diagram);

but above piece of code creates a diagram file into workspace but it does
not contains any contents and the resource uml file becomes empty.
And generates the "Null Pointer Exception" error.


Please tell me, what is wrong in my code or tell me the right way to
create a diagram (activity, Class, use case) by giving a uml file path.

Thanks in Advance.
Kishore


Regards,
Kishore
Previous Topic:Activity Diagram gets jumbled
Next Topic:Outline Tree Navigator
Goto Forum:
  


Current Time: Thu Apr 25 12:39:22 GMT 2024

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

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

Back to the top