Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09: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 11:34 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
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 13: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 18:28 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 Nov 03 06:44:12 GMT 2024

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

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

Back to the top