Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Equivalent of IntelliJ's Annotate (or Git Blame)

It's been a minute since I've developed in Eclipse. Is there an equivalent of IntelliJ's annotate feature?

In essence, you right click on the margin and select annotate. After which in the margin you see who the last people were who made modifications to the code per line (like git's blame).

enter image description here

Other notes:

  • Version Control System I'm using is git.
  • Eclipse version is Neon.3 Release (4.6.3).
  • I have eGit installed.
  • I see this is possible with CVS
  • Read Eclipse with EGit, git-blame info is hard to see it looks like this was possible with indigo, but I don't see similar options described.
like image 748
James Oravec Avatar asked Jul 11 '17 14:07

James Oravec


2 Answers

In eclipse photon I've found I'm able to right click the gutter near the line numbers and click "show revision information".

enter image description here

the gutter is then highlighted different colors each line for what commit they belong to. Clicking the now colored line's number gutter I can peek at commit information. Here's the example header when doing so.

enter image description here

Edit: Sometime eclipse hides it this menu option under Team. Then you're stuck going through additional menus when you right click go to > Team > Show Revision Information

enter image description here

Sometimes to turn it off you may need to go to Revisions -> Hide Revision Information as the Show Revision Information button will not toggle the side gutter on/off, (only on). enter image description here

like image 120
user1821961 Avatar answered Nov 17 '22 19:11

user1821961


I figured out how to get things to work. Below is what I did to solve the issue.

Open the history for the file. Then right click on a previous commit. Select "Show Revision Information". From here you'll see the margin's line numbers now shows as different colors (assumes you have line numbers showing).

Now, Right Click on the margin -> Revisions -> Show Author

like image 42
James Oravec Avatar answered Nov 17 '22 20:11

James Oravec