|
|
|
|
Re: Opening a GMF diagram from java code [message #123550 is a reply to message #123343] |
Wed, 02 May 2007 22:10  |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
Ok I think I got it after spending too many hours and no sleep, so to save
other here it is:-
URI diagramModelFilename = URI.createPlatformResourceURI(aFilename);
GMFResource myGMFDiagram = new GMFResource(diagramModelFilename);
try {
myGMFDiagram.load(Collections.EMPTY_MAP);
<YourDiagramDomain>DiagramEditorUtil.openDiagram(myGMFDiagram);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (PartInitException e) {
System.out.println("Error opening diagram editor"+e.getStatus());
}
"Stu" <evaandoli@dodo.com.au> wrote in message
news:f19vb6$2cq$1@build.eclipse.org...
> Has anyone opened a GMF diagram file from code ?
> eg. openDiagram("filename.my_diagram");
>
> Thanks in advance,
> Stu
>
|
|
|
Powered by
FUDForum. Page generated in 0.04799 seconds