Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Create Node or Container by Selection Wizard
Create Node or Container by Selection Wizard [message #1699758] Fri, 26 June 2015 11:58 Go to next message
Le Chau Nguyen is currently offline Le Chau NguyenFriend
Messages: 19
Registered: August 2012
Junior Member
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:
https://c1.staticflickr.com/9/8873/18596998565_f8135832a4_c.jpg
"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 12:01]

Report message to a moderator

Re: Create Node or Container by Selection Wizard [message #1699762 is a reply to message #1699758] Fri, 26 June 2015 12:05 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create Node or Container by Selection Wizard [message #1699767 is a reply to message #1699762] Fri, 26 June 2015 12:51 Go to previous messageGo to next message
Le Chau Nguyen is currently offline Le Chau NguyenFriend
Messages: 19
Registered: August 2012
Junior Member
Hi Maxime,

Thank you for your response.
Could you tell me more how to return the list of my EClass?
I tried but "var:clubs", "School::Club" but not work, I am still stuck here...
Sorry, I am new to Sirius and Accelleo, so my question is maybe naive Sad

Best regards,
Le Chau
Re: Create Node or Container by Selection Wizard [message #1699772 is a reply to message #1699767] Fri, 26 June 2015 13:07 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Le 26/06/2015 14:52, Le Chau Nguyen a écrit :
> Hi Maxime,
> Thank you for your response. Could you tell me more how to return the
> list of my EClass?
> I tried but "var:clubs", "School::Club" but not work, I am still stuck
> here...
> Sorry, I am new to Sirius and Accelleo, so my question is maybe naive :(
>
> Best regards,
> Le Chau
>


In this case, I think a java service might be easier to use to build a
list containing the EClass you want to display.

You can access to each EClass by calling
YourpackagenamePackage.eInstance.getYourClassName().


--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create Node or Container by Selection Wizard [message #1699791 is a reply to message #1699758] Fri, 26 June 2015 15:36 Go to previous message
Le Chau Nguyen is currently offline Le Chau NguyenFriend
Messages: 19
Registered: August 2012
Junior Member
Thanks Maxime, followed your suggestion I was able to create the selection wizard with a simple selection list.
Now I am working on creating the container as the selected one in list.

[Updated on: Fri, 26 June 2015 15:37]

Report message to a moderator

Previous Topic:Please disregard my last post- how to reset validation errors
Next Topic:Validate element name
Goto Forum:
  


Current Time: Fri Mar 29 06:21:28 GMT 2024

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

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

Back to the top