Eclipse: How to show user who changed this line in CVS? - eclipse

Someone once showed me a cool IntelliJ Idea plugin that would show all the user commit information from CVS right there in the Java source editor.
It had a vertical bar on the right of the window and every code block changed/committed by a user was highlighted with different color and mouse-over would show the details about user and version etc.
I am craving for something similar in Eclipse.
Any pointers?

Are you looking for this?
Right-click on a file, choose "Team", "Show annotation" and you'll see who last edited which line of code.
Here is an illustration from the "What's New in Eclipse 3.2" article from onjava.com, which adds:
Hovering over a change block will show the developer name, date, and comments that were entered for that change. It will also highlight other sections of code in the rest of the file that were contributed in the same revision.
(source: onjava.com)

Related

How to get the length of the selected word in the eclipse?

When I am checking the naming rules for my code. If i got variable or function name have more letters than allowed ERROR. I count the total character by manually or have to copy paste into Notpad++. Is there is any options to find the number of selected characters in eclipse.
Eclipse does not provide a way to display the length of a text selection like NotePad++.
Bug 73904: Show length of selection in status box was raised in 2004 (!!!) to add this feature but it still hasn't been implemented.
The good news is that someone has written a plugin named getStringLength to do exactly what you want, as mentioned in a comment in the Eclipse Bug Report:
Eclipse plugin that add the selected text counter on the right side of
the column and row position in the Eclipse status bar. After you
double click the text, this plug-in will show the length of text you
selected in the eclipse status bar; in the case you select more than
one row it will show the number of rows selected, like Notepad++ do.
The bad news is that I couldn't get it to work properly. After adding the plugin to Eclipse's dropins folder the status bar is updated as described, but the details are misaligned and not rendering correctly:
Through careful testing I can see that the plugin actually is updating the length of the selected text, but the entry on the status bar is practically illegible. Still, in the absence of anything else, it is worth trying - perhaps you will have better luck in your environment. Let us know if it works for you.
You don't need a plugin anymore with Eclipse 2019-09:
Editor status line shows more selection details
The status line for Text Editors now shows the cursor position, and when the editor has something selected, shows the number of characters in the selection as well.
This also works in the block selection mode.
These two new additions to the status line can be disabled via the General > Editors > Text Editors preference page.
i has fixed error rendering in eclipse version=4.12.0 on windows 10, with steps.
clone project (getStringLength project)
import to
edit file com.lyf.plugin.getStringLength.SelectedTextInfoControlContribution.java (line 26).
#Override
protected Control createControl(Composite parent) {
parent.getParent().setRedraw(true);
......
}
build plugin:
1. Right-click your plugin project in Package Explorer window.
2. Press Export... in shown context menu.
3. Select Plug-In Development -> Deployable plug-ins and fragments (or Deployable plug-ins and fragments directly in old Eclipses).
4. Close Eclipse. Copy this JAR to eclipse/plugins/ path. Run Eclipse again.
Good luck!

show code modification overview in ecplise IDE

i am using an eclipse based IDE and have a library with some files that i need to make additions/changes to. what is the best way to quickly see the all the modifications of all files in a list/tab in eclipse IDE?
i know there is the useful "#TODO" tag that shows all tasks in a nice view/tab. as im using this quite heavily, i would like to have a special view/tab that just shows the modifications and separates them from the todos.
EDIT:
thx for the suggestions and the local history tipp.
sorry for not making myself clearer. ive added a screenshot.
when i add "TODO" the tasks show up in the tab marked in red - i dont mind setting manually something (like a bookmark) as im not going to make a lot of changes, but ideally they show up like the tasks or another simple overview.
It's could depend of your version control system.
For each, eclipse purpose an associated plugin with a specific view.
Instead that, you could use the History view (Team/ Show local History after a right clic on a file).
Eclipse keeps a history of your changes for a limited number of days (configured in 'Preferences > General > Workspace > Local History'). You can right click on a file and choose 'Compare With > Local History' to see the changes between revisions.
To track all your changes you need to use one of the source control systems (such as SVN, GIT, ...). Eclipse has plugins to support these systems. Once you have installed one of these you can use the 'Team' menu to commit changes and look at the history.
found it!
by clicking "window" - "Show view" - "other" one needs to select the "bookmarks". the bookmarks then show up as a tab next to tasks.
by clicking the right small arrow the bookmark view menu pops up (similiar to the screenshot above with the task menu). the bookmark view can then be configured/filtered by clicking the "Configure contents..." menu link.

Eclipse IDE lost popup menu suggestions

I've seem to have lost the ability in my Eclipse to auto-correct errors in my source code lines.
For example, a line like this:
Date date = new Date();
has red jagged lines beneath the Date() part. Previously I could mouse hover over it see a popup menu of options to fix it. Now I all I ever get is a popup with the text "Cannot resolve to a type".
The only change I can think of that I've made and I don't know if it has anything to do with this problem, is that I started editing my .java files with an outside editor. Then focusing back into Eclipse I get a popup saying the source has changed and do I want to update so I say OK.
Sometimes I will edit inside Eclipse and sometimes i will edit the source outside of Eclipse. I'm not sure if this is a bad practice or not?
Its your wish to edit Java files outside or inside eclipse. But Java editor has many features which are very helpful to developers. I suggest to edit Java files inside eclipse only.If you find other editors are good or you used to it then no problem you can edit Java files out side eclipse also. The problem you mentioned in not related to it. But make sure that changes are applied before building project in eclipse.
Solution
This occurs whenever there are multiple classes are available with the same name in you build path then eclipse don't know which one to import by default. So keep the caret on the error line and press Ctrl+1. Then a eclipse gives options to user to import one among these. See the picture below. Choose the right one then error will disappear.

Animate commits inside IDE to learn codebase, an idea?

Go back in time in the codebase and see the commits as an animated explanation of how the codebase was formed. a great way to get into a open source project?
For insance if you could play this inside Eclipse, so that the comments the time and the reason for the commit become clear.
Is there such a thing?
A static (i.e. non-animated) version of "going back in time" is EGit blame (annotations):
Selecting the Team > Show Annotations action on file selections will open the editor and display an annotation ruler with commit and author information for each line in a file.
Hovering over the ruler will display a pop-up showing the commit id, author, committer, and the commit message.

Eclipse code line change

I often switch from Eclipse to Netbeans and back. There is a feature in Netbeans that allows you to see changed lines in code due to repository.
Example:
Is there something similar in Eclipse?
Yes, right click the file Team -> Show Annotation... When you hover over the colored line numbers you see the committing user and the commit message. If it is a local change it is just white.