eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Reopen tab works for Editor Tabs and View tabs respectively.

Open deepika-u opened this issue 3 months ago • 4 comments

Provide "Reopen Closed Tab" option for the user.

Fixes #2148

There are basically 2 types of tabs in eclipse.

  1. Editor tabs.
  2. View tabs.

I have attached step by step screen shots for the implementation where this "Reopen Closed Tab" is visible/shown

  • When Editor tabs are opened and say atleast 1 tab is closed, then there appears the "Reopen Closed Tab" on a right click of any existing opened tab like in screenshot 1.
Screenshot1

Note : When there is no tab yet closed, this menu option doesnt show up.

  • What are all called as View kind of tabs(left, bottom, right set of tabs all considered as view kind of tabs). Rest all contribute to View kind of tabs and same kind of menu shows up as shown in the screenshot.
Screenshot2_views
  • When console is 1 such view which is closed now, hence the menu option "Reopen Closed Tab" shows up in the right click menu.
Screenshot3_console_closed
  • When the console view is opened, the menu option "Reopen Closed Tab" again doesnt show up.
Screenshot_reopen_disabled

Observations

  1. Maximum of only 1 tab can be reopened at a time.
  2. Maximum of 15 times the option "Reopen Closed Tab" will be shown. Which means it can right now only remember most recently closed 15 tabs though you would have closed more.
  3. If anyone uses the option "Detach" and close a particular tab, then this tab is closed and that specific tab cannot be reopened using the option "Reopen Closed Tab". It needs to be opened freshly like any other tab.

deepika-u avatar Aug 26 '25 06:08 deepika-u

There are basically 2 types of tabs in eclipse.

I don't think this is true. "Editor" is a concept of E3 / IDE.

A Tab is actually a view in the PartStack and we have a so called "primary stack" where we show things that are used for editing files (what itself are just views).

So I'm not 100% sure from the description what you want to change, but as the PartStack is hidden when the last editor is closed, if one wants to restore tabs it must attach a menu to the Area

laeubi avatar Aug 26 '25 06:08 laeubi

Test Results

 2 784 files  ±0   2 784 suites  ±0   1h 50m 0s ⏱️ - 2m 8s  7 936 tests ±0   7 686 ✅  - 18  232 💤 ±0  13 ❌ +13   5 🔥 + 5  23 342 runs  ±0  22 551 ✅  - 48  743 💤 ±0  37 ❌ +37  11 🔥 +11 

For more details on these failures and errors, see this check.

Results for commit e372b08e. ± Comparison against base commit 81b03a68.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 26 '25 07:08 github-actions[bot]

There are basically 2 types of tabs in eclipse.

I don't think this is true. "Editor" is a concept of E3 / IDE.

A Tab is actually a view in the PartStack and we have a so called "primary stack" where we show things that are used for editing files (what itself are just views).

So I'm not 100% sure from the description what you want to change, but as the PartStack is hidden when the last editor is closed, if one wants to restore tabs it must attach a menu to the Area

Thanks for the detailing on E3 and E4 differentiation which i was not aware of. I was referring to the E3 kind of terminology itself like

  • Editors: for working on resources (files, etc.).
  • Views: for auxiliary tools (outline, console, problems view, etc.).

deepika-u avatar Aug 26 '25 09:08 deepika-u

This pull request changes some projects for the first time in this development cycle. Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From df754a2f7a0ab7a674e6fa5537de2d479019e2fc Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Mon, 1 Sep 2025 04:17:47 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
index 9d5e27c11e..249542c521 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench.renderers.swt;singleton:=true
-Bundle-Version: 0.16.900.qualifier
+Bundle-Version: 0.16.1000.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.51.0

Further information are available in Common Build Issues - Missing version increments.

eclipse-platform-bot avatar Sep 01 '25 04:09 eclipse-platform-bot