Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351822

Summary: [NodeTreeIterator] support other node than root for iteration origin.
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: lieven.lemiengre
Version: 2.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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