Bug 94099 - [DetachedViews] Support for floating (non-docked) views
Summary: [DetachedViews] Support for floating (non-docked) views
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-09 07:59 EDT by Yves Harms CLA
Modified: 2013-06-05 10:43 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yves Harms CLA 2005-05-09 07:59:32 EDT
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.
Comment 1 Stefan Xenos CLA 2005-05-09 13:08:44 EDT
We're API frozen for 3.1, although this would make a good feature for 3.2.
Comment 2 Stefan Xenos CLA 2005-05-26 04:01:16 EDT
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).
Comment 3 Yves Harms CLA 2005-08-09 08:52:46 EDT
Stefan, is there any chance to get this into 3.2 ?
We are really hot for this ...
Comment 4 Eric Moffatt CLA 2007-06-25 11:12:33 EDT
All operations supported by GUI gestures should be available through a 'common' API (commands?).
Comment 5 Benjamin Muskalla CLA 2007-07-05 19:26:35 EDT
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.
Comment 6 Andy Thomas-Cramer CLA 2011-01-20 15:43:33 EST
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.
Comment 7 David Pérez CLA 2011-04-07 06:20:55 EDT
I also need this.
Comment 8 David Pérez CLA 2011-04-07 06:27:18 EDT
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.
Comment 9 David Pérez CLA 2011-04-07 09:39:14 EDT
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);
        }
    }
Comment 10 Andy Thomas-Cramer CLA 2011-05-10 17:32:38 EDT
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.
Comment 11 Dani Megert CLA 2013-06-05 10:43:13 EDT
Removing outdated target milestone.