Refactoring, hints / tips and tools.

Forums for specific tips, techniques and example code
User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Refactoring, hints / tips and tools.

Postby Dr Danyo » Thu Sep 09, 2010 11:04 pm

Just to pick everyone's brains...

The feature I use the most when refactoring JADE code is the "Copy Highlighted Text Only" check box on the "Copy Method As" dialogue. If anyone has any advice or could recommend any tools I would be grateful to hear from you.

regards,
Dr Danyo

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Refactoring, hints / tips and tools.

Postby BeeJay » Fri Sep 10, 2010 11:56 am

The feature I make the most use of, at least in 6.3.xx systems, is the multiple clipboards.

I find this very useful when you're copying the same code snippets, and especially when you have more than 1 code snippet, into many different "unrelated" classes where the code can't be inherited from a common superclass.

Cheers,
BeeJay.

User avatar
ghosttie
Posts: 181
Joined: Sat Aug 15, 2009 1:25 am
Location: Atlanta, GA, USA
Contact:

Re: Refactoring, hints / tips and tools.

Postby ghosttie » Sat Sep 11, 2010 1:40 am

Jade has multiple clipboards?
I have a catapult. Give me all the money or I will fling an enormous rock at your head.

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Refactoring, hints / tips and tools.

Postby BeeJay » Sat Sep 11, 2010 5:38 pm

Yes. It's a two stage key sequence very similar to the standard Ctrl+C and Ctrl+V as follows:

To copy to one of the 10 multiple clipboards
1. Press Ctrl+Alt+C and release.
2. Press one of the numeric keys 1 through 0 to copy the current selection to one of the 10 clipboards

To paste from one of the 10 multiple clipboards
1. Press Ctrl+Alt+V and release
2. Press one of the numeric keys 1 through 0 to paste the contents.

These clipboards operate independent of the standard Ctrl+C and Ctrl+V clipboard but they only work within a given IDE instance. ie: They don't work across different IDE instances but they're still exceedingly useful.

Note: I've yet to go beyond 4 clipboards as you do have to remember the contents of each clipboard yourself. I've also used keyboard bindings to replicate this using Ctrl+Alt+Insert and Shift+Alt+Insert to extend the standard Ctrl+Insert and Shift+Insert copy and paste option with the extended clipboards. (I always use Ctrl+Insert and Shift+Insert rather than Ctrl+C and Ctrl+V when I'm doing copy and paste.)

Another thing I find useful when working with some "long" methods is using the method splitter (Ctrl+Shift+W or just drag the resize bar at the bottom of the method source) and then size the top area of the split so that all the parameters & local variables are visible while reviewing the rest of the method logic.

Cheers,
BeeJay.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Refactoring, hints / tips and tools.

Postby Dr Danyo » Mon Sep 13, 2010 7:28 pm

Thanks BeeJay, I didnt know about either of those features, Ill give them a shot today.

Cheers.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Refactoring, hints / tips and tools.

Postby Dr Danyo » Tue Aug 16, 2011 2:02 am

I've been using the excellent open source multiple clipboard tool Ditto, it uses a db to persistent (and synch to multiple computers) your clipboard, supports searching and quick find and lets you store a huge number of clipboard entries.

http://ditto-cp.sourceforge.net/


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 3 guests