Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Dynamic tree
Dynamic tree [message #1714812] Mon, 16 November 2015 22:26 Go to next message
Yariv Amar is currently offline Yariv AmarFriend
Messages: 29
Registered: October 2015
Junior Member
hi

i have a list of items with names like java qualified name "a.b.c.d"
i would like to present the items in a Tree view, similarly to java package-explorer (in eclipse).
for example for the list of:
a.b.c.x1
a.b.c.x2
d.dd.x3
d.x4

I want the Tree to look like:
+a.b.c
  -x1
  -x2
+d
   -x4
+d.dd
   -x3

how can i do it?

thanks!
Re: Dynamic tree [message #1715596 is a reply to message #1714812] Tue, 24 November 2015 15:08 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 174
Registered: October 2014
Senior Member
Le 16/11/2015 23:26, Yariv Amar a écrit :
> hi
>
hello
> i have a list of items with names like java qualified name "a.b.c.d"
> i would like to present the items in a Tree view, similarly to java
> package-explorer (in eclipse).
> for example for the list of:
>
> a.b.c.x1
> a.b.c.x2
> d.dd.x3
> d.x4
>
> I want the Tree to look like:
>
> +a.b.c
> -x1
> -x2
> +d
> -x4
> +d.dd
> -x3
>
> how can i do it?
you can create a intermediary node mapping corresponding to your package.
As any tree element is bound to a semantic object, you can bound the
"package node" to the first class for a given package. Use a java
service [1] in the Semantic candidate expression.

Then, as the semantic element associated to the package node is a class,
you may have side effect. For example if you delete it.

>
> thanks!

Regards
Laurent

[1]
http://help.eclipse.org/mars/topic/org.eclipse.sirius.doc/doc/specifier/general/Writing_Queries.html?cp=69_2_7_6#service_methods


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Edition table filters and searches
Next Topic:Recursive Creation of Nodes/Containers
Goto Forum:
  


Current Time: Wed Jan 27 16:38:55 GMT 2021

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

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

Back to the top