code organization/grouping tools?

G

google

hi,

i'm using rad6 (eclipse) for development.

let's say you have a class organized so that members and methods are
grouped, eg: members at the top, split up by static versus instance
variables, followed by methods static/instance, etc.

when you move or refactor elements in a class, it seems that rad6 just
appends the contents to the end of the class.

then i have to go and manually move all the elements around to where i
want them. this can be very time consuming in classes with a lot of
elements.

does anyone know of a tool that i can use to organize/group my class
contents? ideally an eclipse plugin would be preferred.

thanks,
steve
 
O

Oliver Wong

hi,

i'm using rad6 (eclipse) for development.

let's say you have a class organized so that members and methods are
grouped, eg: members at the top, split up by static versus instance
variables, followed by methods static/instance, etc.

when you move or refactor elements in a class, it seems that rad6 just
appends the contents to the end of the class.

then i have to go and manually move all the elements around to where i
want them. this can be very time consuming in classes with a lot of
elements.

does anyone know of a tool that i can use to organize/group my class
contents? ideally an eclipse plugin would be preferred.

In the version of Eclipse I'm using (3.1.0), you can right click on the
class and choose "Sort Members". You can configure the preferred order of
the members via Java->Appearance->Member Sort Order.

- Oliver
 
R

Robert Klemme

Oliver said:
In the version of Eclipse I'm using (3.1.0), you can right click
on the class and choose "Sort Members". You can configure the
preferred order of the members via Java->Appearance->Member Sort
Order.

It's present in 3.0 also. And you can configure the order via Window ->
Preferences -> Java -> Appearance -> Member Sort Order.

robert
 
S

sisu

thanks. that did the trick. i'd been using wsad prior to a few weeks
ago so i didn't see that new feature till now.

cheers,
steve
 
S

sisu

In the version I have, I do see that it is only present in one of the
"Source" dropdowns.

If I right click on the code itself, and open the Source options, I
don't see Sort Members.

If I am in J2EE perspective/Project Explorer, and I right click on the
classname and pick Source, it seems to appear on some classes, but not
on others (not sure why?)

If I open up the class structure, there is an icon with the of the
class. If I right click on that icon, and select Source then it always
seems to display this option.

Steve
 
R

Roedy Green

then i have to go and manually move all the elements around to where i
want them. this can be very time consuming in classes with a lot of
elements.

You can define your preferred order then use refactor | sort members.

Be careful. thIs can disturb static or instance init dependencies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top