Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 236240 - [Editor Mgmt] Open last closed tab
Summary: [Editor Mgmt] Open last closed tab
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement with 8 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 273235 358284 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-09 09:54 EDT by Mehdi Rabah CLA
Modified: 2016-11-06 22:36 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mehdi Rabah CLA 2008-06-09 09:54:35 EDT
This is an idea I stole from firefox tabmix plugin. https://addons.mozilla.org/fr/firefox/addon/1122

I would like to be able to re-open the last editor closed tab with a simple shortcut, like say ctrl-F12.

There are many useful feature in plugins like tab_mix, the "reopen last closed tab" is by far the most useful.

It became habit to use Ctrl-F12 even in eclipse (where it doesn't do anything), so I hope this feature is accepted
Comment 1 Dani Megert CLA 2008-06-09 10:03:13 EDT
If the editor you just closed was active, then you can simply use Alt+Left_Arrow to bring it back.
Comment 2 Mehdi Rabah CLA 2008-06-09 10:28:28 EDT
ok thank you I didn't came to my mind that you can come back to a closed file with alt+left

I guess this feature request should be closed..

is this really the 236240th bug/feature_request ?
Comment 3 Jérôme Gras CLA 2009-04-20 08:55:13 EDT
Hello,

I don't agree with this solution.
Of course, if you just closed the file you want to reopen, it does work.
But, if you have a dozen tabs open and you did close one of the first files by mistake (clicking the hidden cross for example), the shortcut Alt+Left_Arrow doesn't work !

I hope you understand and accept this feature request. :-)
Comment 4 Mehdi Rabah CLA 2009-04-20 09:30:44 EDT
In the end, I agree with Jerome and myself ^^ that this feature does not exist, but since I can live with the alt-arrow most of the time, I didn't came back to support this 
Comment 5 Dani Megert CLA 2009-04-22 08:36:03 EDT
You're right this feature is missing.
Comment 6 Dani Megert CLA 2009-04-22 08:36:36 EDT
*** Bug 273235 has been marked as a duplicate of this bug. ***
Comment 7 Victor Homyakov CLA 2012-09-26 10:18:07 EDT
Currently when right-clicking on editor tabs there are 3 options: Close, Close others, Close all. Would be great to have additional option "Restore closed tab" as in modern browsers (Chrome, Firefox, Opera) to automatically reopen last closed editor tab. Three major browser vendors agreed that is very useful feature in multi-tab environment. Eclipse developers think different?
Comment 8 Prakash Gourav CLA 2016-01-12 08:28:29 EST
Would be helpful to implement a short history of recently closed 10 tabs like in firefox.
Comment 9 Andrey Loskutov CLA 2016-01-12 08:58:47 EST
(In reply to Prakash Gourav from comment #8)
> Would be helpful to implement a short history of recently closed 10 tabs
> like in firefox.

I did this once in Extended VS Presentation Plugin, but the code was based on old 3.x API which is not available on 4.x anymore :-( 

The key point was: there must be a listener to the editor part close() events and the listener remembers the editor input objects + editor icons, and creates "recently closed editor" menu out of them.

While this worked in most cases, the drawback of this solution is that this code "leaks" closed editor input objects and editor icons (not a big problem if the input is properly implemented, but a problem if input references large domain objects, which might lead to unexpected OOM), and it does not work for some of the "special" editors which cannot be easily reopened by re-using their input objects.
Comment 10 Nobody - feel free to take it CLA 2016-10-11 10:40:09 EDT
Solving issue #358284 involves solving this one.
Comment 11 Dani Megert CLA 2016-10-12 12:46:02 EDT
*** Bug 358284 has been marked as a duplicate of this bug. ***
Comment 12 Dani Megert CLA 2016-10-12 12:47:54 EDT
Alt+Left reopens the editor that just got closed, and the Left arrow in the toolbar shows a short history.
Comment 13 Nobody - feel free to take it CLA 2016-10-12 16:08:11 EDT
Dani, as indicated in comment #1, this only happens in certain conditions. Thanks for reopening.

Note that WORKSFORME should only be used for bugs. If a request for a change is found to request a change already implemented, the ticket should be marked INVALID.
Comment 14 Nobody - feel free to take it CLA 2016-11-06 22:36:22 EST
Solving issue #507121 involves solving this one.