Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Activate plugin after installation without restart
Activate plugin after installation without restart [message #333377] Mon, 08 December 2008 10:32 Go to next message
Markus Schindler is currently offline Markus SchindlerFriend
Messages: 30
Registered: July 2009
Member
Hello,

how can I activate a plugin after installation without a restart?

If I use
OperationsManager.getOperationFactory().createInstallOperati on(...) the
feature is installed, but I don't know how to activate it directly. My old
code was using org.eclipse.update.standalone.InstallCommand, and I could
be activated after installation with applyChangedNow().

So has anybody a idea how to a activate a installed
IInstallFeatureOperation. I tried IConfigFeatureOperation, but it doesn't
works.

Thanks for your help,
Markus
Re: Activate plugin after installation without restart [message #333378 is a reply to message #333377] Mon, 08 December 2008 10:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You can programmatically start/stop a bundle using.

Platform.getBundle("my.bundle.id").start();

Tom

Markus Schindler schrieb:
> Hello,
>
> how can I activate a plugin after installation without a restart?
>
> If I use
> OperationsManager.getOperationFactory().createInstallOperati on(...) the
> feature is installed, but I don't know how to activate it directly. My
> old code was using org.eclipse.update.standalone.InstallCommand, and I
> could be activated after installation with applyChangedNow().
>
> So has anybody a idea how to a activate a installed
> IInstallFeatureOperation. I tried IConfigFeatureOperation, but it
> doesn't works.
>
> Thanks for your help,
> Markus
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Activate plugin after installation without restart [message #333379 is a reply to message #333378] Mon, 08 December 2008 13:13 Go to previous message
Markus Schindler is currently offline Markus SchindlerFriend
Messages: 30
Registered: July 2009
Member
Thanks, for your reply.
But this doesn't work.
Platform.getBundle("my.plugin") is null, after installation. So non of the
perspectives or menues appear after installation.
-> After a restart all works fine

It looks like the features are only copied to the filesystem, and an entry
in an configuration is made, which tells eclipse after a restart to enable
these plugins.
Is there a way to enable them without an restart?

Btw. InstallCommand and applyChangesNow was doing this, but
IInstallFeatureOperation execute, and IConfigFeatureOperation execute are
not.

regards,
Markus
Previous Topic:How do you save your custom colours?
Next Topic:Catch every mouse click
Goto Forum:
  


Current Time: Sat Jul 27 12:33:07 GMT 2024

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

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

Back to the top