|
|
Re: Activate plugin during startup [message #327394 is a reply to message #327384] |
Thu, 17 April 2008 13:46 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
By the way, please be careful and do not use IStartUp unless truly
absolutely necessary. Eclipse is based upon the lazy-load mechanism
because if everyone tried to activate at startup then bringing up a
workbench or RCP would crawl to a stop. There are usually other ways to
handle things so that you don't need to be activated at startup.
For example this article though old contains much information that would
get rid of the need to start up immediately:
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
See the section on Save Participants if the reason you need to start up
immediately is so that you can listen to resource changes and do things
upon them. The Save Participants allows you to catch up later when you
actually do activate to any changes that have occurred since the last
time you were listening.
--
Thanks,
Rich Kulp
|
|
|
|
Re: Activate plugin during startup [message #327403 is a reply to message #327395] |
Thu, 17 April 2008 16:32 |
Walter Harley Messages: 847 Registered: July 2009 |
Senior Member |
|
|
"Roshan Soni" <roshan.soni1@gmail.com> wrote in message
news:e04078fe9ba1790c6642e0bb6c7bfbf9$1@www.eclipse.org...
> Thanks Mark, that was what I am referring to, I guess when I read it now
> it does make sense that they are just deprecating the usage of that form
> and not the class.
>
> Rich, I took a look at the article you pointed out and the last thing I
> want to do is startup a plugin at Eclipse startup, but I'm creating a sort
> of client server app that needs to run on Eclipse startup and receive
> messages from my client. My server app then accesses the UI and changes
> the perspective, opens a specific editor w/data from my DB, etc... If you
> have any suggestion on a better way for doing something like that, then
> I'm all ears.
One Eclipse install will often be used in multiple ways: e.g., in one
workspace I'm interested in J2EE projects, but in another perhaps I'm just
using it as a fancy XML editor, and in another I'm doing C++.
So the question you want to ask yourself is "should your functionality be
loaded in each of those cases", that is, if someone has installed your
plug-in into Eclipse should they be forced to use it whenever they use
Eclipse regardless of workspace or task.
If the answer is "yes", then loading at startup is appropriate. If the
answer is "no", then the next question is what the real trigger should be -
for instance, is it when a workspace containing projects with a particular
nature is opened.
You may be able to do a two-tier approach where you have a very small
plug-in that loads at startup and serves only to watch for events that would
provoke it to load the larger plug-in.
|
|
|
|
Powered by
FUDForum. Page generated in 0.08059 seconds