Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeLens style in-context information in IntelliJ IDEA

For a while now, newer versions of Visual Studio have been able to display in-line information for methods, fields etc relating to how many times they may have been referenced or changed and who changed the code last. This feature is known as CodeLens.

Image showing CodeLens feature

Is there any plugin or feature in IntelliJ IDEA similar to this that would be able to display information on an individual class/field/method basis?

like image 561
Adam Williams Avatar asked Aug 23 '15 15:08

Adam Williams


People also ask

What is context in IntelliJ?

Save context on commit: every time you commit changes, IntelliJ IDEA creates a new closed local task that keeps files, bookmarks, and breakpoints that you have worked with. This way, you can quickly restore all tabs associated with the task any time in the future.

How can I view source code in IntelliJ?

From the main menu, select View | Show Siblings. IntelliJ IDEA opens a popup where you can browse through the implementations, navigate to source, edit code, and open the list in the Find tool window.

How do I get to method definition in IntelliJ?

In IntelliJ IDEA, you can see where and how symbols, such as tags, classes, fields, methods, or functions are defined in your project. For this purpose, the IDE features the Quick Definition popup. To view definition of a symbol, select it in the editor and press Ctrl+Shift+I (or click View | Quick Definition).


2 Answers

There is no such plugin (yet).

You can of course right click the left gutter (gray editor to the left of the editor) and select "Annotate". That gives you at least the last edit per line.

More similar to your desired feature (but unfortunately not inline): Select some text (e.g. a method), then right-click Git -> Show History for Selection.

like image 146
Stephen Friedrich Avatar answered Oct 09 '22 02:10

Stephen Friedrich


Now there is JetBrains plugin named GitToolBox.

It has some similar functionality, including the current line "blame annotation" at the end of the line with detailed commit information:

enter image description here

like image 30
kli Avatar answered Oct 09 '22 02:10

kli