Skip to main content



      Home
Home » Eclipse Projects » GEF » Show root TreeEditPart in outline view
Show root TreeEditPart in outline view [message #11136] Mon, 24 June 2002 05:46 Go to next message
Eclipse UserFriend
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 #11171 is a reply to message #11136] Mon, 24 June 2002 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.ibm.com

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
>
>
Re: Show root TreeEditPart in outline view [message #11187 is a reply to message #11171] Tue, 25 June 2002 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.planet-wagenknecht.de

Hi!

"Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
news:af9n1p$gkr$1@rogue.oti.com...
> 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.

Yes, that's the way I'm doing it right know and it works ok. Is it possible
to expand a tree by default?

Where do I have to look for selection synchronization? The model the outline
view uses differs slightly from the model the editor uses, because I want to
present a logical structure in the outline view, which is composed from the
model. Also, where do I have to look if I want to synchronize the editor
selection with another view? (This topic is new for me.)

Cu, Gunnar
Re: Show root TreeEditPart in outline view [message #11213 is a reply to message #11187] Tue, 25 June 2002 15:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.ibm.com

> Where do I have to look for selection synchronization? The model the
outline
> view uses differs slightly from the model the editor uses, because I want
to
> present a logical structure in the outline view, which is composed from
the
> model. Also, where do I have to look if I want to synchronize the editor
> selection with another view? (This topic is new for me.)

The synchronizer class anticipates such usage. Look at the code for that
class and see if that answers your question.
Re: Show root TreeEditPart in outline view [message #11322 is a reply to message #11213] Fri, 28 June 2002 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.intershop.de

"Randy Hudson" <none@ibm.com> schrieb im Newsbeitrag
news:afaebl$ru$1@rogue.oti.com...
> The synchronizer class anticipates such usage. Look at the code for that
> class and see if that answers your question.

How can I expand a tree by default?

Cu, Gunnar
Re: Show root TreeEditPart in outline view [message #104797 is a reply to message #11322] Wed, 12 November 2003 22:45 Go to previous message
Eclipse UserFriend
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
> >
> >
>
>
Previous Topic:Escape to go to default tool
Next Topic:Drag and Drop
Goto Forum:
  


Current Time: Sat May 10 02:20:29 EDT 2025

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

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

Back to the top