Bug 385547 - [PerspectiveBar] [PerspectiveSwitcher] Remove all dependencies on org.eclipse.ui.* (Pure E4)
Summary: [PerspectiveBar] [PerspectiveSwitcher] Remove all dependencies on org.eclipse...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 313771 376209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-19 15:44 EDT by Joseph Carroll CLA
Modified: 2020-09-30 03:59 EDT (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Carroll CLA 2012-07-19 15:44:15 EDT
Build Identifier: 

This enhancement request serves as place to collect comments and provide a single location to link existing bugs/requests.

Please keep this request up to date! :)

Reproducible: Always
Comment 1 Joseph Carroll CLA 2012-07-19 16:20:04 EDT
I have created a base implementation of a pure E4 perspective switcher based on the existing perspective switcher in the Juno release.

http://github.com/jd-carroll/e4-perspective-switcher.git
(Includes demo app)

The perspective switcher does not allow the repositioning of perspectives within the toolbar.  The perspective switcher also has 2 regressions from the existing 3.x dependent version:
    1) Closing of perspectives is not allowed from the context
    2) SaveAs'ing the perspectives is not allowed from the context menu

These regressions are due to the tight dependencies on org.eclipse.ui.internal.WorkbenchPage.  However, the new implementation does include handlers for both the Closing and SaveAs'ing of perspectives once they are available.

The inability to reposition perspectives within the perspective bar is the result of using a basic ToolBar as the container object.  A similar 3.x manager/contribution-item paradigm would have to be examined for use in the new implementation.

The perspective switcher I created does provide several enhancements to the existing implementation:
    1) The perspective switcher is tied to its immediate parent window, thus allowing independent perspective switchers for multiple window environments and any windows-in-window.
    2) The perspective switcher event bus is independent of the renderer. This will not only allow the event bus to be consumed by controls in other rendering engines (ex: e(fx)clipse) but will also allow for the creation of new perspective switching controls that can be placed outside of the trim bar.
    3) The perspective switcher will aggregate all of the perspectives from all of the perspective stacks that share the same immediate parent.

(IMHO) The biggest challenge I see is porting WorkbenchPage to an e4 equivalent. Whether through the creation of an E4WorkbenchPage or segmented into EPerspectiveService. 

Lastly, I have read in a couple of locations that there has been some thought of implementing "Workflows". I think the perspective-stack would evolve rather nicely into a workflow, but that's a separate conversation. ;)

Thanks,

JD
Comment 2 Paul Webster CLA 2012-07-20 10:00:59 EDT
*** Bug 313771 has been marked as a duplicate of this bug. ***
Comment 3 Paul Webster CLA 2012-07-20 10:01:25 EDT
*** Bug 376209 has been marked as a duplicate of this bug. ***
Comment 4 Lars Vogel CLA 2013-06-18 09:29:25 EDT
I updated the example implementation to run on Eclipse 4.3

https://github.com/vogella/e4-perspective-switcher