[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Load my plugin at startup in particular order

On 2/15/2009 11:55 PM, Nayna wrote:
Hi all,

I have written my own plugin to ask for some authentication required in
our case.

I wanted this plugin to run before any other plugin starts like CDT, JDT
etc.

When eclipse gets launched and is loading its other workbench plugins as
UI plugin, the same time I want it to start my plugin as well which is
supposed to be run as UI plugin.

I have used startup extension and implemented IStartup interface and
earlystartup() method of it. Though it runs when Eclipse gets launched
but I am facing following issues :-

1. It is started as one of the Worker thread, but I want it to be
started from UI thread i.e. (main / workebench) thread.
2. When Eclipse is launched with existing C/C++ projects in it, there is
no guarantee that my auth plugin gets loaded before CDT plugins. But I
want to assure that my plugin gets loaded first (though after core
platform plugins) and then CDT or other tool plugins. So, I want to
ensure this order.
3. I want this plugin to be launched always as part of UI thread.

First of all, you can use Display.asyncExec() to run a job on the UI thread.
Second, Eclipse does not allow for specifying particular ordering for plugin activation. It is designed to be loosely coupled and lazy-loading; ordering of plugins does not agree with those goals.
If you are building an RCP as opposed to just plugins that can be installed into any Eclipse, there are some options to trigger authentication at the "beginning," but it is not clear if that is what you are doing.


Eric