How to restore Eclipse last project tree expand on startup? - eclipse

When I quit Eclipse some interesting packages are opened. But when I restart Eclipse all projects/packages are collapsed.
Is there a way to save the state of the Project-Explorer on closing Eclipse?
I don't want to use the Link to Editor feature, because this allways opends packages, that I don't want to expand just for looking up some declaration in an other class.
I also don't want to use the focus view of MyLyn, because I want to be independent of a task and want to see all available packages.
Is there a build in feature of Eclipse to do so?

I found in a Eclipse-Issue that this feature was removed, because It took to much time in the startup-phase. So this feature does NOT exist in Eclipse without an additional plug-in.

Related

Prevent Eclipse from collapsing a path in project explorer that I manually opened?

This is about a peculiar habit of the Project Explorer in Eclipse that has been bugging me for years now.
If I expand some source subtree somewhere among my projects and then have to re-think which file I actually need to open, I often switch back into some other part of my project tree to find the info I need.
But, more often than not, when I actually did find that info and know which file exactly I need to open, the source tree I have expanded earlier has been collapsed again by eclipse (probably because it decided that it has to do a quick workspace rebuild or gradle refresh or something in that vein). Even worse, sometimes eclipse reorders the submodules of the (maven/gradle) project so that the subtree I have expanded earlier isn't at the same position in the project explorer anymore and I need to go looking for it again. Eclipse sometimes even (apparently randomly) starts to reorder the tree in the moment just before I want to click on a file or something like that.
So. How can I configure Eclipse to never collapse a subtree in the project explorer that I expanded manually? And how can I prevent Eclipse from reordering the projects? (Switching the IDE is out of question for this particular project, because there are some eclipse-only plugins for the framework involved.)

Eclipse start with previously set (un)folded methods

I frequently use folding/unfolding of methods in Eclipse for Java while working. However after each launch of Eclipse I need to redo the settings of folding/unfolding methods. Is it possible to make the framework "remember" my settings in each opened file? By folding/unfolding I meen clicking (+)/(-) button as on the following picture:
Please note I do not want all methods to be folded or all to be unfolded. I want the fremwork to remember my settings.
Although Eclipse doesn't natively support the remembering of folding/collapsed state of its editors, you can use external plugin to do the same. Here's a plugin that might help you with your problem.
Eclipse Folding Plugin

Titanium Studio or Eclipse: How to save workbench state?

TiStudio 3.2 (based on Eclipse):
Is there a option to save current state of workbench? I mean: opened editor windows, layout, etc.
Per project would be fine.
Everytime I switch projects, those states are lost and I cannot see any option where to set them.
Answering my own question:
install mylyn eclipse plugin.
It provides a task focused workflow that remembers contexts of the workbench for every task.
Really good way of changing contexts.
Take a look at this tuto: http://www.vogella.com/tutorials/Mylyn/article.html

How can I make Eclipse save the state of the project tree when I quit?

When I use Eclipse I use the project tree a lot, and I expand and collapse folders very often. Is there a way to make Eclipse automatically reload the last state of the project tree when I launch it?
As far as I know, the best you can do is select 'Link with Editor' and leave a file open in each node you want expanded.
Not exactly that... but Mylyn is very close to it. In Mylyn the state of the package navigator can be controlled via the context of the current task.
"Mylyn 2.0, Part 2: Automated context management" from developerWorks explains it all..

How do I delete an Eclipse perspective for a plugin I uninstalled?

I was evaluating the Enterprise IDE plugin for Eclipse, and ultimately decided not to purchase it. After I uninstalled the plugin, I was left with a bunch of perspective buttons (the ones in the far upper-right-hand corner) which I can't remove. How do I get rid of the manually, without nuking my workspace?
Edit: To be clear, right-clicking and going to "close" does nothing. Not even an error message.
Click Window ► Preferences ► General ► Perspectives. Select the perspective you want to delete and remove it. Some of them are unremovable. I don't know why.
How did you uninstall that plugin ?
As Daniel details in his answer, Help-> Install new software -> click on "Whats already installed?" is the right way to uninstall a plugin, and should get rid of the perspective as well.
If the plugin was installed in the dropins directory or in <eclipse>/plugins and <eclipse>/features, did you delete all directories/jar in <eclipse>/features, because if that plugin was packaged as a product, it did define in the product extension point a plugin_customization.ini which can indicate some perspective buttons.
If not, the only solution is to have a careful look at your workspace metadata, look for all recent file related to that plugin and remove them.
Make a copy of your workspace first though.
As an example of such a careful look at your workspace metadata", user900975 points out in his answer the <your workspace folder>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml file, with <perspectives> element and <perspective> child elements that you can remove.
Note: Eightball mentions in his answer (upvoted) the possibility to list and delete a perspective.
Since he mentions "Some of them are un-removable. I don,t know why", my original answer above still stands.
Alexandros adds in the comments:
This helped me fix this, but in my case the file I had to edit while Eclipse was closed was:
.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi
I was suffering the same problem with a left-over perspective button for SVN repository Exploring. It wouldn't disappear using the close option. However it did disappear after selecting from Window -> Close All Perspectives.
Regards,
<your workspace folder>/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml contains a <perspectives> element with <perspective> child elements. You can delete <perspective> elements and they will no longer appear in the toolbar. Eclipse writes to this file when it exits so your changes will be overwritten if you don't quit Eclipse first.
If you installed a plugin, click Help ► Install new software, then click What's already installed? in the bottom right. Uninstall what you want, the perspective will be removed as well.
You could also try launching Eclipse with the -clean command line argument. This cleans out the Eclipse runtime cache, so it might fix your problem as well.
I had the same problem after installing a plugin. The answer is quite simple, if not obvious.
Open Window | Preferences
Click General node
Click Perspectives
Find the perspective in the list and then select Delete command on the right.
The list will refresh and your perspective is deleted.