Community
Participate
Working Groups
Please add API-support to control if a view will be automaticly docked or not. When you drag a view outside the (non-maximized) eclipse windows it will remain undocked (floating). If you drag it back into the window it will be docked. So the functionality is already there, it just cant be controlled from ouside. We really need this feature for our RCP application. If you decide not to add this, please provide at least information where we need to patch the framework.
We're API frozen for 3.1, although this would make a good feature for 3.2.
FYI, if you want to hack the framework, you should find the methods you need on org.eclipse.ui.internal.WorkbenchPage (in the org.eclipse.ui.workbench plugin).
Stefan, is there any chance to get this into 3.2 ? We are really hot for this ...
All operations supported by GUI gestures should be available through a 'common' API (commands?).
I just started working on some API-side implementations for providing the needed functionality. As this should not be a bug deal I think that I can attach the first version tomorrow.
I would also like to specify that a view in a perspective first appears floating. In my case, I have an RCP app where the shell can optionally be too small for a docked view.
I also need this.
I have seen this: Perspective#showView(String, String) can open views detached if this preference: IPreferenceConstants.OPEN_VIEW_MODE is set to this value IPreferenceConstants.OVM_FLOAT. It can be changed temporarily, in order to open it floating.
This is the code I use in order to open a floating view: public static IViewPart openFloatingView(IWorkbenchPage page, String viewId) throws PartInitException { IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); int mode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE); store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, IPreferenceConstants.OVM_FLOAT); try { return page.showView(viewId); } finally { store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, mode); } }
David, thanks for the workaround. Both WorkbenchPlugin and IPreferenceConstants are in package org.eclipse.ui.internal, not exposed (much) by plug-in org.eclipse.ui.workbench. In my case, I'd prefer not to couple to internal code.
Removing outdated target milestone.