问题
Is it possible, to save the state of the package explorer when closing Eclipse (3.4) and to restore it when opening the workspace again?
By state I mean the nodes (expanded or collapsed).
回答1:
I am not sure it is possible, but if you have the "Link with editor" button (also presented here) activated, you would open the relevant nodes as soon as you click on of of the editors you left opened (and restored on eclipse restart).
Another way to restore the relevant state is to record some kind of context for a given task:
This is called mylyn
回答2:
It's not possible. Apparently this used to be in the Package Explorer in the past, but it was removed for performance reasons. There is an outstanding enhancement request to add this to the Project (not package) Explorer. However because of the same performance issues, we will likely do something like make this a user option for the underlying Common Navigator (on which the Project Explorer is based).
回答3:
"It's not possible."
I don't care who says "it's impossible", they're wrong. No feature this basic is "impossible" in software. Sounds like a UNIX guy saying the GUI is impossible. If the Eclipse guys can't figure it out (or can't be bothered), perhaps they should ask the guys at ADOBE who maintain Flex Builder (built with Eclipse!) which DOES provide this simple feature?
Makes it clear why paying for something more likely gets you what you want, where a free product will not. If the "Eclipse teams" pay check depended on this feature, suddenly "Oh it's possible just give us a few weeks."
So the answer is: yes it's possible, but you'll have to bribe the Eclipse team with a large donation of some kind first. (And supposedly all 'proprietary' stuff is evil - hah. Not if the customer likes getting what they need.)
来源:https://stackoverflow.com/questions/1816170/how-to-save-the-package-explorer-in-eclipse