Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » problems trying to use org.eclipse.gef.ui.parts.TreeViewer in the simplest way
problems trying to use org.eclipse.gef.ui.parts.TreeViewer in the simplest way [message #152062] Mon, 27 September 2004 08:37 Go to next message
Eclipse UserFriend
Originally posted by: zzk101.163.net

Every One:
The project in the attachment is one sample using TreeViewer. I failed
to get a good tree view. I checked the documents and logic example. Really
it's hard for me to find a good way to resolve this problem. Cause the
example is so complicated and the document is so easy.
I'm sure : The mothod getImage and getText in ParentEditPart haved been
in work. But why the view not show the right message(in my example is a
image and one text "first").


Best Regards
Vic


Notice !!! the project in the attachment is wrong please use this one [message #152068 is a reply to message #152062] Mon, 27 September 2004 08:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zzk101.163.net

Every one:
I pologize that i sent one wrong attchment, this one is good.

Best Regards
Vic

"vic" <zzk101@163.net> wrote in message news:cj6ugn$j8k$1@eclipse.org...
> Every One:
> The project in the attachment is one sample using TreeViewer. I failed
> to get a good tree view. I checked the documents and logic example. Really
> it's hard for me to find a good way to resolve this problem. Cause the
> example is so complicated and the document is so easy.
> I'm sure : The mothod getImage and getText in ParentEditPart haved
been
> in work. But why the view not show the right message(in my example is a
> image and one text "first").
>
>
> Best Regards
> Vic
>
>
>


  • Attachment: vic.home.zip
    (Size: 14.52KB, Downloaded 76 times)
Re: Notice !!! the project in the attachment is wrong please use this one [message #152303 is a reply to message #152068] Tue, 28 September 2004 17:38 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
I noticed several problems at a quick look at your code. The ParentEditPart
needs to implement getModelChildren() which should return the children of
TreeParent (the model). Keep in mind that the TreeParent itself will not
show in the tree (since it's the root/contents). Also, you need to add some
children (TreeObjects) to the TreeParent so that you see something in the
tree. Right now, your content (TreeParent) is empty.

"vic" <zzk101@163.net> wrote in message news:cj6unj$jhe$1@eclipse.org...
> Every one:
> I pologize that i sent one wrong attchment, this one is good.
>
> Best Regards
> Vic
>
> "vic" <zzk101@163.net> wrote in message news:cj6ugn$j8k$1@eclipse.org...
> > Every One:
> > The project in the attachment is one sample using TreeViewer. I
failed
> > to get a good tree view. I checked the documents and logic example.
Really
> > it's hard for me to find a good way to resolve this problem. Cause the
> > example is so complicated and the document is so easy.
> > I'm sure : The mothod getImage and getText in ParentEditPart haved
> been
> > in work. But why the view not show the right message(in my example is a
> > image and one text "first").
> >
> >
> > Best Regards
> > Vic
> >
> >
> >
>
>
>
Re: Notice !!! the project in the attachment is wrong please use this one [message #152394 is a reply to message #152303] Thu, 30 September 2004 07:31 Go to previous message
Eclipse UserFriend
Originally posted by: zzk101.163.net

Pratic Shah:
Thanks for your great help. My program works now!


Best Regards
Vic


"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:cjc7a1$6ds$1@eclipse.org...
> I noticed several problems at a quick look at your code. The
ParentEditPart
> needs to implement getModelChildren() which should return the children of
> TreeParent (the model). Keep in mind that the TreeParent itself will not
> show in the tree (since it's the root/contents). Also, you need to add
some
> children (TreeObjects) to the TreeParent so that you see something in the
> tree. Right now, your content (TreeParent) is empty.
>
> "vic" <zzk101@163.net> wrote in message news:cj6unj$jhe$1@eclipse.org...
> > Every one:
> > I pologize that i sent one wrong attchment, this one is good.
> >
> > Best Regards
> > Vic
> >
> > "vic" <zzk101@163.net> wrote in message news:cj6ugn$j8k$1@eclipse.org...
> > > Every One:
> > > The project in the attachment is one sample using TreeViewer. I
> failed
> > > to get a good tree view. I checked the documents and logic example.
> Really
> > > it's hard for me to find a good way to resolve this problem. Cause the
> > > example is so complicated and the document is so easy.
> > > I'm sure : The mothod getImage and getText in ParentEditPart haved
> > been
> > > in work. But why the view not show the right message(in my example is
a
> > > image and one text "first").
> > >
> > >
> > > Best Regards
> > > Vic
> > >
> > >
> > >
> >
> >
> >
>
>
Previous Topic:Flip and rotate display
Next Topic:palette entry creation trouble
Goto Forum:
  


Current Time: Mon Jan 20 17:21:01 GMT 2025

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

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

Back to the top