Is there a way to determine the size (height and width) of a view site (IViewSite) in eclipse rcp? I try to optimize the appearance of view parts and therefore need these sizes.
Related
I'm developing an application with Electron and Ionic 4 and i would like to set the window size (BrowserWindow object) in order to fit content width and height of the home page, as i would do in java swing by calling JFrame pack method.
Is it possible?
I'm in a similar situation. i.e. I'd like the Electron to fit the html content. Plus if I show other content (e.g. div.hidden = false) I'd like the Electron Window to expand.
Best solution I've found so far is to send a event indicating a resize and handle that in the main process.
https://discuss.atom.io/t/how-to-re-size-electron-main-window-dynamically/48183/3
Neater solutions would be welcome.
I have implemented Eclipse RCP product in 4.5 (Mars) version. There is a part with toolbar. I want to show the part toolbar always in full span (covering the entire width of the part) and not on the part stack (on right side of the part tab).
I tried to add Part-Toolbar-FullSpan tag to the Part and also to the part toolbar but it is not helping.
I also tried to create a custom toolbar but that approach did not work out.
Do you know how I can show the part toolbar in full span?
Thank you.
Part-Toolbar-FullSpan appears to be for the e(fx)clipse JavaFX stack renderer only so it won't work with SWT.
The SWT stack renderer org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer uses the setTopRight method of CTabFolder to manage the toolbar. This will only push the toolbar on to a separate row when there not enough space for it on the tab row.
So it looks like the only way to do this would be to define a custom renderer factory and override the stack renderer. Unfortunately for what you want this would be a substantial change to the renderer.
Is there a possibility to set the relative position of a view in eclipse programmatically?
I know, that there is the function
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ease.ui.view.ModulesExplorerView");
But I want to specify the relative position of this view, or move this view in a specified Position.
thanks in advance
The position of the view is determined by any placeholder for the view in the current perspective. There is no other way to control where it is displayed.
There is some more information about this is the Eclipse Wiki FAQ Why can't I control when, where, and how my view is presented?
You can do it with Eclipse e4 - but this is a big design change and doesn't support all Eclipse 3.x code.
I'm creating an application using eclipse RCP, I have many Part and I want to resize them. Some of these parts don't need many space.
I've checked in Application.4xmi but I didn't found anything helpful.
Any ideas?
You can set the size of a Trimmed Window in the Application.e4xmi by setting the Bounds width and height values.
Usually you then use PartSashContainer to divide up the window. You specify a percentage used for each child in the Container Data for the child.
I have an view with an image(gif) of fixed size but when i re-size window or view its not adapting according to respective window or view. Can any one suggest some solution please?
This sounds like a layout issue - your Label/Image is not being told to 'fill' the available space, and instead to render at it's natural size. See this article for more information on layouts, particularly the area the shows an example of this code:
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;