| Message / Information when ViewPart is activated/inactivated [message #440171] |
Fri, 25 November 2005 10:56  |
Eclipse User |
|
|
|
Hi,
I have a ViewPart that needs to get information if activated. This
Viewpart only contains a Composite with a Tree (TreeViewer).
My first attempt was to overwrite setFocus(). Unfortunatly there are
some cases, when setFocus() isn't called when it's ViewPart is
activated. For example when the ViewPart contains a Control, that
already has focus when the Viewpart ist acitvated (f.e. by clicking
inside the ViewPart).
Is there an other way to be informed when a ViewPart is activated or
inactivated?
Thanks in advance,
Andreas
|
|
|
| Re: Message / Information when ViewPart is activated/inactivated [message #440198 is a reply to message #440171] |
Fri, 25 November 2005 14:53  |
Eclipse User |
|
|
|
Andreas Dolk schrieb:
> Hi,
>
> I have a ViewPart that needs to get information if activated. This
> Viewpart only contains a Composite with a Tree (TreeViewer).
>
> My first attempt was to overwrite setFocus(). Unfortunatly there are
> some cases, when setFocus() isn't called when it's ViewPart is
> activated. For example when the ViewPart contains a Control, that
> already has focus when the Viewpart ist acitvated (f.e. by clicking
> inside the ViewPart).
>
> Is there an other way to be informed when a ViewPart is activated or
> inactivated?
>
> Thanks in advance,
> Andreas
.... think I got ist: IPartListener2#activatePart should do it. The
Listener needs to be added to WorkbenchPart...
Andreas
|
|
|
Powered by
FUDForum. Page generated in 0.03501 seconds