Bug 565946 - Close Buttons on Views-Tabs not shown anymore since last update (2020-09)
Summary: Close Buttons on Views-Tabs not shown anymore since last update (2020-09)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 568019 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-10 06:18 EDT by jfc jrtc CLA
Modified: 2022-03-23 07:41 EDT (History)
11 users (show)

See Also:


Attachments
View Tabs (6.11 KB, image/png)
2020-08-10 06:18 EDT, jfc jrtc CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jfc jrtc CLA 2020-08-10 06:18:32 EDT
Created attachment 283822 [details]
View Tabs

On Views-Tabs there are no close icons shown anymore since the last eclipse update (2020-09), see Screenshot.


-- Configuration Details --
Product: Eclipse IDE 4.17.0.20200806-1200 (org.eclipse.epp.package.java.product)Installed Features:
 org.eclipse.platform 4.17.0.v20200729-2048
Comment 1 Lars Vogel CLA 2020-08-10 06:22:05 EDT
Which OS are you using?
Comment 2 jfc jrtc CLA 2020-08-18 09:29:05 EDT
OpenSuse Linux with KDE-Desktop
Comment 3 Lars Vogel CLA 2020-09-01 04:21:10 EDT
Please copy your output from the Ctrl+3 -> Copy Build-Id into Clipboard into this bug report.
Comment 4 jfc jrtc CLA 2020-09-01 04:24:34 EDT
Eclipse IDE for Java Developers (includes Incubating components)
Version: 2020-06 (4.16.0)
Build id: 20200615-1200
OS: Linux, v.4.12.14-lp151.28.44-default, x86_64 / gtk 3.22.30, WebKit 2.26.4
Java version: 11.0.6
Comment 5 jfc jrtc CLA 2020-09-01 04:26:04 EDT
Oh, sorry, it's the wrong build, because I switched back to the previous version because of the bugs.
Comment 6 jfc jrtc CLA 2020-09-01 04:31:19 EDT
This is the right one:

Eclipse IDE for Java Developers (includes Incubating components)
Version: 2020-09 M2 (4.17.0 M2)
Build id: 20200806-2245
OS: Linux, v.4.12.14-lp151.28.44-default, x86_64 / gtk 3.22.30, WebKit 2.26.4
Java version: 11.0.6

Because I now started eclipse with an empty new test-workspace, the problem seems gone, so something in my old workspace setting seems to cause the bug. This bug should be fixed nonetheless, because the workspace is fine with the previous version.
Comment 7 Lars Vogel CLA 2020-09-01 04:33:00 EDT
If you start Eclipse with -clean does it show the buttons?
Comment 8 jfc jrtc CLA 2020-09-01 04:39:28 EDT
I now started eclipse with

./eclipse -clean

That does not help.
Comment 9 Lars Vogel CLA 2020-09-01 04:42:17 EDT
-clearPersistedState would reset all UI customisation. Can you try that one?
Comment 10 jfc jrtc CLA 2020-09-01 04:47:59 EDT
I now started eclipse with that option (with an empty copy of my production workspace, from which I copied the only settings folders I found ".metadata" and ".recommenders").

