title: Eclipse, GIT branches, Working Sets and Target Platform why Egit sucks in this.
body: <p>I am looking for a way to work with different GIT branches and have the Eclipse workspace in sync. with the directory structure of the GIT branches. In this case the branches will differ as projects have moved around from subdirectoris. To illustrate: </p>
  
  <ul>
  <li>master
  <ul>
  <li>plugins
  <ul>
  <li>plugin1</li>
  <li>plugin2</li>
  <li>feature1</li>
  </ul></li>
  </ul></li>
  <li>topic_organize
  <ul>
  <li>plugins
  <ul>
  <li>plugin1</li>
  <li>plugin2</li>
  </ul></li>
  <li>features
  <ul>
  <li>feature1</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>I think the current Egit solution is not workable. What it does it close projects which are not in the new branch. (When I switch branches in the cmd line, is even more horrific, Egit actually recreates the missing projects! in this case, when I switch to branch "topic_organize", the project feature1 in plugins will be recreated by EGit, my repo is automatically not clean which I sincerely despise, when switching to a branch). </p>
  
  <p>What it doesn't do (and should do) is to start with a clean workspace, and import all the projects and organize them in working sets and on top load the appropriate target platform. </p>
  
  <p>The consequence of not doing what is should is, that I have to 1) manually import missing projects, 
  2) remove projects created by EGit which are in my repo, but not imported in the workspace. 3) Create working sets if these differ between branches. (In my case the working sets, are equal to the sub-dirs in the repository). 4) Clean my GIT repo. </p>
  
  <p>As a best-practise towards a full solution is to create a team project set. The working steps would be. </p>
  
  <ol>
  <li><p>Import your projects from GIT and add them to working sets corresponding to the directories in the GIT repo. </p></li>
  <li><p>Export a Team Project set to a special project. (Make sure the location of this project never moves in GIT). </p></li>
  <li><p>Commit this "team" project, so your GIT branch is clean. </p></li>
  <li><p>Clean your workspace. (I mean start with a clean workspace by removing all working sets and projects). </p></li>
  <li><p>Switch branch on the command line (You won't be able to switch with a clean workspace). </p></li>
  <li><p>Select file import, import Team Project Set (.psf) file. (Assuming you did step 1,2,3 for the other branch as well). </p></li>
  <li><p>tada your workspace is back with working sets and all projects open. </p></li>
  <li><p>Change your target platform if needed. </p></li>
  </ol>
  
  <p>NOW MY QUESTION :P</p>
  
  <p>Do I miss something? Is this there a way to clean the workspace in one go? Now I have to remove the working sets first, then the projects by selecting them one by one! (Perhaps I should switch the workspace as well?). </p>