Intercept Save-Action [message #156408] |
Thu, 13 November 2003 15:15  |
Eclipse User |
|
|
|
Hi,
is it possible to intercept the saving of an opened editor?
I am trying to implement an auto-format/auto-organize-imports feature,
and my first aproach (using an incremental project builder) does not seem
to work out.
Thank you,
Lars
|
|
|
|
Re: Intercept Save-Action [message #156831 is a reply to message #156575] |
Fri, 14 November 2003 09:43   |
Eclipse User |
|
|
|
Hi Jae,
thanks for your hint I'll try this corner.
For your question, actually it's no project at all, I am just develpoing a
set of useful tools for the firm I am working for.
Once I get a working version I'll package into a seperate plugin and send
you a copy...
It could take a while because I am doing this mostly in my free time.
On the other side there are a couple of feature requests lurking around
regarding this specific feature (for instance
https://bugs.eclipse.org/bugs/show_bug.cgi?id=6749), so there is a chance
that such a feature will be include into eclipse itself...maybe...sometime
regards,
Lars
jae wrote:
> have you tried using a resource change listener instead of a project builder?
> you may have better luck w/ that. i believe you could listen for a
> PRE_AUTOBUILD event that is triggered whenever an auto-build needs to occur
> (which i believe will occur on a save event) - b/c the resource is not
locked,
> you will be able to modify the contents of the workspace.
> on a seperate note, where is this project hosted? this is a great plugin
idea
> and i'd be very interested in using it once you get it working.
> -jae
> On Thu, 13 Nov 2003 20:15:04 +0000 (UTC), rookie_no2@web.de (Lars
Köderitzsch)
> wrote:
> >Hi,
> >
> >is it possible to intercept the saving of an opened editor?
> >I am trying to implement an auto-format/auto-organize-imports feature,
> >and my first aproach (using an incremental project builder) does not seem
> >to work out.
> >
> >Thank you,
> >Lars
|
|
|
Re: Intercept Save-Action [message #156861 is a reply to message #156831] |
Fri, 14 November 2003 10:09  |
Eclipse User |
|
|
|
Originally posted by: jgangemi.yahoo.com
there is some pretty good documentation on resource changes in the online
help (altho i don't remember where specifically). it gives you some sample code
snippetts on how to traverse the changed deltas, etc.
and you've just given me an idea for another plugin that would follow this
same idea, so i'll follow up w/ you again if and when i start it's
implementation.
-jae
On Fri, 14 Nov 2003 14:43:47 +0000 (UTC), rookie_no2@web.de (Lars Ködderitzsch)
wrote:
>Hi Jae,
>
>thanks for your hint I'll try this corner.
>For your question, actually it's no project at all, I am just develpoing a
>set of useful tools for the firm I am working for.
>Once I get a working version I'll package into a seperate plugin and send
>you a copy...
>It could take a while because I am doing this mostly in my free time.
>
>On the other side there are a couple of feature requests lurking around
>regarding this specific feature (for instance
>https://bugs.eclipse.org/bugs/show_bug.cgi?id=6749), so there is a chance
>that such a feature will be include into eclipse itself...maybe...sometime
>
>regards,
>Lars
>
>jae wrote:
>
>> have you tried using a resource change listener instead of a project builder?
>> you may have better luck w/ that. i believe you could listen for a
>> PRE_AUTOBUILD event that is triggered whenever an auto-build needs to occur
>> (which i believe will occur on a save event) - b/c the resource is not
>locked,
>> you will be able to modify the contents of the workspace.
>
>> on a seperate note, where is this project hosted? this is a great plugin
>idea
>> and i'd be very interested in using it once you get it working.
>
>> -jae
>
>
>> On Thu, 13 Nov 2003 20:15:04 +0000 (UTC), rookie_no2@web.de (Lars
>Köderitzsch)
>> wrote:
>
>> >Hi,
>> >
>> >is it possible to intercept the saving of an opened editor?
>> >I am trying to implement an auto-format/auto-organize-imports feature,
>> >and my first aproach (using an incremental project builder) does not seem
>> >to work out.
>> >
>> >Thank you,
>> >Lars
>
|
|
|
Powered by
FUDForum. Page generated in 0.02816 seconds