Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Intercept Save-Action
Intercept Save-Action [message #156408] Thu, 13 November 2003 15:15 Go to next message
Eclipse UserFriend
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 #156575 is a reply to message #156408] Thu, 13 November 2003 18:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jgangemi.yahoo.com

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 #156831 is a reply to message #156575] Fri, 14 November 2003 09:43 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Breakpoint - evaluating the return value of the method
Next Topic:Interactive Console for External tools..
Goto Forum:
  


Current Time: Fri May 09 13:08:59 EDT 2025

Powered by FUDForum. Page generated in 0.02816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top