Skip to main content



      Home
Home » Eclipse Projects » Sirius » Select Model Element Variable
Select Model Element Variable [message #1706960] Tue, 01 September 2015 04:04 Go to next message
Eclipse UserFriend
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 10:15 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Select Model Element Variable [message #1775153 is a reply to message #1707821] Wed, 25 October 2017 08:56 Go to previous message
Eclipse UserFriend
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: Thu Jul 24 18:56:38 EDT 2025

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

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

Back to the top