English 中文(简体)
how to change views with clearcase on eclipse
原标题:

I m using eclipse to work on a HUGE C project and it works generally well except for not being able to change views. I create a new project and set the project source to the clearcase vob directory and it works just fine except it stores the project files in the vob. then when I change views the project cant be opened because its meta-data is sitting in the old view. I can create a new project but eclipse refuses to have two projects with the same path so I (probably unwisely) remove the original project and create it again. I m spending too much time waiting for the indexer every time I switch views.

How can I switch views with out having to re-index everything?

最佳回答

I also worked on a project that used ClearCase with Eclipse. The same kind of drama that you describe happened to us on a regular basis. ClearCase was a big part of my reason for leaving that job.

With some distance between me an that horror, I ve thought up a possible solution: Set up several different installations of Eclipse, with not just separate workspaces but separate .metadata and related stuff. Check out into separate Eclipses from the different views, then shut down one and fire up another to work with another view.

I haven t tried this, but it seems to me this should work.

Oh yes, you ll want to export your preferences between Eclipse installations.

问题回答

Are you talking about snapshot or dynamic views here?
The path should be unique per view in both cases anyway.

In either case, what eclipse will not let you do is to have, in the same (eclipse) workspace, two projects with the same (eclipse) name.
You can try:

  • to have them in two different workspaces
  • to have a different .project per view (with a different name), provided those views reference the LATEST of two different branches.
    (as As mentioned earlier in Which eclipse files belong under Version Control, those two files -- .project and .classpath -- can be under version control, provided they only use relative path.)

Perhaps the answer here is not to let clearcase anywhere near your workspace?

Use create project from existing source , so that the project lives inside the clearcase view, instead of having the project live in the workspace with a source folder inside the view.

Then you can have one workspace for each of your views.

This does imply checking in .cproject, .project, .classpath, etc.

if i switch view and use the same project it sometimes works if I manually copy .cproject and .project from one view to the other.





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签