Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329310 - Part service does not autogenerate stacks if the last container is not one
Summary: Part service does not autogenerate stacks if the last container is not one
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1 M4   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 19:02 EDT by Brian de Alwis CLA
Modified: 2010-11-03 09:01 EDT (History)
1 user (show)

See Also:


Attachments
EPartService patch v1 (6.43 KB, patch)
2010-11-03 08:35 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!