Domanda

I have this habit of looking into other source codes from different projects for a reference. However, this leads to cumulative issue of forgetting to close the tab. I may have around 100 source tabs opened up (which is related to current and unrelated projects).

Is there a preference or plugin to auto close unused tabs after certain idle period? Like say after 10 minutes of inactivity.

The issue I face is when I'm in a hurry the tabs pile up and consume lots of memory, and not to mention if you have opened up Chrome for reading documentation and StackOverflow digging. Finally slows down my system due to swap usage.

[ Update ] Found some interesting tips from this link

So how to quickly close unnecessary tabs in Eclipse?

  • Closing tabs one by one by clicking on the tab with a wheel/MMB. It’s faster than clicking LMB on a small cross icon, because it’s enough to click anywhere on a surface of a tab. I do it when there is few tabs to close (like one or two) and tabs that I want to closearen’t hidden.
  • Closing current tab using Ctrl+W keystroke. I do when tab to be closed happens to be an active tab. And when I just visited some class to check something and I won’t need to revisit it anymore soon.
  • Using Ctrl+Shift+W keystroke to close all tabs. I do it when I’m starting completely new tasks or at the moment I’m too lazy for 4 or 5. :-) .
  • Right-clicking on the tab that should stay open and selecting “Close all others” option. It’s handy in cases where only one editor is significant and others are a result of code exploration.
  • This is my favourite one: Using ctrl+shift+e keystroke to display “Open editors” dialog, selecting editors that should stay open (with ctrl pressed), “invert selection”, “close all selected” and finally hitting esc to close the dialog. It may seem complex but trust me it isn’t. It took me only a few attempts to learn how to use this trick effectively. I often do it when I forgot to close tabs for a while and I have a lot of tabs open and what’s worse, some of tabs aren’t visible on tabs bar (arrow icon needs to be clicked to see the hidden tabs).
È stato utile?

Soluzione 2

There is no auto-close feature/plug-in in eclipse. Because user opened all the editors manually and he/she has to close these on their wishes but not automatically.

For your problem I suggest you to use Mylyn plug-in so that you can stick to only those editors(context) you frequent used, hiding all other editors, packages, classes etc.

Also there is an eclipse plug-in for pinning editors refer my answer for the post Eclipse - How to pin editor tabs?

Altri suggerimenti

There is a feature General > Editors > Close editors automatically which closes unused editors automatically.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top