score:155

Accepted answer
  1. open the preferences window
  2. search for "diff"
  3. select quick diff
  4. change the "use this reference source" to a scm provider (like cvs, svn or git)

by default, it compares to the latest version on disk, which, if you've saved the file, is no diff at all. you have to activate the comparison against a scm repo. i'm not sure what happens if you more than one type of scm since this is only a single selection.

score:0

in eclipse too you will get the line highlighted which is changed util you save the file. and highlight is nothing but the change in color at the left panel of the editor before the start of that changed line.

score:2

there are at least two things you must do to get revision-based change highlighting (i.e., ones that do not disappear when the file is saved) to show up in eclipse's "overview ruler" when using git:

  1. prior to import, make sure that preferences > team > git > projects > automatically share project that are located inside git repositories is checked or import the project into your workspace using import... > git > projects from git (as pointed out by @cornelius in a comment on another answer)
  2. enable quick diff and select "a git revision" as the reference source: preferences > editors > text editors > quick diff

score:3

egit plugin's quick diff does exactly the same as netbans modified lines feature.

http://wiki.eclipse.org/egit/user_guide/state

score:3

for eclipse version: 2019-03 (4.11.0) go to

  1. select 'window'
  2. select 'preferences'
  3. go to general -> editors -> text editors -> quick diff
  4. tick 'enable quick diff'
  5. tick 'show differences in overview ruler'
  6. if you want to keep the changes after you save your local copy, then you need to tell the eclipse to compare the local copy with the repository version. to do that change the reference source accordingly.

    enter image description here

score:4

right-click on the file > team > show annotation.
a brown tape will appear on the left-side of the code (it represents commited lines), and the modified lines will be shown in white.

score:4

in eclipse by using its quick diff feature. this is easy to do:

  1. go to window -> preferences -> general -> editors -> text editors -> quick diff. this is the dialog from where it can be configured.
  2. turn on quick diff, by enabling the option enable quick diff.
  3. choose the version control system for which quick diff is needed from the dropdown use this reference source. git, svn and cvs should be present here. mercurial appears if the mercurialeclipse plugin is installed.
  4. the overview ruler is the ruler to the right of the scrollbar in the editor. if you would like to see the uncommitted lines to be marked on it, enable the option show differences in overview ruler.
  5. choose apply and ok. close all editor windows and reopen the source file that you want in the editor.

you should be able to see the newly added, modified or deleted lines marked in colors in the left bar on which line numbers are usually displayed. the colors used are the ones set in the quick diff dialog (see above steps). you can also view these uncommitted locations marked along the overview ruler on the right.

score:5

with subversive, you can do team > show annotations, and it will annotate the lines with the author and date of the last modification of that line.


Related Query

More Query from same tag