Accessing the GraphicalViewer of a GraphicalEditor and vice-vera [message #88244] |
Thu, 24 July 2003 11:58  |
Eclipse User |
|
|
|
Originally posted by: bgrieder.nospam.thanks
Hi,
I am creating a (GEF) ContentOutlinePage for an OutlineViewer and, for
clarity, wishes the class implementing the ContentOutlinePage not being
an inner class of the GraphicalEditor (in contrary to the logic example).
However, it seems that I have to pass BOTH the GraphicalEditor object
and its associated GraphicalViewer object to the ContentOutlinePage,
because I cannot access the GraphicalViewer from the GraphicalEditor.
Why is the getGraphicalViewer method on the GraphicalEditor protected?
Is there a better implementation than passing both objects?
Many Thanks
bruno
|
|
|
|
|
|
Re: Accessing the GraphicalViewer of a GraphicalEditor and vice-vera [message #88505 is a reply to message #88460] |
Fri, 25 July 2003 12:20  |
Eclipse User |
|
|
|
Originally posted by: bgrieder.nospam.thanks
Hi,
Yes. That is what I initially did ;-) But honestly, it is not great from
a maintenance and clarity point of view. So, I implemented the solution
proposed by Eric, which works fine.
The Adapter(s) are quite tricky to get into but really powerful. I now
have a customized View which automatically displays information
depending on what is clicked or changed in the GraphicalEditor. Pretty
cool :-)
Gunnar Wagenknecht wrote:
> Bruno Grieder wrote:
>
>
>>Why is the getGraphicalViewer method on the GraphicalEditor protected?
>>Is there a better implementation than passing both objects?
>
>
> You can overwrite it in your editor and make it public :)
>
> Cu, Gunnar
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04435 seconds