Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329310

Summary: Part service does not autogenerate stacks if the last container is not one
Product: [Eclipse Project] e4 Reporter: Brian de Alwis <bsd>
Component: UIAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: 4.1 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
EPartService patch v1 none

Description Brian de Alwis CLA 2010-11-02 19:02:03 EDT
Build: I20101029

Eric notes in bug 303778 that:

> We should also consider what we want to do for 'stand alone' views (i.e. I mean
> MParts that are not children of an MPartStack). Currently (even in 3.x) we have
> no place to show the Toolbar/Menu (or even the close button).

I use a variant of the Java Browsing perspective where I embed the projects/packages/types/methods views as standalone views (maximizing real estate density).

This perspective comes up fine under the e4 compatibility layer.  Unfortunately all other new views added are also added as standalone views!

The code is available through a p2 repo/update site at:

   http://www.cs.ubc.ca/~bsd/eclipse-tools/

specifically as the "Eclipse Hacks" feature.  The actual source is in src/bsd/eh/StrippedJavaBrowsingPageLayout.java, shipped as part of the bundle at:

   http://www.cs.ubc.ca/~bsd/eclipse-tools/plugins/bsd.eh_0.0.6.jar
Comment 1 Remy Suen CLA 2010-11-02 20:55:33 EDT
(In reply to comment #0)
> This perspective comes up fine under the e4 compatibility layer.  Unfortunately
> all other new views added are also added as standalone views!

Confirmed with my own custom perspective. This code will do for the IPerspectiveFactory implementation. Just open the perspective and then show another view and you'll see that it's not in a stack.

public void createInitialLayout(IPageLayout factory) {
  factory.addStandaloneView(IPageLayout.ID_OUTLINE, false,
      IPageLayout.TOP, 0.5f, factory.getEditorArea());
}
Comment 2 Remy Suen CLA 2010-11-03 08:35:21 EDT
Created attachment 182289 [details]
EPartService patch v1
Comment 3 Remy Suen CLA 2010-11-03 09:01:47 EDT
Fixed in CVS HEAD.

Thanks for the bug report, Brian!