Eclipse Tips & Tricks: How I organize my Workspace
Here are some hints on how I organize my Eclipse workspace that you might find interesting if you want to keep all the stuff together in one workspace, not only the projects but also shared classes, API docs and default Ant build files.
I’m only using one workspace for all projects, no matter what technology they’re using. I’ve heard others are using one dedicated workspace for every technology and that’s fine too but I find it more practical to just use one for all. I’ve created three sub folders in the workspace named .classes, .default and .docs. Note the period at the beginning of the name. This keeps them listed before all other folders (unless you name your projects with a starting period).
The .classes folder contains subfolders for every technology (or language) I use, namely as2, as3, haxe and java. From there on the ongoing structure depends on the language. For as2 I have folders like additional, mm7, mm8, mtasc, zinc etc. For as3 I only have additional and and swc. The additional folder contains all kinds of third party packages, the swc folder only contains swc files etc. whereas for as2 the mtasc folder only contains the classes that ship with MTASC etc. Here’s a diagram of the structure …
The .default folder contains again subfolders for every language and these subfolders contain language specific Ant property- and build files. I’m using Ant for ActionScript 2 but I haven’t really used them for AS 3 so far because of how Flex Builder builds projects. I might eventually explain these build files in another posting.
The .docs folder – you knew it – contains again subfolders for every used language and these contain folders with API docs, for example a folder named as2lib in the as2 folder for the as2lib API etc. Straightforward really. That’s how I keep my projects and additional files together. The whole structure is displayed on the picture.
Here’s another small hint: I name my projects like domain names, for example com.hexagonstar.projectname for my own stuff or misc.as3.collisiontest for something that doesn’t go with a specific domain name. This way I can keep projects nicely organized together in the same workspace. There is one minor drawback with Flexbuilder when using this naming convention though … the ActionScript Project wizard doesn’t like periods in the project name. The project name can be changed after the project has been created however.