Bug 575602 - After relaunching eclipse, a view does not show up if it was detached and minimized in previous session
Summary: After relaunching eclipse, a view does not show up if it was detached and min...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.20   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-24 11:48 EDT by Winnie Lai CLA
Modified: 2021-08-26 02:24 EDT (History)
1 user (show)

See Also:


Attachments
workspace used to reproduce the problem (44.82 KB, application/x-zip-compressed)
2021-08-24 11:48 EDT, Winnie Lai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Winnie Lai CLA 2021-08-24 11:48:06 EDT
Created attachment 287008 [details]
workspace used to reproduce the problem

Using eclipse.buildId=4.20.0.I20210611-1600, obtained from eclipse-SDK-4.20-win32-x86_64.zip from eclipse download site.

Steps to reproduce,

1. Open Eclipse in a new workspace.
2. Close Welcome Window if it is shown up.
3. Detach Problems View.
4. Minimize Problems View.
5. Close Eclipse.
6. Open Eclipse using the same workspace.
7. Select Window->Show View->Problems View menu item.

Expect Problems View appear, but it does not.



Current workaround is reset the perspective.



I debug the issue a bit. In <workspace>\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi file,

It has something like below,

                  <windows xsi:type="basic:TrimmedWindow" xmi:id="_8Gv1UATtEeynfaiaXMiXSQ" visible="false" selectedElement="_8Gv1UQTtEeynfaiaXMiXSQ" x="1182" y="471" width="759" height="190">
            <children xsi:type="basic:PartStack" xmi:id="_8Gv1UQTtEeynfaiaXMiXSQ" elementId="PartStack@43aa767" visible="false" selectedElement="_5_IoowTtEeynfaiaXMiXSQ">
              <tags>Minimized</tags>
              <children xsi:type="advanced:Placeholder" xmi:id="_5_IoowTtEeynfaiaXMiXSQ" elementId="org.eclipse.ui.views.ProblemView" ref="_5_CiFwTtEeynfaiaXMiXSQ" closeable="true">
                <tags>View</tags>
                <tags>categoryTag:General</tags>
              </children>
            </children>
            <trimBars xmi:id="_9gTCMATtEeynfaiaXMiXSQ" elementId="org.eclipse.ui.trim.vertical1" side="Left">
              <children xsi:type="menu:ToolControl" xmi:id="_9gTCMQTtEeynfaiaXMiXSQ" elementId="PartStack@43aa767(org.eclipse.jdt.ui.JavaPerspective)" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.minmax.TrimStack">
                <tags>TrimStack</tags>
                <tags>Draggable</tags>
              </children>
            </trimBars>
          </windows>


You can see there is visible="false" attribute in two places. If I manually removed the visible="false" attribute, the Problems View appears when I open Eclipse.

I attach the workspace for reference, see issue.zip.
Comment 1 Rolf Theunissen CLA 2021-08-26 02:24:23 EDT
When the workbench is closed, all detached windows are hidden in LazyStackRenderer#hideElementRecursive. When the workbench is restored, LazyStackRenderer#showElementRecursive windows with visible children are shown.
However, this code does not consider the trim-bars.

In this case, a windows with all minimized parts, does not have any visible children. Therefore, the window is not restored. The same will happen when switching between perspectives.