| Load my plugin at startup in particular order [message #334525] | 
Sun, 15 February 2009 23:55   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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. 
 
Please help me out how can I achieve this ? 
 
 
Thanks & Regards,
 |  
 |  
  | 
| Re: Load my plugin at startup in particular order [message #334539 is a reply to message #334525] | 
Mon, 16 February 2009 17:50    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: eclipse-news.rizzoweb.com 
 
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
 |  
 |  
  | 
| Re: Load my plugin at startup in particular order [message #334565 is a reply to message #334525] | 
Wed, 18 February 2009 06:21    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
With 3.5 M5 you can set start levels. 
 
see  http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5- 200902021535/eclipse-news-M5.html 
 
May be it was available before and the enhancement for M5 provides only a GUI, I don't know. 
 
Regards, 
 
Mariot 
 
 
Nayna a écrit : 
> 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. 
>  
> Please help me out how can I achieve this ? 
>  
>  
> Thanks & Regards, 
>
 |  
 |  
  | 
 | 
Powered by 
FUDForum. Page generated in 0.52022 seconds