Suppressing lazy loading of a plugin? [message #331044] |
Thu, 21 August 2008 21:48  |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
Hi,
I would like to add a resource change listener to the workspace when
Eclipse starts. This is of course relatively straight forward. The
problem is that my plugin is not instantiated until the user uses one of
its features (eg selecting a menu item). This is far too late - I need
my plugin to be automatically started when Eclipse starts up.
How do I do that?
Thanks,
Nick
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331045 is a reply to message #331044] |
Thu, 21 August 2008 21:52   |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
I'm becoming a master of answering my own questions! It looks like I
just need to change Eclipse-LazyStart to false in MANIFEST.MF.
Nick
Nicholas Allen wrote:
> Hi,
>
> I would like to add a resource change listener to the workspace when
> Eclipse starts. This is of course relatively straight forward. The
> problem is that my plugin is not instantiated until the user uses one of
> its features (eg selecting a menu item). This is far too late - I need
> my plugin to be automatically started when Eclipse starts up.
>
> How do I do that?
>
> Thanks,
>
> Nick
|
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331047 is a reply to message #331046] |
Thu, 21 August 2008 22:22   |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
Ok - but my plugin is tiny (currently 30kb). Will it really be that slow?
Also, if I understood correctly I can only register a save participant
once my plugin is loaded - right? Once I register I get a backlog of
changes sent to me that may have happened a long time ago. If I am
correct in this assumption then this will not work for what I want. Let
me know if I am mistaken - I am still extremely new to Eclipse.
Cheers,
Nick
Rich Kulp wrote:
> BUT don't do it! It is very expensive. Many plugins think they need this
> and then it really slows down the startup.
>
> Instead use the Save Participant interface instead.
>
> See
>
> http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
>
>
> Nicholas Allen wrote:
>> I'm becoming a master of answering my own questions! It looks like I
>> just need to change Eclipse-LazyStart to false in MANIFEST.MF.
>>
>
>
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331048 is a reply to message #331045] |
Thu, 21 August 2008 22:30   |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
Nicholas Allen wrote:
> I'm becoming a master of answering my own questions! It looks like I
> just need to change Eclipse-LazyStart to false in MANIFEST.MF.
Actually, it seems I need to use the org.eclipse.startup extension point
to achieve this. Eclipse-LazyStart false means my plugin never starts...
Nick
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331063 is a reply to message #331047] |
Fri, 22 August 2008 12:54   |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You are one small plugin, but they all add up.
Why can't you respond once your plugin is activated. Why do you need to
listen to the resources immediately? What would you do right away that
couldn't be done later when your plugin is finally activated?
Nicholas Allen wrote:
> Ok - but my plugin is tiny (currently 30kb). Will it really be that slow?
>
> Also, if I understood correctly I can only register a save participant
> once my plugin is loaded - right? Once I register I get a backlog of
> changes sent to me that may have happened a long time ago. If I am
> correct in this assumption then this will not work for what I want. Let
> me know if I am mistaken - I am still extremely new to Eclipse.
>
> Cheers,
>
> Nick
>
> Rich Kulp wrote:
>> BUT don't do it! It is very expensive. Many plugins think they need this
>> and then it really slows down the startup.
>>
>> Instead use the Save Participant interface instead.
>>
>> See
>>
>> http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
>>
>>
>> Nicholas Allen wrote:
>>> I'm becoming a master of answering my own questions! It looks like I
>>> just need to change Eclipse-LazyStart to false in MANIFEST.MF.
>>>
>>
--
Thanks,
Rich Kulp
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331081 is a reply to message #331063] |
Sat, 23 August 2008 16:00   |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
I am writing a plug-in for the Bazaar version control system. If the
user renames a file (eg by renaming a class) I need to tell Bazaar that
the file has been moved as soon (or shortly after) that happens. If I
have not added a listener when Eclipse starts then I will not hear about
any file moves until the user uses one of my menu commands. This could
be hours (or even days) later - I can't see how this could ever work...
Nick
|
|
|
|
Re: Suppressing lazy loading of a plugin? [message #331084 is a reply to message #331083] |
Sun, 24 August 2008 12:49   |
Eclipse User |
|
|
|
Originally posted by: nick.allen.onlinehome.de
AFAICT the Team API is not particularly good for distributed version
control systems. For example, it forces users to register the VCS for
each branch (my plug-in auto detects this). The Team stuff is much more
oriented towards centralized VCS. If it's possible to have rename
support without any configuration from the user (as is currently
possible in my plug-in) then I may consider using it instead. If it
requires the user to invoke Team/Share... from context menu for each
branch (which is what I think is required from my limited
investigations) then I definitely won't use it for rename support...
Nick
Prakash G.R. wrote:
> Nick,
>
> I might be wrong, but IMHO, if you are creating plugins for the
> version control system, probably you should be hooking into the team
> api. Not the IResouceChangeListener
>
> - Prakash
>
> www.eclipse-tips.com
>
>
> Nicholas Allen wrote:
>> I am writing a plug-in for the Bazaar version control system. If the
>> user renames a file (eg by renaming a class) I need to tell Bazaar that
>> the file has been moved as soon (or shortly after) that happens. If I
>> have not added a listener when Eclipse starts then I will not hear about
>> any file moves until the user uses one of my menu commands. This could
>> be hours (or even days) later - I can't see how this could ever work...
>>
>> Nick
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05261 seconds