Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Automatic activation of plug-ins
Automatic activation of plug-ins [message #190954] Wed, 31 January 2007 10:22 Go to next message
Eclipse UserFriend
Originally posted by: dirk.reinelt.mb.uni-magdeburg.de

How do I realise an automatic activation of a plug-in right after the
start of the Eclipse application?
I have created a plug-in with an editor and I have put some required steps
in the start method of the Activator class. But this will only be executed
by clicking on the editor file manually.
Is there any way to activate the plugin automatically?

Greetings
Dirk Reinelt
Re: Automatic activation of plug-ins [message #190961 is a reply to message #190954] Wed, 31 January 2007 12:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Dirk wrote:
> How do I realise an automatic activation of a plug-in right after the
> start of the Eclipse application?
> I have created a plug-in with an editor and I have put some required
> steps in the start method of the Activator class. But this will only be
> executed by clicking on the editor file manually. Is there any way to
> activate the plugin automatically?
>
> Greetings
> Dirk Reinelt
>
Look here:
http://download.eclipse.org/eclipse/downloads/documentation/ 2.0/html/plugins/org.eclipse.platform.doc.isv/reference/exte nsion-points/org_eclipse_ui_startup.html

Let me know if this answers your question.

regards,
Jakub Jurkiewicz
Re: Automatic activation of plug-ins [message #191008 is a reply to message #190961] Wed, 31 January 2007 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dirk.reinelt.mb.uni-magdeburg.de

Jakub Jurkiewicz wrote:

> Dirk wrote:
>> How do I realise an automatic activation of a plug-in right after the
>> start of the Eclipse application?
>> I have created a plug-in with an editor and I have put some required
>> steps in the start method of the Activator class. But this will only be
>> executed by clicking on the editor file manually. Is there any way to
>> activate the plugin automatically?
>>
>> Greetings
>> Dirk Reinelt
>>
> Look here:
>
http://download.eclipse.org/eclipse/downloads/documentation/ 2.0/html/plugins/org.eclipse.platform.doc.isv/reference/exte nsion-points/org_eclipse_ui_startup.html

> Let me know if this answers your question.

> regards,
> Jakub Jurkiewicz

Thanks a lot,

that works like a charm :)

The interesting fact is, that with adding this extension point to the
plug-in, the 'start' method from the Activation class is called already
and prior to the 'earlyStartup' method of the Startup class. So there is
no need for me to create such a Startup class and put all needed
functionality in the 'start' class, like I already did. :)

regards
Dirk Reinelt
Re: Automatic activation of plug-ins [message #191131 is a reply to message #191008] Wed, 31 January 2007 16:49 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Dirk" <dirk.reinelt@mb.uni-magdeburg.de> wrote in message
news:6376c8877b09b566c423191a2e30f61e$1@www.eclipse.org...
> Jakub Jurkiewicz wrote:
>> [...early startup extension...]
>
>
> The interesting fact is, that with adding this extension point to the
> plug-in, the 'start' method from the Activation class is called already
> and prior to the 'earlyStartup' method of the Startup class. So there is
> no need for me to create such a Startup class and put all needed
> functionality in the 'start' class, like I already did. :)

Three things.

First, you should be aware that using earlyStartup is very discouraged.
It's best used when you're writing an RCP application that users will not be
extending, as opposed to when you're writing plug-ins intended to be used in
the context of Eclipse. By using earlyStartup, you're forcing users to pay
the cost of loading your plug-in (and any other plug-ins it depends on)
every time they start Eclipse for any reason. There is almost always a
better solution, even though it may involve some compromise - if you look at
how other plug-ins have solved the problem, you can get ideas.

If you say a bit more about why you think you need earlyStartup, people on
this list may be able to give you suggestions on how to avoid using it.

Second, you should NOT implement earlyStartup in your Activator class; you
should use a separate class. Doing it in the Activator can cause all sorts
of load-time problems, like endless load loops and deadlocks. Let OSGi
separate the tasks of loading your bundle and doing the earlyStartup work.

Third, try to avoid any lengthy operations (and any operations that require
calls to UI code) in your plug-in's startup() method. They may result in
the plug-in failing to load, and they will definitely interfere with Eclipse
loading.


These topics are frequently discussed here and on eclipse.platform, so you
may want to spend some time browsing the newsgroup archives before
proceeding.
Previous Topic:Redirect actions with a MultiPageEditorActionBarContributor
Next Topic:How do I combine programs from various projects?
Goto Forum:
  


Current Time: Tue Apr 23 08:19:41 GMT 2024

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

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

Back to the top