Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Do something after the view was opened.
Do something after the view was opened. [message #327618] Sat, 26 April 2008 05:54 Go to next message
Eclipse UserFriend
Originally posted by: schlamp.medihack.org

Hello! I want to execute a little job after a specific view was opened.
ViewPart#init doesn't work as the view must be really open and the
WorkbenchPart#createPartControl must already have been called.
So I am looking for something like an open method of a view.

Any suggestions?

Kai
Re: Do something after the view was opened. [message #327620 is a reply to message #327618] Sat, 26 April 2008 07:34 Go to previous messageGo to next message
Eclipse UserFriend
Maybe look at the IPartListener and IPartListener2 interfaces. You can
add your own implementation of the interface as a listener on a
workbench page and use it to be notified when your view is
opened/closed/activated/deactivated etc.

HTH,

Wayne

On Sat, 2008-04-26 at 09:54 +0000, Kai Schlamp wrote:
> Hello! I want to execute a little job after a specific view was opened.
> ViewPart#init doesn't work as the view must be really open and the
> WorkbenchPart#createPartControl must already have been called.
> So I am looking for something like an open method of a view.
>
> Any suggestions?
>
> Kai
>
Re: Do something after the view was opened. [message #327622 is a reply to message #327620] Sat, 26 April 2008 09:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: schlamp.medihack.org

Nice tip, but in my case it seems, that it doesn't solve the problem.
I give you a bit more explanations on my problem.
I want to execute an IRunnableWithProgress (executed by my ViewPart)
directly after my rcp application has started (and any user interface is
visible).
The problem with IPartListener is, that those methods are called, when the
startup splash screen is visible (and not the user interface of the
application).
Any ideas? Listen to another interface?

Wayne Beaton wrote:

> Maybe look at the IPartListener and IPartListener2 interfaces. You can
> add your own implementation of the interface as a listener on a
> workbench page and use it to be notified when your view is
> opened/closed/activated/deactivated etc.

> HTH,

> Wayne

> On Sat, 2008-04-26 at 09:54 +0000, Kai Schlamp wrote:
>> Hello! I want to execute a little job after a specific view was opened.
>> ViewPart#init doesn't work as the view must be really open and the
>> WorkbenchPart#createPartControl must already have been called.
>> So I am looking for something like an open method of a view.
>>
>> Any suggestions?
>>
>> Kai
>>
Re: Do something after the view was opened. [message #327631 is a reply to message #327622] Sun, 27 April 2008 14:28 Go to previous message
Eclipse UserFriend
With any luck, we'll have successfully fixed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168524 in 3.4, so
partVisible(*) should occur when the view is made visible, even on startup.

Other than that, why not do it in your createPartControl(*) then if
init(*) is too early

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Previous Topic:TreeViewer Performance
Next Topic:getActivePage throws NullPointerException
Goto Forum:
  


Current Time: Sun Apr 27 02:11:47 EDT 2025

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

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

Back to the top