Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to deactivate IStartup programmatically
How to deactivate IStartup programmatically [message #638954] Sat, 13 November 2010 20:44 Go to next message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hi

I need to run an action exactly once per workspace. Once it ran with
success, it can be deactivated for all subsequent workbench starts.

The action is now implemented as IStartup and the missing part is the
deactivation.

Is there a programmatic way to add a plugin to the list of disabled
startups? Or is the best way to append my plugin-id to the preference
" /instance/org.eclipse.ui.workbench/PLUGINS_NOT_ACTIVATED_ON_ STARTUP "
using the ordinary preference mechanism?

Thanks
Michael
Re: How to deactivate IStartup programmatically [message #639245 is a reply to message #638954] Mon, 15 November 2010 17:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Michael Pellaton wrote:
> Is there a programmatic way to add a plugin to the list of disabled
> startups? Or is the best way to append my plugin-id to the preference
> " /instance/org.eclipse.ui.workbench/PLUGINS_NOT_ACTIVATED_ON_ STARTUP "
> using the ordinary preference mechanism?

It's an internal constant, but that appears to be the only way to
de-activate the startup extension.

What about simply allowing a standard request activate your plugin,
perform the setup in your activator and then save that you've already
done it (either your own preference or your plugin state location or
something like dialog settings for a UI plugin)?

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/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to deactivate IStartup programmatically [message #639328 is a reply to message #639245] Tue, 16 November 2010 06:48 Go to previous message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hello

> What about simply allowing a standard request activate your plugin,
> perform the setup in your activator and then save that you've already
> done it (either your own preference or your plugin state location or
> something like dialog settings for a UI plugin)?
Re-running it is not the point because that's safe (it doesn't do
anything when run for the nth (n>1) time). What I want is to avoid is
the resource usage and the longer startup time.

However, thanks for the reply; I'll play with the preference nodes...

Take care,
Michael
Previous Topic:when basing product configuration on features, getting ClassNotFoundException:
Next Topic:Switch to another window
Goto Forum:
  


Current Time: Mon Sep 23 10:00:44 GMT 2024

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

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

Back to the top