Obtaining the leaf objects from the active context [message #478788] |
Thu, 06 August 2009 21:22 |
|
Hello
In some projects I work in, every change to must be recorded in
a changelog file (similar to GNU style ChangeLog) and I thought
that a plug-in extracting all the required stuff for it from the
currently activated mylyn task and context could save time and
ease the annoying task of writing changelogs.
So far I get all the information I need. The missing part is how
to get only the leaf elements out of the list of IInteractionElement
I can obtain from the active context. I have not found a way to get
hold of the tree structure and the elements themselves seem to carry
information on whether they are a leaf or not.
This is an example of what I get (all elements, only content type
resource to avoid duplicates):
resource: /asasd
resource: /asasd/src/blabla
resource: /asasd/src/foo.tcl
resource: /
resource: /asasd/src/asdasd.java
resource: /asasd/src
And that's what I actually need:
resource: /asasd/src/blabla
resource: /asasd/src/foo.tcl
resource: /asasd/src/asdasd.java
Re-constructing the tree by splitting the strings and doing some
nested collection operations is not my favoured solution because
I am sure this is already done somewhere.
How can I obtain the tree-structure from the current context like it
is used in the context tab of the task editor?
Any hints and recommendations welcome
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03642 seconds