Skip to main content



      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 12:44 Go to next message
Eclipse UserFriend
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 461 times)
  • Attachment: 1.jpg
    (Size: 56.41KB, Downloaded 461 times)
  • Attachment: 3.jpg
    (Size: 3.68KB, Downloaded 733 times)
  • Attachment: 4.jpg
    (Size: 256.33KB, Downloaded 538 times)

[Updated on: Thu, 04 February 2016 13:01] by Moderator

Re: Create Instance in Tree Editor and Diagram Editor [message #1722830 is a reply to message #1722421] Tue, 09 February 2016 08:37 Go to previous messageGo to next message
Eclipse UserFriend
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 10:33 Go to previous message
Eclipse UserFriend
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 666 times)
  • Attachment: 2.jpg
    (Size: 263.72KB, Downloaded 415 times)

[Updated on: Wed, 10 February 2016 10:35] by Moderator

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


Current Time: Sun Jul 27 16:33:36 EDT 2025

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

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

Back to the top