Howto enable Quick diff with plus and minus in Eclipse? - eclipse

i had a eclipse workspace. I used Galileo and Subclipse. I got the workspace from a associate. The following function was enabled:
There were signs shown to indicate differences to the svn state of the document, directly right beside the line numbers. If I added a line a "+" were shown. If I deleted a line a "-" were shown and a "~" when I edited a line.
I think this is much easier than the colored quick diff. Now I had to install the hole system again. I installed Eclipse Galileo and Subclipse again. Now I can't find the settings to enable this feature anymore.
How do I enable it?
Is this called Quick Diff, too?
Thanks in advance.

It is under the Accessibility preferences.
General -> Editors -> Text Editors -> Accessibility -> Use Characters to show changes in the vertical ruler.

Related

How do I turn off Tab and New Line markers in Eclipse?

I am using Adobe's ColdFusion Builder, an Eclipse-based IDE built on top of Aptana.
All of a sudden, I am getting a type of whitespace marker showing in my Eclipse Editor. I must have accidentally hit a key combination.
Here is a screen dump.
I have already tried "General > Editors > Text Editors > Show whitespace characters" and it is not this. I already have show whitespace characters turned off. If I turn it on, then the Whitespace Characters display over the top of what I am already seeing.
Can anyone tell me how this can be turned off? Most annoying.
Many Thanks
It's under Preferences -> General -> Editors -> Text Editors
Just uncheck 'Show Whitespace Characters':
Did you try Restarting Eclipse? If that didn't work, you might try this http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11640.html which explains which file to delete to force eclipse to revert to use default settings.
I have done this several times by accidentally hitting some keystrokes.
If you go to Windows/Preferences/General/Keys you will see all the keyboard shortcuts you have.
Mine is set to Control + .
(that's a period by the way) I had to place my cursor inside the document and do it a couple of times to make it work because there is also a keyboard shortcut for Control +
On a Mac it is Cmd +.
Hope that helps.

Configuring tab space for Eclipse Compare Merge editor

Is there a way to configure tab spaces for Eclipse Compare/Merge editor?
I have the Text Editor to use 2 spaces for tab and "Insert spaces for tabs" but this doesn't seem to take effect in the Compare/Merge editor. It's quite annoying since it's occasionally messing up the indentation in the source code. I guess my other option is to use an external tool but it would be great if this can be configured within Eclipse.
I'm using Indigo SR2 (64-bit)
--
This appears to be a related Eclipse bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259410
You can choose to ignore whitespaces in the compare editor. Either you right click in the editor and choose Ignore White Space or you set this in eclipses preferences Window -> Preferences -> General -> Compare/Patch -> Ignore White Space

Equivalent of Komodo's "show unsaved changes" in Aptana Studio?

I've been using Komodo Edit for the last few years, but am once again thinking of switching to Aptana Studio because of it's built in refactoring tools for Python.
One of the features I use all the time in Komodo Edit is "show unsaved changes". This simple feature pops up a window with a diff of the text in the current editor window vs. the saved file on disk.
There must be a way of doing this in Aptana Studio (or more to the point, there must be a way of doing this in Eclipse, since Aptana is built on top of it.)
How do I get a diff show unsaved changes?
Windows -> Preferences -> General -> Editors -> Quick Diff.
Check the 'Show Differences in overview ruler'. Set the combo on 'Version on disk'. Select nicer colors for the diff ;) and OK the dialog.
Now, every change in your file will be visible on the 'Overview Ruler' and on the 'Annotation Ruler' (the editor left and right bars). The marks will be visible until you save the file.
Not an exact match to the Komodo feature, but this, along with the local history feature of Eclipse, can provide a lot of control.
Hope that helps.

Highlighting modified lines in Eclipse

In netbeans, if I open a file which is under version control the lines which are modified are highlighted in the left. (green for new lines and blue for modified lines)
Is it possible to get a similar effect in Eclipse?
Open the Preferences window
Search for "diff"
Select Quick Diff
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.
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.
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.
In Eclipse by using its Quick Diff feature. This is easy to do:
Go to Window -> Preferences -> General -> Editors -> Text Editors ->
Quick Diff. This is the dialog from where it can be configured.
Turn on Quick Diff, by enabling the option Enable quick diff.
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.
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.
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.
For Eclipse Version: 2019-03 (4.11.0) Go to
Select 'window'
Select 'Preferences'
Go to General -> Editors -> Text Editors -> Quick Diff
Tick 'Enable quick diff'
Tick 'Show differences in overview ruler'
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.
EGit plugin's Quick Diff does exactly the same as netbans modified lines feature.
http://wiki.eclipse.org/EGit/User_Guide/State
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:
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)
Enable Quick Diff and select "A Git Revision" as the reference source: Preferences > Editors > Text Editors > Quick Diff
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.

Subclipse - marking code changes like in NetBeans

I moved recently from NetBeans to Eclipse. Since I have to work with the project checked out from SVN I installed Eclipse. My question is: how to make Subclipse indicated the changes that I introduce in the source code (downloaded from SVN) just like NetBeans? Is there any way?
In Window -> Preferences navigate to General -> Editors -> Text Editors -> Quick Diff and tick "Enable quick diff", "Show differences in overview ruler" and set "Use this reference source" to "Pristine SVN Copy".
You might also want to change the colors to match NetBeans (blue for Changes, green for Additions, red for Deletions).
Note that you'll probably need to restart Eclipse for this to take effect.
As you go on changing the code it will show your changes on the side ruler until you commit to SVN.
If you are referring to the Viewing Changes in the Source Editor section of subversion in Netbeans:
alt text http://netbeans.org/images_www/articles/60/ide/vcs/left-ui.png
Then it should be like activating the Quick diff Annotate in Subclipse:
Team -> Show Annotations option on a file
Subclipse automatically keeps track the changes that you do in Eclipse.
If you would like to see the changes, the convention in Eclipse is to go to Team -> Synchronize menu on the project.
If you want to quickly compare changes from a single file, right click on it select 'Compare With' -> 'Latest from Repository'. The resulting diff would look much like the one in Binary Nerd's first screenshot, only it will appear in Editor section and you won't have to switch perspectives.
Doesn't subclipse mark the classes and packages in the Package Explorer as being different to the version checked-in to SVN?
EDIT
You can use the compare function to see the differences. One way to do this is to open the synchronize view, right click on the desired class and choose compare (i can't remember the exact menu option, but it's something like that).
(source: tigris.org)