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

4

25

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:

Foreknowledge answered 11/7, 2017 at 14:18 Comment(2)
Right click on the left margin -> Show Revision Information.Afterdamp
It is also worth remembering that EGit is does not implement git worktrees (submodules also appear broken?) #59407308 and simply does not recognize them as Git repositories. One easy way to check is to do a search "Ctrl + H", select "Git Search" and then look at the repository list.Sieber
J
36

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

Jacquelynnjacquenetta answered 30/10, 2018 at 16:6 Comment(0)
F
14

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

Foreknowledge answered 11/7, 2017 at 14:51 Comment(3)
FYI, you don’t have to open the “history for the file.” You can just select Team > Show Revision Information from the context menu in your editor or the Package Explorer. This saves the detour through the History view. Hope this helps.Martinsen
@AndreasSewe You don't even have to go through that menu. Just right click on vertical ruler on LHS and select "Show Revision Information".Traitor
Can you post a screenshot?Lotte
G
0

Just to add to user1821961's helpful answer on "Show Revision Information", besides lines that are colored by commit (and for which you can click to see the exact commit information), there may be others not colored. For those, you can click but won't see any commit information.

It turns out that those not-colored lines are where there are uncommitted changes.

This is verified with Eclipse 2018.

Gainey answered 26/9, 2021 at 7:3 Comment(0)
A
0

Although I am use latest version is not suitable for the question, but helpful for someone search info. I am using Eclipse IDE 2024-03. Left side bar (Where you see line numbers), right click, choose Revision.

enter image description here

enter image description here

Andes answered 5/4, 2024 at 2:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.