Create Instance in Tree Editor and Diagram Editor [message #1722421] |
Thu, 04 February 2016 17:44 |
Shin-Yi Lin Messages: 34 Registered: June 2015 |
Member |
|
|
Hi all,
Introduction:
I am developing JFace Application in order to select item type in the model and press Ok button. After pressing OK button, I want to see the instances of that item type is created in the Tree Editor and Diagram Editor.
Problem:
But, I don't know how to create them in the Tree Editor and Diagram Editor.
Current Solution:
I am using org.eclipse.sirius.externalJavaAction to develop JFace Application plugin. I have tried to add Addcommand into OK button SelectionListener, but there displays error message of nullpointer. I also moved Addcommand into notifyChanged(Notification notification) in XXXitemprovider.java, but XXX disapears when I right-click the root element and want to see XXX.
The following pictures describes what I mean:
1. Jface Application
2. Create Selected Item in Tree Editor
3. Create Selected Item in Diagram Editor
4. Addcommand Code
-
Attachment: 2.jpg
(Size: 51.09KB, Downloaded 421 times) -
Attachment: 1.jpg
(Size: 56.41KB, Downloaded 422 times) -
Attachment: 3.jpg
(Size: 3.68KB, Downloaded 681 times) -
Attachment: 4.jpg
(Size: 256.33KB, Downloaded 500 times)
[Updated on: Thu, 04 February 2016 18:01] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03259 seconds