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

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.

Related

How to view multiple projects in one window in IntelliJ IDEA IDE?

In Eclipse IDE you have the concept of "workspaces" allowing you to manage/view your projects in one side pane easily and allowing you to switch between projects easily.
As i gather IntelliJ doesn't have that feature because everytime when i open a new project it always asks to either open in a different window or same window? And in the latter option it overrides my existing open project.
You're right; IntelliJ simply doesn't have this functionality. Each project is opened in a single window, either overwriting your current window or spawning a new window.
If you feel that this sort of behavior is something you want, then feel encouraged to put in a feature request on their issue tracker.
You can create a new empty project and import into it the modules from the other projects.
This works for me, although is not exactly the same as what you're trying to achieve. Note that you will lose (e.g. have to specify manually) the specific projects' settings.

Mylyn opening unwanted files in editors from task context

I'm using Mylyn 3.12 for the first time with Eclipse Kepler. I am using subversive to manage SVN connection for team.
I doing web development, so no Java projects here. I'm having the craziest situation where Mylyn is always adding three files to every task I create after I deactivate and then reactivate the task. It's almost as though there is a hidden editor with these files open. I have no idea where they might be coming from. Why on earth it chooses these three files is beyond me. If I delete one of the files, it still tries to add the file to the context, but the editor opens with file does not exist. When I "clear all" from the task context, stop the task, and reactivate, the files still appear! I even clear the invisible section as well.
Does anyone have any idea what might be linking these files to the context?
Also, I'm using the ColdFusion builder plugin, so I don't know if was related to that.
Ok, on a hunch while dissecting this issue, I decided to go through the "Window->Navigation->Switch to Editor" Each of my three files had it's own editor listed here! However, I found no way to actually get to these editors. So, whenever a task was created, it would simply copy open files from these hidden editors. So, I had two copies of each file open. I have no idea what is going on with my "shared area."
Again, the only way I could get to the hidden editors was the Window menu item, so it beats me if this is a bug or a feature. It almost seems like it was split editor view gone terribly wrong.

firefox-esque tab groups for eclipse

When I'm working on large projects, I always tend to end up with about 7 or more different tabs open in eclipse.
I'm wondering if there is a plugin available for eclipse that works like Firefoxes tab groups, in that you can group different tabs together and switch between them. This would make it easier for me to concentrate on my different projects so when i'm working on the "c heeseburger factory" project and something goes wrong on the "hotdog factory" project, I don't have to add a further 8 tabs to what I have open, I can just minimise the current tab group and open a new lot safe in the knowledge once i'm finished with the "hotdog factory" i can have all my "cheeseburger factory" files open in one click.
There are no universally working tab group plug-in, as far as I know.
However, it is possible to use Mylyn for this reason: when you are working on the "cheeseburger factory" project, you activate a corresponding task, and Mylyn will record a context. When you switch to the "hotdog factory" project, you terminate the currently executed task (the context is saved, but the editors are closed), then open the other task. When you are finished, you simply activate your original task again, and you get back your previous context.

Multiple sub-workspaces in Eclipse

I write code in several languages (Python, C, C++, and Java) using Eclipse. Is it possible to designate a directory on my machine (say /home/workspace/) as the "primary" workspace for any Eclipse session, but then to have subfolders, /home/workspace/python, /home/workspace/java, etc., in which I can create new Eclipse projects.
I don't want to have to navigate menus and select different workspaces for each session of Eclipse that I start up. I would rather just always have permission to manipulate any projects from a variety of folders at any time, but I can't find a clear answer about whether this can be done and how to do it.
As I understand your question; You want to have one workspace, but be able to code in several different languages without switching workspace but at the same time keep the projects separated?
First I would suggest you consider several workspaces, I find it convenient to keep settings and projects in separate workspaces. I rarely have to switch language that often.
But. I think what you want to do is to keep several working sets. You create one java working set, one C++ set and associate your different projects with a working set. Then you can minimize the java working set when you are running C++. For working sets you dont need any subfolders on the harddrive.
You might also want to look into Mylyn. Its a great tool for those who often are switching context. It saves the context (eclipse perspective, open files, etc) as associated with a task.
How about setting Eclipse to prompt for the workspace at launch? It wouldn't allow you to work in two languages at once, but should do the trick otherwise.
An Eclipse workspace can contain projects slated for different languages and those projects can live anywhere on your hard drive. There are at least two ways to do what you want. When creating a new project, uncheck the Use default location checkbox and browse to or specify the folder where you want your project to live. If a project already exists import the project into the workspace using the File->Import menu option and then select Existing Projects into workspace. In the next screen make sure the checkbox for Copy projects into workspace is not selected. This will leave the source files in the original folder.
In the Project explorer view, all the projects are going to look like they live at the root level. However you can group related projects into working sets. Then select just the working set you're interested in and all the others will disappear from view.
A warning is in order if you make use of eclipse variables in external tools (and possibly elsewhere). The syntax you use for paths needs to be adjusted. For example with projects outside the workspace this syntax ${workspace_loc:/MyProject/MyFile.txt} is no longer the same as this syntax ${workspace_loc}/MyProject/MyFile.txt

Is it possible to prevent Eclipse from closing up the project space when you close the app?

I have a Java project in Eclipse that mirrors a directory structure on my hard drive and every time I open Eclipse I have to manually open all of the folders to see the source files inside them. Is there a way to avoid this so that everything stays open between app sessions?
With the CNF alone (the Common Navigation Framework), I don't think so.
But with Mylyn (which is part of certain Eclipse packages), you can because the Mylyn task will keep the relevant files/classes/methods visible from one session ot the next.