| Create graphical elements by create new diagram [message #963181] |
Mon, 29 October 2012 12:22  |
Markus Knoop Messages: 14 Registered: January 2012 |
Junior Member |
|
|
Hello,
i need some help. I want to create some graphical elements while create a new diagram. This elements are not parts of the model, only a graphical representation. For example it should visualize the user a start point as dot. So i create a dummy class, create an AddFeature and CreateFeature. I tried to trigger the creation of this element inside the DiagramProvider.postInit(), but get an exception:
java.lang.IllegalStateException: Cannot modify resource set without a write transaction
What is the correct approach to this? By create a new diagram, there should be a simple dot as start point inside the diagram?
Regards,
Markus
|
|
|
|
|
|
|
|
| Re: Create graphical elements by create new diagram [message #986729 is a reply to message #985842] |
Wed, 21 November 2012 08:23  |
Michael Wenz Messages: 1267 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
Hemlata,
why do you construct a DiagramEditor by yourself? All you should need to do
is create a DiagramEditorInput instance and pass it to
page.openEditor(input, DiagramEditor.DIAGRAM_EDITOR_ID);
The diagram needs to be persisted in file.
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.01687 seconds