Funny titles aside, I’ve had the opportunity lately to expand my devlopment horizons far beyond what I’ve previously thought possible. The MemberFuse project has required far more project management and documentation than anything else I’ve ever been involved in. Since I’m so excited about it, I thought I’d write a tutorial on how to setup Eclipse on a Mac and integrate with Trac.
For those of you unfamiliar with Trac, and / or what it’s about: Trac is a ticket management system well suited to SCRUM type software developement. Actually, Trac works well with any type of software development methodology, but it’s been a real boone for us using SCRUM.
Trac integrates with SVN, so your existing SVN login information can be used to log in to Trac. What’s more, all of your SVN changesets are logged in Trac and can be viewed as an RSS feed.
The point of this tutorial isn’t to get into a long discussion about Trac however. The point of all of this is to educate on how to get your eclipse installation to work directly with Trac.
First let’s start with getting a version of Eclipse that suits your needs. I’m a PHP guy, so I’m using Zend Studio for Eclipse. The current version at the time of this writing is (Neon beta). I’m pretty sure it’s free. However, even if it’s not, I still heavily recommend it. The download is pretty big (around 300MB) so be patient. Once you’ve got it downloaded, the installer is pretty self expanatory. If you’re not a PHP developer, I’m sure there’s some pre-made flavor of eclipse out there to suit your needs. You figure it out.
Once your Eclipse app is installed, you’ll want to get the Mylyn plugin. The Mylyn plugin is what handles the Trac connection and ticket synchronization. Anyways, you could download the package manually, but Eclipse’s managed installer works amazingly. So, we’ll use it.
First, fire up your Eclipse App. Then navigate to the following location:
Help / Software Updates / Find and Install
The install / update dialog window opens and you have the option to either update existing features, or search for new features to install. We’re installing new stuff, so selecte ‘Search for new features to install’ and click ‘Next’.
Next, you’ll get a window with a bunch of options. The checkboxes indicate existing features you already have in your Eclipse setup. We’re adding new stuff, so find and click the ‘New Remote Site…’ button in the upper right area of the window.
Here you’ll be prompted for an update site URL, and the name you wish to call it. The name you want to call it is irrelevant, but I’d stick to something that makes sense. The URL field is very important, so use the following url:
Change the X.Y to whatever your version of Eclipse is. I’m using Eclipse 3.3, so I’d change the X.Y to 3.3.
Once you’ve got that much in there, go ahead and click ‘OK’. That closes the current window, and you’ll be back to the window with all of the options. Click ‘Finish’ and the Update Manager will attempt to contact the udpate site you’ve provided. If you’re provided the option, click the checkbox that says ‘Automatically Select Mirrors’. It just makes life a little easier.
Be careful when using this with some of the other plugins, as you can corrupt your Eclipse setup with some of the less well QA’d plugins out there. Mylyn is pretty stable, so you’ll be fine letting it do it’s thing.
Once the update manager finds everything, you’ll be prompted as to what you want to download and install. I’d use descretion here. You will require most of the packages listed. However, unless you really want Bugzilla integration (you might), I’d elect to leave that one alone.
After that, click ‘Next’ and go through the various prompts you’ll see. Basically, you’ll be prompted if you’re sure you want to install the packages, and yes, you are.
Congratulations! You’ve got Mylyn and Eclipse setup! Now, it’s time to get into how you actually use the stuff…
Click the following menu path: /Window / Show View / Other
Now, you’re going to see a new window prompting you for what type of view you’d like to see. Navigate to Mylyn / Task Repositories:
Once you’ve gotten that done, the Task Repository pane will appear (somewhere) in Eclipse. Now click the menu button in the upper right corner of the view, and select ‘Add Task Repository’
A new window will appear that prompts you for the type of task repository you want to connect to. It appears I wasn’t as judicious as I thought when I setup Mylyn myself (note that I have the option to add a bugzilla repository, which is useless for me). Anyways, select Trac, and click ‘Next’
Now you’ll be prompted for the URL of the repository and your login credentials. Go ahead and fill in the specifics of how you’re required to connect to your own Trac repository, and click ‘Finish’.
Now, you’ll want to go back to the show view menu. From there, select Mylyn / Task List.
After you’ve gotten that much done, the Task View will appear. From there, you’ll need to add a query, to get the tasks that are important to you.
To do this, you’ll need to right click somewhere in the whitespace of the task view, and select New / Query.
Once you’ve done that, you’ll get a new window (the Query Window), and all of the options will be filled with the options and applicable answers provided by Trac.
Now, you’ll see a list of tasks in the task view provided by your Trac repository. Double click one of them to see it. You’ll have a few options available to you. The most important of those options is the activation option.
When you activate a task, all files you open afterward will be added to the ‘context’ of the active task. Another awesome feature here, is that your time on the task is monitored, which is great for reporting how long some impossible Trac ticket took you to finish.
Once of the real values to this setup, is SVN integration. Everytime you commit, or merge your files, the timeline of Trac is updated, and reflects your changes via Diff view. That’s a bit off topic, and I’ll save that lecture for some other time.