days
-4
-2
hours
-1
0
minutes
-4
-8
seconds
-1
-5
search
JAX Developers Puzzle deadline approaching: Play for a chance to win a complimentary JAX London 2018 ticket!
Clone attack!

IntelliJ IDEA 15 dynamically warns developers of code duplicates

JAX Editorial Team
Cutouts image via Shutterstock

Some fresh news in from the gang developing IntelliJ IDEA 15, with the expansion of the handy ‘Locate Duplicates’ feature. The new addition also gives options for a quick fix if needed. Catch cloned code on-the-fly!

An average codebase usually contains significantly more code copies than you think. To eliminate this and make code more concise and stable, IntelliJ IDEA has introduced the Locate Duplicates feature. JetBrains Product Manager Andrey Cheptsov recently put the spotlight on the new addition on the JetBrains blog.

In recent weeks, users of the EAP version of the integrated development environment IntelliJ IDEA have been immersing themselves in newly available features. After having an initial play around with IntelliJ IDEA 15, the Locate Duplicates feature has now be expanded and improved upon.

SEE ALSO: An early look at the IntelliJ IDEA 15 features

The latest IntelliJ IDEA 15 EAP Build now provides a more dynamic application to the inspection of duplicate code, or as Cheptsov says, takes “duplicates analysis to an entirely new level”. If a user has either unknowingly or accidentally created a duplicate, the system will tell you outright.

The analysis also includes quick-fixes and allows for easy navigation to the appropriate code or the choice to display in a tool window.

IntelliJ-IDEA-15-EAP-quelltextklon-suche

The new inspection to check for copies is called Duplicated Code and is enabled by default. To toggle it, go to SettingsEditor → Inspections. You can also run it on an entire project (or a custom scope) any time via Run Inspection by Name.

However, a warning for the non-Java types: The feature is currently only available for Java, due to the relatively early stages of development that Intellij IDEA 15 finds itself in. Cheptsov says that rare false positives could be expected and to report them if they pop up.

Some other fixes at this stage of development include a cleanup of the big, blurry fonts and icons in the Editor on Linux, and the ‘not working’ Terminal on Windows 10 issue.

Other features of the latest builds can the found over on the changelog.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of