The best feature in 7M1 is an easter egg

So I was editing a file yesterday, and had to cut and paste a method. To my extreme surprise, IDEA highlighted the bodies of both them method and it's clone, telling me they were duplicates! Amazing! I've been wanting that feature forever, and here it's been in Selena for who knows how long, unannounced!

Enough exclamation points. The problem is that the functionality isn't really quite in Selena. It's in TeamCity, and only available if you jump through a lot of hoops. To get this the editor highlighting to happen, you need to

1) Be running TeamCity
2) Install the TeamCity plugin
3) Have an offline duplicates-checking build run profile for your project in TeamCity
4) Run the duplicate-checking build at least once
5) Tell IDEA you want to show the duplicates for that run in your editor.

If you do all of that, on-the-fly highlighting of in-file duplicate code is enabled automatically. Note that I'm not talking about seeing duplicates that your TeamCity duplicate-checker build found (although that's very cool too). Evidently the TeamCity plugin is doing it's own on-the-fly analyses as you edit.

Why this feature isn't in IDEA core I'll never begin to understand. Why it wasn't announced is even more bizarre.

--Dave Griffith

3 comments

Gee, I bought a TeamCity license with my Idea license, but never had a chance of using it because I ended up work at a client's site where Eclipse and CruiseControl are mandated
('course I sneaked in Idea for myself...)

Sigh, it seems I have to install TeamCity on my local machine only to get that feature.

0

Hello Dave,

So I was editing a file yesterday, and had to cut and paste a method.
To my extreme surprise, IDEA highlighted the bodies of both them
method and it's clone, telling me they were duplicates! Amazing!
I've been wanting that feature forever, and here it's been in Selena
for who knows how long, unannounced!


I wonder why you think that in-file duplicate analysis is really so amazing.
:) It may look cool, I admit, but as for actual usefulness, I feel that
inter-file analysis is much more useful. Inter-file analysis has many chances
to tell me something I don't know yet, while in-file analysis will in most
cases highlight something I already know (like your example: code I just
copy-pasted).

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

At least a 3 minutes "looking-cool" will help your marketing colleagues:)

0

Please sign in to leave a comment.