The bug is still there.
Comment 11 jfc jrtc CLA 2020-09-01 04:57:03 EDT
Btw, one thing I don't understand regarding the tabs: why can I close the normal editor tabs without being forced to open the tab I want to close (the close-button is shown on mouse hover), but with the view-tabs this is not possible?
Comment 12 Paul Pazderski CLA 2020-09-01 07:56:55 EDT
(In reply to jfc jrtc from comment #11)
> Btw, one thing I don't understand regarding the tabs: why can I close the
> normal editor tabs without being forced to open the tab I want to close (the
> close-button is shown on mouse hover), but with the view-tabs this is not
> possible?

It's actually not a difference between view and editor but between the different areas. The "editor area" shows close button on hover for inactive tabs, all other areas do not. Another difference is the minimal shown tab title length. In "view areas" it goes down to one character which allows quite allot views in a narrow area. That would be less if it had to reserve space for the close button and if it does not reserve space it is quite likely to close it accidental when trying to activate another tab.
Apart from that, I'm closing editors much more frequently than views. Most views stay open all the time.

However there are ways to directly close an inactive view. Once through the context menu "Close" entry or by pressing the middle mouse button on the inactive view tab.
Comment 13 Julien HENRY CLA 2020-10-19 05:13:18 EDT
Resetting the perspective fixed the issue for me.
Comment 14 Karsten Thoms CLA 2020-10-20 02:30:14 EDT
*** Bug 568019 has been marked as a duplicate of this bug. ***
Comment 15 p y c CLA 2020-10-20 07:35:47 EDT
(In reply to Paul Pazderski from comment #12)
> (In reply to jfc jrtc from comment #11)
> > Btw, one thing I don't understand regarding the tabs: why can I close the
> > normal editor tabs without being forced to open the tab I want to close (the
> > close-button is shown on mouse hover), but with the view-tabs this is not
> > possible?
> 
> It's actually not a difference between view and editor but between the
> different areas. The "editor area" shows close button on hover for inactive
> tabs, all other areas do not. Another difference is the minimal shown tab
> title length. In "view areas" it goes down to one character which allows
> quite allot views in a narrow area. That would be less if it had to reserve
> space for the close button and if it does not reserve space it is quite
> likely to close it accidental when trying to activate another tab.
> Apart from that, I'm closing editors much more frequently than views. Most
> views stay open all the time.
> 
> However there are ways to directly close an inactive view. Once through the
> context menu "Close" entry or by pressing the middle mouse button on the
> inactive view tab.

There is a problem with deleting the close button directly. You can use it as a configuration item instead of deleting it violently
Comment 16 Rainer Herter CLA 2021-04-23 05:03:56 EDT
Any progress on that bug? Or is there any workaround?
Comment 17 Grigoras Cristinel CLA 2021-10-18 04:34:58 EDT
I can confirm this bug.

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2021-09 (4.21.0)
Build id: 20210910-1417
OS: Linux, v.5.11.0-37-generic, x86_64 / gtk 3.24.20
Java vendor: Ubuntu
Java runtime version: 11.0.11+9-Ubuntu-0ubuntu2.20.04
Java version: 11.0.11
Comment 18 Lars Vogel CLA 2021-10-18 04:58:03 EDT
(In reply to Grigoras Cristinel from comment #17)
> I can confirm this bug.
> 
> Eclipse IDE for Enterprise Java and Web Developers (includes Incubating
> components)
> Version: 2021-09 (4.21.0)
> Build id: 20210910-1417
> OS: Linux, v.5.11.0-37-generic, x86_64 / gtk 3.24.20
> Java vendor: Ubuntu
> Java runtime version: 11.0.11+9-Ubuntu-0ubuntu2.20.04
> Java version: 11.0.11

Does resetting the perspective restores the close icons?
Comment 19 Hilmar Wobker CLA 2021-11-09 04:04:48 EST
I can also confirm this bug.
Resetting the perspective does *not* restore the icons.

But:
The workspace I use stems from an older Eclipse installation and has been updated with each new Eclipse installation.

When I start Eclipse in a new and empty workspace, then the bug disappears.
So, I suppose it has to do with the update process of the workspace (as someone else already supposed in the comments).

My build-ID:

Eclipse IDE for Java Developers (includes Incubating components)
Version: 2021-09 (4.21.0)
Build id: 20210910-1417
OS: Linux, v.3.10.0-1160.42.2.el7.x86_64, x86_64 / gtk 3.22.30
Java vendor: Red Hat, Inc.
Java runtime version: 11.0.12+7-LTS
Java version: 11.0.12
Comment 20 Alexander Becher CLA 2021-11-29 09:57:28 EST
We do can reproduce this bug, too. It's a workspace.xmi of an Eclipse 4.15 RCP app.

Problem seems to be that the view's MPlaceholder.isCloseable() returns false.
The workbench.xmi only contains Placeholder elements without closeable="true"


<children horizontal="true" xsi:type="basic:PartSashContainer" selectedElement="_tum2xr1CEeaMifkKHnSIBg" xmi:id="_tum2xb1CEeaMifkKHnSIBg">
            <children xsi:type="basic:PartSashContainer" selectedElement="_tum2x71CEeaMifkKHnSIBg" xmi:id="_tum2xr1CEeaMifkKHnSIBg" containerData="1334">
              <children elementId="topLeftWeb" xsi:type="basic:PartStack" selectedElement="_tum2yL1CEeaMifkKHnSIBg" xmi:id="_tum2x71CEeaMifkKHnSIBg" containerData="7500">
                <children elementId="de.aixpertsoft.someview" ref="_tudFxr1CEeaMifkKHnSIBg" xsi:type="advanced:Placeholder" xmi:id="_tum2yb1CEeaMifkKHnSIBg"></children>

Our current workaround is to get the Placeholders from the ModelService and set closable to true.
Comment 21 andy goryachev CLA 2021-12-22 22:36:34 EST
Have this problem as well

Version: 2021-09 (4.21.0)
Build id: 20210910-1417
Comment 22 Dominic Scharfe CLA 2022-03-23 07:17:16 EDT
This bug seems to be related to the Eclipse Version where the workspace was created. 
I tried to find the most recent version where I can create an empty workspace which leads to this bug when opened with the latest Eclipse release (2022-03).

I could reproduce it using Eclipse Oxygen (IDE for Eclipse Committers x86_64, https://www.eclipse.org/downloads/packages/release/oxygen/r). Steps to reproduce:

1) Start Eclipse Oxygen and create a new workspace (type a workspace location which doesn't exist)
2) Close Eclipse
3) Start Eclipse 2022-03 and use the workspace created in 1)
=> Views are missing the "close" button (e.g. Welcome Page, Project Explorer)

The oldest version I tested was Eclipse Neon, where I also was able to reproduce this bug.

Versions tested:
- Eclipse Committers 2019-09 (bug gone)
- Eclipse Committers 2018-09 (bug gone)
- Eclipse Committers Photon (bug gone)
- Eclipse Committers Oxygen (bug exists)
- Eclipse Committers Neon (bug exists)
Comment 23 Dominic Scharfe CLA 2022-03-23 07:41:24 EDT
My guess would be that this was fixed by commit d71311504fdaa11ff80ace67ce7aaf54c6b17ac4 (see bug 516403).

In this commit, explicitly setting closeable was added to org.eclipse.e4.ui.internal.workbench.PartServiceImpl::createSharedPart(MPart sharedPart):897
sharedPartRef.setCloseable(sharedPart.isCloseable());