Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster dev » Bucky Workspace : save action : Sort members excluding fields, enum constants, and initializers
Bucky Workspace : save action : Sort members excluding fields, enum constants, and initializers [message #29442] Sat, 13 December 2008 09:42 Go to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Hi Buckminster developers,

I found myself not very comfortable with this save action : Sort members excluding fields, enum constants, and initializers.
Each time I'm creating new functions and hit Ctrl-s I get my code moved around and I loose time trying to figure out where it has gone. Moreover I like to get my semantically connected function to be grouped at the same place so you can read the code as a book. And finally, changing the Modifiers (public, static, protected, final ...) of my functions will move pieces into the file making SVN Diff tool less efficient to use.

For all these reasons I would be in favor of removing this save action.

Best regards,
Guillaume
Re: Bucky Workspace : save action : Sort members excluding fields, enum constants, and initializers [message #29478 is a reply to message #29442] Sat, 13 December 2008 10:51 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Guillaume,
The way members are ordered can be debated and we probably all have
different opinions on what rules to use for this ordering. The reason we
decided to enforce an order in the first place was that if we don't,
these individual opinions will create merge problems as members are
moved around according personal preferences.

It's my firm opinion that an enforced member order is far more important
then individual preferences. The more work we do in parallel on the
Buckminster code-base, the more important it gets.

That things are moved when the file is saved was something that I found
troublesome too at first, just like you do now, but over time I've
learned to appreciate it. Everything ends up in the right place no
matter where I start typing it. For me, it's actually a time saver now.
I never need to bother moving anything again.

Just an example:
I start writing a method. In the middle of it, I conclude that something
would be better of as a constant. I add the constant just above or below
the method, wherever it's convenient without scrolling. I finish typing
the method and I save. The method and the constant are automatically
positioned into their correct places.

Regards,
Thomas Hallgen

Guillaume Chatelet wrote:
> Hi Buckminster developers,
>
> I found myself not very comfortable with this save action : Sort members excluding fields, enum constants, and initializers.
> Each time I'm creating new functions and hit Ctrl-s I get my code moved around and I loose time trying to figure out where it has gone. Moreover I like to get my semantically connected function to be grouped at the same place so you can read the code as a book. And finally, changing the Modifiers (public, static, protected, final ...) of my functions will move pieces into the file making SVN Diff tool less efficient to use.
>
> For all these reasons I would be in favor of removing this save action.
>
> Best regards,
> Guillaume
Re: Bucky Workspace : save action : Sort members excluding fields, enum constants, and initializers [message #29513 is a reply to message #29442] Tue, 16 December 2008 08:52 Go to previous messageGo to next message
Filip Hrbek is currently offline Filip HrbekFriend
Messages: 233
Registered: July 2009
Senior Member
Hi Guillaume,

I absolutely agree with you that if the class members are not sorted and
they are ordered logically, the code is much more readable and does not
require so many comments. If you want to see the members in alphabetical
order, there's an outline view for that reason.

On the other hand, I also agree with Thomas even though I don't think
that it is a time saver at the moment of writing the actual code (the
constant example - for me it is faster to add a constant by typing the
constant name in place first and then have the definition generated by
the code assistant which places it to the top of the class anyway, then
I navigate to the newly created constant, I type the constant value and
then I navigate to its first usage, just a few clicks). However, it is
true that we have less merge conflicts when we all use the auto-sort
technique, that is why we agreed as a team to do so.

As a result of this, I got used to using this technique when working for
the buckminster team, and I don't use it when writing my hobby
applications for all the reasons you have mentioned :-)

Filip


Guillaume Chatelet napsal(a):
> Hi Buckminster developers,
>
> I found myself not very comfortable with this save action : Sort members excluding fields, enum constants, and initializers.
> Each time I'm creating new functions and hit Ctrl-s I get my code moved around and I loose time trying to figure out where it has gone. Moreover I like to get my semantically connected function to be grouped at the same place so you can read the code as a book. And finally, changing the Modifiers (public, static, protected, final ...) of my functions will move pieces into the file making SVN Diff tool less efficient to use.
>
> For all these reasons I would be in favor of removing this save action.
>
> Best regards,
> Guillaume
Re: Bucky Workspace : save action : Sort members excluding fields, enum constants, and initializers [message #30086 is a reply to message #29442] Wed, 14 January 2009 23:01 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Hi,
I absolutely hated this. I am very spatially oriented and had a fit when
first exposed to automatic ordering. This was on p2 code, and I just had
to adjust. Now after some time (months), I find that it actually saves
me time - I just "hack away" and do not care about placement of things,
where I am in the file etc. Saving just takes care of all that - my
productivity has increased as a consequence. But it was painful at first.

I find that I now rely more on either the outline, or CTRL-J
(incremental find) to to move around in the editor.

Regards
- henrik

Guillaume Chatelet wrote:
> Hi Buckminster developers,
>
> I found myself not very comfortable with this save action : Sort members excluding fields, enum constants, and initializers.
> Each time I'm creating new functions and hit Ctrl-s I get my code moved around and I loose time trying to figure out where it has gone. Moreover I like to get my semantically connected function to be grouped at the same place so you can read the code as a book. And finally, changing the Modifiers (public, static, protected, final ...) of my functions will move pieces into the file making SVN Diff tool less efficient to use.
>
> For all these reasons I would be in favor of removing this save action.
>
> Best regards,
> Guillaume
Previous Topic:[buckminster-dev] how to change buckminster.temp property?
Next Topic:[buckminster-dev] NoSuchMethodError while building using buckminster
Goto Forum:
  


Current Time: Thu Apr 25 16:46:10 GMT 2024

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

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

Back to the top