Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351822 - [NodeTreeIterator] support other node than root for iteration origin.
Summary: [NodeTreeIterator] support other node than root for iteration origin.
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 07:36 EDT by Moritz Eysholdt CLA
Modified: 2012-11-22 07:42 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-07-12 07:36:14 EDT
context: org.eclipse.xtext.nodemodel.util.NodeTreeIterator

Use case: In a tree like

     A
    / \
   /   \
  B     C
 / \   / \
D   E F   G

I'd like to be able to iterate from E to G. I would expect the iterator to visit F on the way.

Currently, this is not possible, since the TreeIterator will never leave its root node and the root node is also implicitly the iterators start node.

I'd like to be able to specify A as root (if the iterator really needs a root) and G as the start node.
Comment 1 Sven Efftinge CLA 2012-11-22 07:42:06 EST
If you have A you could filter over the leafiterator