Show root TreeEditPart in outline view [message #11136] |
Mon, 24 June 2002 05:46  |
Eclipse User |
|
|
|
Originally posted by: g.wagenknecht.intershop.de
Hi!
I only see the childs of the main TreeEditPart in the outline view. The main
TreeEditPart ist the corresponding TreeEditPart to the RootEditPart of the
editor. Both have the same model, which is also the top-level parent in my
model.
How can I configure the outline view to display this root as the firt point
and all childs in a tree under it?
Cu, Gunnar
|
|
|
|
|
|
|
Re: Show root TreeEditPart in outline view [message #104797 is a reply to message #11322] |
Wed, 12 November 2003 22:45  |
Eclipse User |
|
|
|
Originally posted by: qiuyunzhong.hotmail.com
Hello Randy:
I have the some question about how to display the tree root info in
outline.I have seen all the message about this topic,but i still can't
understand how to use a treeitem instead of the tree as other treeitem's
parent.Is it the tree has been there when you add a new TreeViewer to the
outlinePage?if it's true, how i can replace a tree with a treeitem ?
I try to implement it like this:
In the TreeEditPart refreshVisuals{
if (getWidgest() return tree)
{
Tree tree = (Tree) getWidgest();
TreeItem parentItem = new TreeItem(tree, SWT_STYLE);
parentItem.setText("root");
return;}
TreeItem item = (TreeItem)getWidgest();
item.setText("item");
}
but it can't work ,first when the treeItem added to outline eclipse throws a
nullpointerexception for there is no editpart when AbstractEditPartViewer
call
setSelection(),then the parentItem is added the some level of other treeItem
instead of as their parent.
Waiting for you advice ,thanks in advance.
----- Original Message -----
From: "Randy Hudson" <none@ibm.com>
Newsgroups: eclipse.tools.gef
Sent: Tuesday, June 25, 2002 10:01 AM
Subject: Re: Show root TreeEditPart in outline view
> There is no included support for this. However, your contents editpart
> essentially manages the Tree Widget and its first level children. You
could
> easily change it to insert a TreeItem at the first level, and use that
> TreeItem instead of the Tree to parent all of the content's children.
>
> "Gunnar Wagenknecht" <g.wagenknecht@intershop.de> wrote in message
> news:af6o8s$1ng$1@rogue.oti.com...
> > Hi!
> >
> > I only see the childs of the main TreeEditPart in the outline view. The
> main
> > TreeEditPart ist the corresponding TreeEditPart to the RootEditPart of
the
> > editor. Both have the same model, which is also the top-level parent in
my
> > model.
> >
> > How can I configure the outline view to display this root as the firt
> point
> > and all childs in a tree under it?
> >
> > Cu, Gunnar
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04861 seconds