Can I programatically specify size of Eclipse RCP Editor Part? - eclipse

I have some users that wish to set the size of an EditorPart in an Eclipse RCP app to a specific dimension (in pixels).
This is so that a screenshot of the editor contents exactly matches the PowerPoint slide they want to paste it into, which will guarantee zero pixelation.
I know it's possible to manually change the size of an Eclipse EditorPart, but can't find a programmatic way.
Can anyone give me any pointers?

While it won't solve my specific scenario, I have found an alternate strategy.
If an EditorPart is dragged out of the main Eclipse Window, so it's floating, then it is possible to set the size of the Shell that contains this floating pane.
The size of the shell just needs to be adjusted to allow for the decorations/trimming around the editor within it.
More details here: Setting size of inner region of Java SWT shell window

Related

Can I increase UI scaling in eclipse on Mac?

I've spent some time already searching for an answer. I know that I can increase the text size in an open file, but is there any way to increase the overall UI scaling? I have a large monitor so I can utilize multiple applications in my workflow, but the size of the application text and icons is so small that it's totally unusable.
Here is a comparison between Eclipse on the left and IntelliJ on the right on my screen:
I scaled IntelliJ on the right to be the perfect size, easily, but Eclipse on the left is way too small to effectively work with it.
I've tried removing a line indicating small text in the eclipse.ini file but that didn't change anything.
Given how poorly my search has turned up already, I assume the answer is 'no'. This leads me to ask, how is this possible? How can such a sophisticated and popular application not be able to change the UI scaling? I feel as though there must actually be a reasonable explanation because this is just plain absurd. This can't be passed off as a legitimate piece of software in this day and age without flexibility on screen size.
Thank you.
EDIT: *
I'm still unable to update the size of the UI icons. I've searched through numerous other issues going through the "-Dswt.autoScale=200" options in the elipse.ini setting but this is not working on Mac. Anyone able to assist here? Thank you!
The "Tree and Table font for views" setting in the "General > Appearance > Colors and Fonts" page of the Preferences sets the size of Project Explorer view. That entry is in the "View and Editor Folders" section.
Icons are only scaled if the display is set up as scaled by x2 or x1.5.

Change width of Eclipse filename tabs

In Eclipse, is it possible to adjust the width of the filename tabs across the top of the open file? At the moment each tab shows only the first 12 characters of a filename. As java class names are usually quite long, this isn't enough to distinguish the files eg:
ExistingCustomer.java
ExistingCustomerService.java
ExistingCustomerController.java
Becomes:
ExistingCust...
ExistingCust...
ExistingCust...
Sorry but I think this is not possible out of the box. Maybe there are plugins that can achieve this but I'm not aware of any standard eclipse setting serving this purpose.
I know that eclipse tries to display as much as possible of each file's name but if you open too many files at the same time, the part control has to trim the size of the part taps in order to display some more.
If you find the corresponding setting or a plugin for the intended behavior, please let me know ;)

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.

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

Eclipse (3.5) how to compare files horizontally?

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.