Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to expend the tree in GEF TreeViewer
How to expend the tree in GEF TreeViewer [message #189906] Mon, 01 August 2005 05:51 Go to next message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
Hi all,

I use GEF TreeViewer in my editor. When my editor is opened,
I want to expand all the levels of tree.

I found in org.eclipse.jface.viewers.AbstractTreeViewer, here is a
expandAll() method can implement this.
But in GEF TreeViewer, I found nothing.
Is there a way to do this, like AbstractTreeViewer#expandAll()?

THX
Re: How to expend the tree in GEF TreeViewer [message #190984 is a reply to message #189906] Mon, 08 August 2005 09:29 Go to previous message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
wei zhang schrieb am 01.08.2005 07:51:
> Hi all,
>
> I use GEF TreeViewer in my editor. When my editor is opened,
> I want to expand all the levels of tree.
>
> I found in org.eclipse.jface.viewers.AbstractTreeViewer, here is a
> expandAll() method can implement this.
> But in GEF TreeViewer, I found nothing.
> Is there a way to do this, like AbstractTreeViewer#expandAll()?
>
> THX
>
In the outline I used an example which implements an ection for this:

IAction action = new Action("Expand All", img) {
public void run() {
expand(((Tree)itsViewer.getControl()).getItems());
}
private void expand(TreeItem[] items) {
for (int i = 0; i < items.length; i++) {
expand(items[i].getItems());
items[i].setExpanded(true);
}
}
};

Andreas
Previous Topic:F2 key problem!!!
Next Topic:SnaptoGeometry!!!
Goto Forum:
  


Current Time: Thu Dec 12 20:30:33 GMT 2024

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

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

Back to the top