Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Prevent a view from releasing
Prevent a view from releasing [message #661129] Wed, 23 March 2011 06:11 Go to next message
Eclipse UserFriend
How could I customize the release view operation (currently put under
perspective.viewfactory.releaseview()) such that do NOT release a
particular view even there is no more reference?

Thanks
Re: Prevent a view from releasing [message #661917 is a reply to message #661129] Mon, 28 March 2011 10:13 Go to previous messageGo to next message
Eclipse UserFriend
On 03/23/2011 06:11 AM, Leung Wang Hei wrote:
> How could I customize the release view operation (currently put under
> perspective.viewfactory.releaseview()) such that do NOT release a
> particular view even there is no more reference?

you can't change that, when there are no more references the view will
be destroyed. The best you can do is save some state in your plugin
somewhere so that if the user re-creates the view you can get back to a
"good" state.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Prevent a view from releasing [message #662538 is a reply to message #661917] Wed, 30 March 2011 22:52 Go to previous messageGo to next message
Eclipse UserFriend
Already did. My goal is to shorten the view-recreation time.

As long as the view is not disposed (e.g. opened in another
perspective), opening it is instant.

It the view is hidden from all perspective (and disposed), opening shows
a noticable lag-time (no measurement, I should say 0.5~1s).

Any help?

Hei


On 28/3/2011 22:13, Paul Webster wrote:
> On 03/23/2011 06:11 AM, Leung Wang Hei wrote:
>> How could I customize the release view operation (currently put under
>> perspective.viewfactory.releaseview()) such that do NOT release a
>> particular view even there is no more reference?
>
> you can't change that, when there are no more references the view will
> be destroyed. The best you can do is save some state in your plugin
> somewhere so that if the user re-creates the view you can get back to a
> "good" state.
>
> PW
>
>
Re: Prevent a view from releasing [message #662640 is a reply to message #662538] Thu, 31 March 2011 07:32 Go to previous message
Eclipse UserFriend
On 03/30/2011 10:52 PM, Leung Wang Hei wrote:
> Already did. My goal is to shorten the view-recreation time.
>
> As long as the view is not disposed (e.g. opened in another
> perspective), opening it is instant.
>
> It the view is hidden from all perspective (and disposed), opening shows
> a noticable lag-time (no measurement, I should say 0.5~1s).

The framework won't help you with that. 2 suggestions:

1) save as much data as you can so you can re-create quickly and 2)
don't do things like re-connect or complex loading in the UI thread i.e.
createPartControl(*).

If re-creating your data is going to take a long time, create your
SWT/JFace controls in createPartControl(*) and start a
org.eclipse.core.runtime.jobs.Job to recreate your data ... when the Job
is ready, update your view.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Previous Topic:How can I use IProject.getName() in plugin.xml or plugin.properties file
Next Topic:Problem with RCP on HPUX(PA-RISC)
Goto Forum:
  


Current Time: Thu Jul 03 06:41:58 EDT 2025

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

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

Back to the top