Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Create Instance in Tree Editor and Diagram Editor
Create Instance in Tree Editor and Diagram Editor [message #1722421] Thu, 04 February 2016 17:44 Go to next message
Shin-Yi Lin is currently offline Shin-Yi LinFriend
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
index.php/fa/24899/0/

2. Create Selected Item in Tree Editor
index.php/fa/24898/0/

3. Create Selected Item in Diagram Editor
index.php/fa/24900/0/

4. Addcommand Code
index.php/fa/24901/0/
  • Attachment: 2.jpg
    (Size: 51.09KB, Downloaded 352 times)
  • Attachment: 1.jpg
    (Size: 56.41KB, Downloaded 361 times)
  • Attachment: 3.jpg
    (Size: 3.68KB, Downloaded 622 times)
  • Attachment: 4.jpg
    (Size: 256.33KB, Downloaded 404 times)

[Updated on: Thu, 04 February 2016 18:01]

Report message to a moderator

Re: Create Instance in Tree Editor and Diagram Editor [message #1722830 is a reply to message #1722421] Tue, 09 February 2016 13:37 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi,

I'm not sure about what you want to do.
If I understand you have 3 views on your model :
- Your JFace view
- A Tree editor
- And a Diagram editor

And you want to see some elements appears in the tree and diagram editor
according to your changes done in your JFace view?
If you want help, we must give more details and be clearer about your
needs and your use of Sirius.

Best Regards.

Le 04/02/2016 18:44, Shin-Yi Lin a écrit :
> Hi all,
>
> 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.
>
> But, I don't know how to create them in the Tree Editor and Diagram Editor.
>
> The following pictures describes what I mean:
>
> 1. Jface Application
>
>
> 2. Create Selected Item in Tree Editor
>
>
> 3. Create Selected Item in Diagram Editor
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create Instance in Tree Editor and Diagram Editor [message #1722967 is a reply to message #1722830] Wed, 10 February 2016 15:33 Go to previous message
Shin-Yi Lin is currently offline Shin-Yi LinFriend
Messages: 34
Registered: June 2015
Member
For Tree Editor, it is a built-in editor in modeling project to create objects of model:
index.php/fa/24946/0/

For Diagram Editor, it is also a built-in editor to display viewing part of the model:
index.php/fa/24948/0/
  • Attachment: 1.jpg
    (Size: 169.00KB, Downloaded 570 times)
  • Attachment: 2.jpg
    (Size: 263.72KB, Downloaded 299 times)

[Updated on: Wed, 10 February 2016 15:35]

Report message to a moderator

Previous Topic:Operation Action in table view
Next Topic:get "root model" context
Goto Forum:
  


Current Time: Thu Jan 21 09:21:17 GMT 2021

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

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

Back to the top