Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Select Model Element Variable
Select Model Element Variable [message #1706960] Tue, 01 September 2015 08:04 Go to next message
Tiago Jorge is currently offline Tiago JorgeFriend
Messages: 10
Registered: July 2015
Junior Member
Hi!

When creating a new line in a table I am using the 'Select Model Element Variable' to pick existing elements of a certain type.

However, the candidate expression returning the collection of EObject
is fetching elements from other packages too (...eContainer().oclAsType(Package).getModelDependencies().eAllContents()...). As a result I am getting elements from different packages with the same type and name, which makes it oblivious for me from which package they come just by looking at the resulting list.

Is there a way to show the package from which a candidate element for selection comes?

Cheers
Re: Select Model Element Variable [message #1707821 is a reply to message #1706960] Wed, 09 September 2015 14:15 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 01/09/2015 10:04, Tiago Jorge a écrit :
> Hi!
>
> When creating a new line in a table I am using the 'Select Model Element
> Variable' to pick existing elements of a certain type.
>
> However, the candidate expression returning the collection of EObject
> is fetching elements from other packages too
> (...eContainer().oclAsType(Package).getModelDependencies().eAllContents()...).
> As a result I am getting elements from different packages with the same
> type and name, which makes it oblivious for me from which package they
> come just by looking at the resulting list.
>
> Is there a way to show the package from which a candidate element for
> selection comes?

You can configure your 'Select Model Element Variable' to display a tree
by enabling the 'Tree' attribute.

Then the 'Root expression' allows you to choose the elements you want to
see as roots of the tree. And recursively on each root and then each
tree element, the 'Children expression' will be evaluated to compute the
element to display as children.

Note that all the root and children elements must be in the result
collection of 'Candidates expression' to be displayed.

You might find more information in the documentation, see [1] (and [2]).


>
> Cheers


Regards

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1] See User-Defined Variables in
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#tools_specification
[2]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#selection_wizard


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Select Model Element Variable [message #1775153 is a reply to message #1707821] Wed, 25 October 2017 12:56 Go to previous message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
My question is related to this one.

I have written the "Root Expression" that returns the collection of EObjects (say Containers). Now, In the "Children Expression" I want to iterate on all the containers returned in the Root Expression and return the candidate elements within them. How can I do that?

Regards,
Yash
Previous Topic:Programmatically call Arrange Selection
Next Topic:Sirius Copy/Paste nodes (elements)
Goto Forum:
  


Current Time: Sat Apr 27 02:53:34 GMT 2024

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

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

Back to the top