Eclipse (3.5) how to compare files horizontally? - eclipse

Normally Eclipse 'File Compare' compares files in vertical panels like:
Is there a way I can compare them horizontally like:
Compare using Horizontal Panel http://www.sqlservertool.com/images/ad_hex_diff_small.gif
Its too tiring to scroll everytime to see what was changed!!
Thx

Looking at the code of org.eclipse.comparator.internal.CompareEditor (which is the name of the class of the editor illustrated in your question), I do not see any indication of a different "orientation" (horizontal layout vs. vertical layout)
So, no. I do not think the current implementation allows you to compare files with a different layout.

I'm afraid VonC is right that the current implementation doesn't support changing the layout, but there is a bug open for it so you can either provide a patch or ping guys from Eclipse Workspace Team (including me :) and ask them to fix it for you ;)

I guess Robert was referring to Select Next/Previous Change/Difference buttons (see section Toolbar in Eclipse Help).

If your problem is scrolling, use the toolbar buttons to navigate between changes.

One way to overcome your problem is to Maximize editor window during file compare, and then Restore it after compares are done. I wish Eclipse did it by default.
As to the question of orientation. I think it's more readable when you compare revisions side-by-side. That's probably why Eclipse authors did not give us an option of horizontal layout. What they could have given us were a line diff at the current cursor position.

Related

Visual Studio Code explorer view scrolling

My project contains a LOT of folders, many of which I routinely have open, making for a lengthy explorer view. I find scrolling this view quite frustrating for two reasons:
There is no equivalent of the editor.mouseWheelScrollSensitivity setting for the explorer view. I'm also generally happy with the scroll speed for my mouse in other applications, so don't want to go messing with a system wide setting to compensate for VSC.
The scrollbar is frustratingly difficult to grab at and requires precise mouse placement. The number of times I accidentally grab at the slider and resize the view rather than scroll it is ridiculous.
I've found no useful extension to help in this matter. Has anybody any suggestions? I'll raise an enhancement request in Github if necessary.
Here are 2 shortcuts that can speed up navigation between files:
With Ctrl then Tab you can browse a history of your last viewed files. Great for switching around when working on multiple files.
With Ctrl+P (Go to File... command) you can quickly go to a file by name. You can also search for files inside folders like this: folder/subfolder/file.ext. This is great if you know what you are looking for.
Source and more navigation tips: https://code.visualstudio.com/docs/editor/editingevolved#_quick-file-navigation
This PR in vscode 1.59 may have fixed this issue: https://github.com/microsoft/vscode/pull/110059/commits/61efc577e038ac772f12511fb823de27296dbc69
New settings:
workbench.list.mouseWheelScrollSensitivity
workbench.list.fastScrollSensitivity

how to change eclipse's editor to show or edit code in multiple columns?

My laptop and desktop monitors are wider than they are tall. When I'm looking at code, from half to 2/3 of the screen is empty with no code. This is silly.
I'd like to take a look at how to extend eclipse's editor to show data in multiple columns.
If anyone has any idea regarding what api I should lookup or any other resources, please point them out.
Thanks
I don't know if one viewer can display code in multiple columns, but you can split a view for the same file (Window -> New editor).
That way, you can see more of your code, each tab using that horizontal space you have so much on your screen.
For different files, you can put different editor side-to-side:
That will give:
In Eclipse 2018-12 (4.10) there is the "Window/Editor/Toggle split editor vertical" menu option which does exactly what you need. There is also Toggle split editor horizontal option there.

Hiding show view toolbar in eclipse

I want to remove this toolbar shown in the image. I have tried disabling all other items in the toolbar but this one doesn't seem to go. This toolbar is blocking my editor's space and I want to get rid of it. Please tell me a way to remove this.
Thanks
I think you could try writing your own WorbenchWindow or WorkbenchPage (not sure exactly which right now) and overwrite maybe createWindowContents.
See this from here (i got this quote from there, but maybe you can find a book or better reference for this):
There are limitations as to when you can override the Workbench
window. The Workbench's default implementation of
createWindowContents() creates controls that are not available to
clients, such as the job progress area, the trim that docks fast
views, and the perspective bar. When you override
createWindowContents(), you lose these areas.
There's no way of removing it. I have tried finding solutions but it isn't customizable
Hey looks like they solved this issue in eclipse juno .. just download juno and life is good !
Which version of eclipse you are using?You can toggle the toolbar visibility by clicking Window->Hide Toolbar or Window->Show toolbar

How to set a fixed width of editor window in Eclipse?

Recently I have got a new 22" monitor. Finally it's possible to keep all needed windows in Eclipse open while having the main editor window wide enough to display all 120 columns. Problem now is when I wide up or narrow down windows on the left or right side of the editor. Editor's width narrows down or wides up. I'd like to set its width fixed to some value and let the other windows 'breathe' in width.
Take a look at the illustration.
You should rather use detached views, that way your main editor is not affected by the other windows resize operations.
(source: eclipse.org)
Either that, or use fast views, which minimises the views down to an icon that can be conveniently popped up when you need to use them. This is especially handy for things like the JUnit test view, as suggested by the JUnit Eclipse documentation
http://help.eclipse.org/help32/topic/org.eclipse.jdt.doc.user/gettingStarted/qs-junit.htm

Can you disable automatic horizontal scrolling in Eclipse?

Sometimes when I jump into source code, e.g. from search or when looking up the declaration of something, the Eclipse text editor tries to display nearby long lines by horizontal scrolling. This happens even if the item I jumped to is well within the display without scrolling. I find this rather annoying, so:
Is there a way to disable this? I have searched in vain through all the editor settings.
Specifically, this is about Eclipse CDT, but I suppose the behaviour is the same in JDT.
This seems to happen in other eclipse editors too (like PDT for PHP)
It could have been related with the ScrolledFormText, but the Plugin Spy tells us a WorkbenchWindow class is concerned, as well as an AbstractDecoratedTextEditor, that is in essence an org.eclipse.ui.texteditor.AbstractTextEditor.
The source of that AbstractTextEditor indicates having:
a ScrollLinesAction for vertical scrolling
a TextNavigationAction for settings the cursor and potentially triggering horizontal scrolling
I am not sure how to change that behavior, except by contributing somehow to the active editor identifier (for instance, for java, "org.eclipse.jdt.ui.ClassFileEditor"), and modifying that Action.
I was having the same issue and found these open bugs for it on the Eclipse Bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314208
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321189
You can prevent it from happening when you switch the Code Folding off and reload the file.
grtz,
T
right click on your eclipse shortcut and choose properties. in compatibility tab choose "windows xp(servicepack 3). http://www.vistax64.com/vista-general/133849-disable-dynamic-horizontal-scrolling-vista.html