Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Setup a separate source repo and Eclipse workspace for each branch.  Don't mix the branches.  With CloudStack development changes in maven, packaging, and breaking into smaller modules, using one local repository for different branches really does not work.  Eclipse re-compiles each time you switch branches because directories are different.  Until these things have settled down, the best thing to do is to setup a separate source repo for each branch.
  • If you've been updating the source repo from an older version, you should clean out the bin directory and .project files.  The best may be to start with a clean repo and workspace and import the maven projects again.
  • Setup the eclipse profile in Eclipse.  Eclipse needs to manage the files that it generates or else it will keep re-compiling and re-indexing.  Unfortunately, by default, eclipse m2e uses the same target directory in the pom.xml as the place where eclipse holds the files.  That slows down Eclipse and your computer significantly.  CloudStack is setup to deal with that with a script file that adds the eclipse profile to every Eclipse project.  You can take advantage of that by running the script from the top of your source tree.
    • Code Block
      bash -x tools/eclipse/set-eclipse-profile.sh
      
  • Setup working sets for Eclipse.  Open Resource Dialogue (Shift-Ctrl-R) in Eclipse is one of the fastest ways to get to a file you know about.  However, with the nested projects in CloudStack, this dialogue gets rather confusing because files of the same name appear from both the project itself and the parent project.  Working Sets are the best way to get around this problem. 
    • Hit Shift-Ctrl-R to open resource dialogue
    • Click on the down arrow in the upper right of the dialogue box
    • Click on the Edit Active Working Set from the drop down menu
    • Create a working set called cloudstack
    • Add all of the projects to it and then remove the parent projects.  The reason you want to remove them is because they’re parent projects and when you open resource, the open resource dialogue gets the .java file from both the actual project and the parent projects so the same .java file appears more than once.  Here's the list of projects: Cloudstack-framework, Cloud-engine, Cloudstack, Cloudstack-plugins, Cloud-services, Cloud-apidocs.
    • Click on finish.
    • Click on the top right drop down button again
    • Make sure “Show derived resources” is not checked
  • Consider creating multiple working sets.  Put your most commonly used files in one working set so you can actually access them.
  • Use Indigo release.  Juno release is infamous on poor performance.  You can google it yourself.  I've tried SR2 for Juno and it's still slower than Indigo.

...