| Summary: | [Perspectives] View stack not correctly painted for a newly opened perspective | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Peter Kullmann <peter.kullmann> | ||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | hsoliwal, pwebster, remy.suen | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
I have been looking at some of the code and tried to understand what changed between 3.5.x and 3.6 but wasn't able to find it. Created attachment 183775 [details]
Screen shot of the view stack after the perspective was opened
Paul, [WorkbenchParts] seemed like the best area to put this under. But if the bug is more appropriate for [ViewMgmt], or for that matter SWT, please move this accordingly. Thanks. This is still a problem in 3.7. As a workaround I’m setting CTabFolder.setMRUVisible(false) and then again to true followed by a layout(true) call to the DefaultTabFolder instance.
private static void fixPanes(ViewStack stack) throws Exception {
Field field = PartStack.class.getDeclaredField("presentationSite");
field.setAccessible(true);
DefaultStackPresentationSite presentation = (DefaultStackPresentationSite) field
.get(stack);
TabbedStackPresentation stackPresentation = (TabbedStackPresentation) presentation
.getPresentation();
if (!(stackPresentation.getTabFolder() instanceof DefaultTabFolder))
return;
DefaultTabFolder tabFolder = (DefaultTabFolder) stackPresentation
.getTabFolder();
Field paneFolderField = DefaultTabFolder.class
.getDeclaredField("paneFolder");
paneFolderField.setAccessible(true);
PaneFolder paneFolder = (PaneFolder) paneFolderField.get(tabFolder);
CTabFolder ctabFolder = (CTabFolder) paneFolder.getControl();
ctabFolder.setMRUVisible(false);
ctabFolder.setMRUVisible(true);
tabFolder.layout(true);
}
Just in case, someone could use it.
Thanks for the update, Peter. In Kepler things are done differently (PartStack doesn't exist) so it might need a different workaround. PW This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
This is from a news posting: Hi, I have a problem in 3.6.x with perspectives that have a lot of views in a single view stack: If opened for the first time, the tab of the currently shown view is not selected and the blue line around the view is broken. The thin line between the tabs and the view is also missing (this is visible if the stack does not contain the active part). I have attached a screenshot showing this with a simple example. To reproduce this, it is enough to create a new plug-in project with the RCP Mail Example template. In the file Perspective.java change the method to look like this: ... folder.addPlaceholder(View.ID + ":*"); folder.addView(View.ID); for (int i = 0; i < 20; i++) { folder.addView(View.ID + ":" + i); } layout.getViewLayout(NavigationView.ID).setCloseable(false); ... (just adding the three lines with the loop). I saw this on Macs and also on Windows. It worked fine in 3.5.x and before.