Create Node or Container by Selection Wizard [message #1699758] |
Fri, 26 June 2015 07:58  |
Eclipse User |
|
|
|
Hi All,
I am able to create "Node Creation Tool" or "Container Creation Tool".
Each tool is corresponding to only one Node/Container.
But my problem is I have too many Containers (400 Containers, I generated them programmatically). So I don't want to place 400 tools to Palette. I am trying to add a Tool that after dragging to Canvas, it popups a Selection Wizard that list 400 containers there. After I select a container, it will be draw on Canvas as if I use "Container Creation Tool" to draw it.
I tried in Sirius: right click on tool section --> select "New Element Edition" --> "Selection Wizard". Then I see the Selection Wizard Properties with multiple fields to be filled.
I think "Candidate Expression" field" is for finding the items to be selected in Wizards. But I cannot find the query to list all Club items (FootballClub, USFootballClub, DancingClub etc.) as this model:

"var:clubs", "School.clubs" etc. doesn't work. School::Club just return Club, not all sub Classes of Club. Could you please tell me what I was wrong?
And to place the Container to Canvas as if using "Container Creation Tool", should I make a "New Operation" --> "Create View" under "Selection Wizard"\"Begin"\"Change Context" in Viewpoint Specification Editor ? I tried it, but I don't know how to do next.
[Updated on: Fri, 26 June 2015 08:01] by Moderator
|
|
|
Re: Create Node or Container by Selection Wizard [message #1699762 is a reply to message #1699758] |
Fri, 26 June 2015 08:05   |
Eclipse User |
|
|
|
Hi,
Le 26/06/2015 13:58, Le Chau Nguyen a écrit :
> Hi All,
>
> I am able to create "Node Creation Tool" or "Container Creation Tool".
> Each tool is corresponding to only one Node/Container.
>
> But my problem is I have too many Containers (400 Containers, I
> generated them programmatically). So I don't want to place 400 tools to
> Palette. I am trying to add a Tool that after dragging to Canvas, it
> popups a Selection Wizard that list 400 containers there. After I select
> a container, it will be draw on Canvas as if I use "Container Creation
> Tool" to draw it.
>
> I tried in Sirius: right click on tool section --> select "New Element
> Edition" --> "Selection Wizard". Then I see the Selection Wizard
> Properties with multiple fields to be filled.
> I think:
> "Candidate Expression" field": for finding the items to be showed in
> Wizards. But I cannot find the query to list all Club items
> (FootballClub, USFootballClub, DancingClub etc.) as this model:
>
> "var:clubs", "School.clubs" etc. doesn't work. School::Club just return
> Club, not all sub Classes of Club. Could you please tell me what I was
> wrong?
>
> And to place the Container to Canvas as if using "Container Creation
> Tool", should I make a "New Operation" --> "Create View" under
> "Selection Wizard"\"Begin"\"Change Context" in Viewpoint Specification
> Editor ?
You might return a list of your EClass and, in the tool, use a Java
service to call your factory instance and ask it to create an instance
of the chosen EClass (will be the element variable) and store it in the
semantic element (container) of the clicked view (container view).
Regards,
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04234 seconds