My favourite tips&tricks for the Best, Kick-Arse java IDE "IntelliJ IDEA".

Tuesday, December 14, 2004

Tip 1: comparing two code fragments (or two files) quickly.

Step 1 : select fragment 1 and copy it to clipboard.

Step 2 : select fragment 2 and right click it and select “compare with clipboard”. (Dont forget to select second code fragment, only then right-click on it.)
And voila…….. u can compare two code frags, with IDEA’s default diff plug-in.

U can use same technique to compare two files ;-)

More tips coming sooon. Keep looking………

Jigar.


=================================
Comments: by anon
=================================
You can also compare two local files with Idea's diffault diff plugin. Open project window by Alt+1. Select 2 files which u want to compare and then right click on mouse. select compare selected files option.
regards,
anon

=================================
my reply.
=================================

That’s right ,

But the issue sometime is , that two files are open in editor window, and we don’t know exactly where they are in the (directory structure) project window, (this can happen if we open the files using ctrl+N). And now if one file is in mailbox module and other is in obox/domains…. Then to locate these file in project window is a painful task , and the we have to scroll all the way, the control click two file……….. and u know the chore.

So this tip is for two files which are already open in editor and u want to quickly compare them (full file or code fragments). this method also uses IDEAs default diff plugin.

Jigar.

1 Comments:

Blogger Jigar Gosar said...

Well thats my Tip 2, http://ideatips.blogspot.com/2004/12/tip-2-altf1.html

thanks anyways,

12:11 PM

 

Post a Comment

<< Home