Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Auto clean up
Auto clean up [message #239141] Thu, 21 December 2006 13:49 Go to next message
Eclipse UserFriend
Hello,

I always resort the members, format the sources before I save them. I
would also cleanup stuff like the ones in the cleanup dialog. Since I am
obsessed with the coding cleanly, sometimes sorting members give me
headaches. This is as follows,
- I start to edit a source file.
- Introduce new methods and / or fields.
- commit to cvs before sorting the members.
- later, edit the source again. This time sort the members.
- Others edit the same source. They end up with a long list of scrambled
compare editor to resolve conflict.

I think for those like me, a switch somewhere to set auto-clean up
before save would be much appreciated.

If other users/JDT committers find this idea worthwhile, I will open up
a request for enhancement in the JDT bugzilla.

Hasan Ceylan
Re: Auto clean up [message #239145 is a reply to message #239141] Thu, 21 December 2006 14:04 Go to previous messageGo to next message
Eclipse UserFriend
Please ignore this post. JDT team seems to be one step ahead.


Hasan Ceylan wrote:
> Hello,
>
> I always resort the members, format the sources before I save them. I
> would also cleanup stuff like the ones in the cleanup dialog. Since I am
> obsessed with the coding cleanly, sometimes sorting members give me
> headaches. This is as follows,
> - I start to edit a source file.
> - Introduce new methods and / or fields.
> - commit to cvs before sorting the members.
> - later, edit the source again. This time sort the members.
> - Others edit the same source. They end up with a long list of scrambled
> compare editor to resolve conflict.
>
> I think for those like me, a switch somewhere to set auto-clean up
> before save would be much appreciated.
>
> If other users/JDT committers find this idea worthwhile, I will open up
> a request for enhancement in the JDT bugzilla.
>
> Hasan Ceylan
Re: Auto clean up [message #239155 is a reply to message #239145] Fri, 22 December 2006 04:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Hasan Ceylan wrote:
> Please ignore this post. JDT team seems to be one step ahead.

:-) we do our best. There is no sort members (yet) see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37496

Just out of interest: What other clean ups would you enable on save?

Benno

>
>
> Hasan Ceylan wrote:
>> Hello,
>>
>> I always resort the members, format the sources before I save them. I
>> would also cleanup stuff like the ones in the cleanup dialog. Since I
>> am obsessed with the coding cleanly, sometimes sorting members give me
>> headaches. This is as follows,
>> - I start to edit a source file.
>> - Introduce new methods and / or fields.
>> - commit to cvs before sorting the members.
>> - later, edit the source again. This time sort the members.
>> - Others edit the same source. They end up with a long list of
>> scrambled compare editor to resolve conflict.
>>
>> I think for those like me, a switch somewhere to set auto-clean up
>> before save would be much appreciated.
>>
>> If other users/JDT committers find this idea worthwhile, I will open
>> up a request for enhancement in the JDT bugzilla.
>>
>> Hasan Ceylan
Re: Auto clean up [message #239169 is a reply to message #239155] Sat, 23 December 2006 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Benno Baumgartner wrote:
> Hasan Ceylan wrote:
>> Please ignore this post. JDT team seems to be one step ahead.
>
> :-) we do our best. There is no sort members (yet) see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=37496
>
> Just out of interest: What other clean ups would you enable on save?

Hello Benno,
you certainly do it very well. ;)

I later noticed that but hadn't posted back again yet.
As I am a human-robot build to obey clean coding rules, I enable 'em
all. But the most valuable ones would be sort members (due to cvs diff
prob), format source, "use this for qualifier for field access", unused
imports, @override annotation, generated serial version UID...

By the way, if these are set in the preferences, do they get honored
during the preferences export/import functionality.

Because, I also force the coding styles and (now cleanup) to my team.

I would like the idea of dumping the preference in the cvs together with
these settings.

Regards,
Hasan Ceylan

>
> Benno
>
>>
>>
>> Hasan Ceylan wrote:
>>> Hello,
>>>
>>> I always resort the members, format the sources before I save them. I
>>> would also cleanup stuff like the ones in the cleanup dialog. Since I
>>> am obsessed with the coding cleanly, sometimes sorting members give
>>> me headaches. This is as follows,
>>> - I start to edit a source file.
>>> - Introduce new methods and / or fields.
>>> - commit to cvs before sorting the members.
>>> - later, edit the source again. This time sort the members.
>>> - Others edit the same source. They end up with a long list of
>>> scrambled compare editor to resolve conflict.
>>>
>>> I think for those like me, a switch somewhere to set auto-clean up
>>> before save would be much appreciated.
>>>
>>> If other users/JDT committers find this idea worthwhile, I will open
>>> up a request for enhancement in the JDT bugzilla.
>>>
>>> Hasan Ceylan
Re: Auto clean up [message #239174 is a reply to message #239169] Sat, 23 December 2006 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Hasan Ceylan wrote:
> By the way, if these are set in the preferences, do they get honored
> during the preferences export/import functionality.
>
> Because, I also force the coding styles and (now cleanup) to my team.
>
> I would like the idea of dumping the preference in the cvs together with
> these settings.

If you enable them as "Project Specific" in the Project Properties
dialog, they will be stored in a .settings directory in your project,
which can be checked in along with .project and .classpath.

Hope this helps,
Eric
Re: Auto clean up [message #239218 is a reply to message #239169] Mon, 25 December 2006 03:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Hasan Ceylan wrote:
> Benno Baumgartner wrote:
>> Hasan Ceylan wrote:
>>> Please ignore this post. JDT team seems to be one step ahead.
>>
>> :-) we do our best. There is no sort members (yet) see
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=37496
>>
>> Just out of interest: What other clean ups would you enable on save?
>
> Hello Benno,
> you certainly do it very well. ;)
>
> I later noticed that but hadn't posted back again yet.
> As I am a human-robot build to obey clean coding rules, I enable 'em
> all. But the most valuable ones would be sort members (due to cvs diff
> prob), format source, "use this for qualifier for field access", unused
> imports, @override annotation, generated serial version UID...

Hi Hasan

Unfortunately we have to turn off generate SUID on save, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=163797

Benno

>
> By the way, if these are set in the preferences, do they get honored
> during the preferences export/import functionality.
>
> Because, I also force the coding styles and (now cleanup) to my team.
>
> I would like the idea of dumping the preference in the cvs together with
> these settings.
>
> Regards,
> Hasan Ceylan
>
>>
>> Benno
>>
>>>
>>>
>>> Hasan Ceylan wrote:
>>>> Hello,
>>>>
>>>> I always resort the members, format the sources before I save them.
>>>> I would also cleanup stuff like the ones in the cleanup dialog.
>>>> Since I am obsessed with the coding cleanly, sometimes sorting
>>>> members give me headaches. This is as follows,
>>>> - I start to edit a source file.
>>>> - Introduce new methods and / or fields.
>>>> - commit to cvs before sorting the members.
>>>> - later, edit the source again. This time sort the members.
>>>> - Others edit the same source. They end up with a long list of
>>>> scrambled compare editor to resolve conflict.
>>>>
>>>> I think for those like me, a switch somewhere to set auto-clean up
>>>> before save would be much appreciated.
>>>>
>>>> If other users/JDT committers find this idea worthwhile, I will open
>>>> up a request for enhancement in the JDT bugzilla.
>>>>
>>>> Hasan Ceylan
Re: Auto clean up [message #239222 is a reply to message #239174] Mon, 25 December 2006 03:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Eric Rizzo wrote:
> Hasan Ceylan wrote:
>> By the way, if these are set in the preferences, do they get honored
>> during the preferences export/import functionality.
>>
>> Because, I also force the coding styles and (now cleanup) to my team.
>>
>> I would like the idea of dumping the preference in the cvs together
>> with these settings.
>
> If you enable them as "Project Specific" in the Project Properties
> dialog, they will be stored in a .settings directory in your project,
> which can be checked in along with .project and .classpath.
>
> Hope this helps,
> Eric

This is correct for the clean up action settings. This is not yet
possible for the save participant settings, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168403 This enhancement is
tagged for 3.3M5

Benno
Re: Auto clean up [message #239226 is a reply to message #239218] Mon, 25 December 2006 14:36 Go to previous message
Eclipse UserFriend
Thanks for all the comments/answers...
Previous Topic:Multiple javaw.exe?
Next Topic:How to prevent out of memory errors?
Goto Forum:
  


Current Time: Sat Jun 07 10:14:42 EDT 2025

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

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

Back to the top