Titanium Studio or Eclipse: How to save workbench state? - eclipse

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

Related

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

eclipse juno, how can I associate currently opened files with a project or am I using eclipse outside the box?

I have been using eclipse for a few years. I typically use just ONE workspace and have several projects for all of my perforce branches. I close the ones I'm not working on, open the one I am interested in.
The caveat to this approach is that I have to manually close empty editor tabs every time I do this.
Am I approaching this the wrong way?
I'm really not a fan of having multiple workspaces as then I have to setup proejct variables for each new workspace.
Is there a way to associate the currently open set of editor tabs to the current project(s)?
Thank you for your time.
-Dennis
Is there a way to associate the currently open set of editor tabs to the current project(s)?
AFAIK, no. However, you can associate the editors to a task by using Eclipse Mylyn. This way when you switch to an old task, it will set the editors and package exlorer to only show what you worked on the last time.
If you are working with defects from Jira or Bugzilla or a few other systems, these defects can automatically be imported into mylyn and will allow for very easy context switching.
If you dont get tasks from one of the supported repositories you'd have to manually create the tasks, but then just creating a dummy task for each project you work on would create the effect you are after.

How to restore Eclipse last project tree expand on startup?

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.

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..

Eclipse - Save Folding on Quit

Is there any way to save my code folding in eclipse?
It's horrible to scroll trough my entire UI declaration. (And yes, I googled it! :)
The question is very similar to Is there a way to collapse all code blocks in Eclipse? .
I'm re-posting my answer there here.
The question is a bit old, but let me add a different approach. In addition to the above hot-key and utility approaches, there are default preference settings that can be toggled.
As of Eclipse Galileo (and definitely in my Eclipse Version: Indigo Service Release 2 Build id: 20120216-1857) language specific preferences can open up new files to edit which are already collapsed or expanded.
Here is a link to Eclipse Galileo online docs showing the feature for C/C++: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_folding.htm .
In my Eclipse Indigo I can open the Folding Preferences window via : menu/ Window/ Preferences/ Java/ Editor/ Folding and set all options on so I can open files by default that are completely collapsed.
Amongst other things, Mylyn allows you to fold/hide content and persist the state.
Mylyn monitors your work activity to identify relevant information, and uses this task context to focus the user interface on the task-at-hand. This puts the information you need at your fingertips and improves productivity by reducing searching, scrolling, and navigation. By making task context explicit Mylyn also facilitates multitasking, planning, reusing past efforts, and sharing expertise.
Once Mylyn is enabled it will start folding/hiding the content. If you have an active task (can use a local task repository) the state should be persisted between sessions. Alternatively you can attach the state to the task (sorry don't have Eclipse to hand to check the exact method to do this) then retrieve it. This is useful if you are sharing tasks with others.
I know this isn't exactly what you were asking, but this was really helpful for me:
Ctrl+Numpad_Multiply can also be used
to expand all
Ctrl+Shift+Numpad_Divide is bound to
collapse all
Ctrl+Numpad_Divide toggles folding on
and off
(Taken from this post: Is there a keyboard shortcut in Eclipse to fold the current method/block? )
This, and plenty other issues of Eclipse made me switch to JetBrains IntelliJ IDEA. It's worth sneaking a peek at it if you find Eclipse's performance annoying, need more control on your code formatting or if you just want to have your code foldings persisted.
I'm not using it for too long now but it seems pretty handy for anyone developing in the Java, Android or Scala corner.