Feature: Save Actions (whitespace and semicolon removal)

Feature: Save Actions (whitespace and semicolon removal)

Hi,

me and my team try to keep trailing whitespaces and unnecessary
semicolons out of Groovy files. With the GroovyEclipse plugin this means
a lot of manual work at the moment. Or pre-commit hooks in the VCS are
required. So I was wondering if this can be implemented as a save action
(same as the Java ones) in Eclipse.

1) Is there a chance this feature will make it in? Which timeline could
be expected?

2) Is there already some "save action" functionality? I just saw
GRECLIPSE-279.

3) If I want to contribute it. Where to start (in the source). Any tips?
Whom could I contact to get more details.

Regards,
René Scheibe

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

Re: Feature: Save Actions (whitespace and semicolon removal)

Hi Rene.

Yes, there are some save actions that are working. Organize imports,
indent and format have all been explicitly re-implemented for groovy
code. The other save actions have mostly been disabled since we don't
have any tests for them and don't really know if they would work.

Removing whitespace happens automatically when you do a format...or at
least it should, are you seeing something different? And this would
mean that if you enable the formatting save action, then whitespace
should be automatically removed.

As for semi-colon removal, if you are keen on implementing this, I can
definitely help, but I'd have to familiarize myself with the code a
bit since I didn't write it. If you are interested, I'd recommend
that you first implement it as part of the Groovy formatter. Please
raise a jira issue for this and we can discuss further.

> Hi,
>
> me and my team try to keep trailing whitespaces and unnecessary
> semicolons out of Groovy files. With the GroovyEclipse plugin this means
> a lot of manual work at the moment. Or pre-commit hooks in the VCS are
> required. So I was wondering if this can be implemented as a save action
> (same as the Java ones) in Eclipse.
>
> 1) Is there a chance this feature will make it in? Which timeline could
> be expected?
>
> 2) Is there already some "save action" functionality? I just saw
> GRECLIPSE-279.
>
> 3) If I want to contribute it. Where to start (in the source). Any tips?
> Whom could I contact to get more details.
>
> Regards,
> René Scheibe
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

Re: Feature: Save Actions (whitespace and semicolon removal)

On 06/21/2011 10:57 PM, Andrew Eisenberg wrote:

> Hi Rene.
>
> Yes, there are some save actions that are working. Organize imports,
> indent and format have all been explicitly re-implemented for groovy
> code. The other save actions have mostly been disabled since we don't
> have any tests for them and don't really know if they would work.
>
> Removing whitespace happens automatically when you do a format...or at
> least it should, are you seeing something different? And this would
> mean that if you enable the formatting save action, then whitespace
> should be automatically removed.

Yes, format (Shift + Ctrl + F) removes whitespaces. But it also performs
a lot of other stuff that can/will break manually formatted code. By the
way, is there any documentation, what format does?

The goal is to have fine grained settings (as the Java save actions) to
remove whitespaces and to remove semicolons. This cleanup should be
performed on every save, therefore save action, not on format, so it
cannot be missed.

> As for semi-colon removal, if you are keen on implementing this, I can
> definitely help, but I'd have to familiarize myself with the code a
> bit since I didn't write it. If you are interested, I'd recommend
> that you first implement it as part of the Groovy formatter. Please
> raise a jira issue for this and we can discuss further.
Organize imports already does semicolon removal. So I "only" have to
merge some functionality from format and organize imports into two save
actions. :-) Let's see how long it will take.

I just opened GRECLIPSE-1093.

Regards,
René Scheibe

> On Tue, Jun 21, 2011 at 11:58 AM, René Scheibe
> <[hidden email]> wrote:
>> Hi,
>>
>> me and my team try to keep trailing whitespaces and unnecessary
>> semicolons out of Groovy files. With the GroovyEclipse plugin this means
>> a lot of manual work at the moment. Or pre-commit hooks in the VCS are
>> required. So I was wondering if this can be implemented as a save action
>> (same as the Java ones) in Eclipse.
>>
>> 1) Is there a chance this feature will make it in? Which timeline could
>> be expected?
>>
>> 2) Is there already some "save action" functionality? I just saw
>> GRECLIPSE-279.
>>
>> 3) If I want to contribute it. Where to start (in the source). Any tips?
>> Whom could I contact to get more details.
>>
>> Regards,
>> René Scheibe
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit: