I've been using Eclipse as my IDE for a while now. It's just far too sweet to have my CF IDE and Flex IDE together, plus XML, CSS, HTML, ANT, and all the rest. I've also been a Subversion zealot for a long time. Quite frankly, if you're not using Subversion, for everything related to your development, then you're nuts. And a glutton for punishment. This means all of your code (yes, even those stupid little tests where you try something out), but also all of your documents, database schemas, SQL queries, ANT build files, etc.

But this entry isn't a plea to your logical side to use Eclipse or SVN. I'm assuming you already are. No, this entry is about integrating Trac task management into Eclipse through the Mylyn plugin.

Put simply, Mylyn kicks ass. It links to your Trac repository via web interface or, better, XML-RPC. If you don't have Trac, consider using a service like CVSDude which includes SVN and Trac, or setting up a fully configured virtual server using Jumpbox.

Once you get things set up, Mylyn allows you to handle all aspects of task management from right inside Eclipse. It ends up looking like this:



As you can see, it gives you a full list of Trac tasks. You can sort or categorize these any way you want to. It lets you do a "focus on the workweek" mode, which limits what you see to only tasks due this week. You can create, modify, or close tasks right from Mylyn, no need to work with the crappy Trac web interface. This alone is really great, but it gets better.

Mylyn lets you attach a "context" to any task. This means it will keep track of what files you are working on that relate to the current task. So if you come back to a task later and activate it, Eclipse loads the attached context and shows only the files and resources that have to do with that task! This is great since it makes it much easier to work on a task without seeing a bunch of unrelated files. Of course you can choose to show everything in your workspace again if you need to add more files to the context. This is really a great idea.

Finally, if you have the proper connection set up between Subversion and Trac (which CVSDude and Jumpbox do), you can close Trac tickets directly in your commit comments! So if you commit with a comment like "Fixes #188", ticket 188 will automatically close and have a comment added that references the Subversion revision that closed it!

All of this really creates a full-circle version control and task management capability, all from within the IDE. More details are available at the Mylyn page, or you can read a more thorough article at IBM. I'd urge anyone to have a look at this very cool plugin and enjoy the immediate workflow benefits. And to anyone already using Mylyn, feel free to share your experience or any tips you have.

Comments Comments (7) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 13469 Views

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

  • # Posted By Tom Chiverton | 3/20/08 10:30 AM

    It's worth pointing out that even if you can't/don't use Trac and/or SVN, Mylyn can still do all the task lists, view filterting and stuff 'standalone'.
    It's great, and my only gripe is that it sits along side, as opposed to subsumming, the '//TODO' code comments 'Task' view - there's no way to link a Task to a Task List item, so I have to have both views open.

  • # Posted By Brian Kotek | 3/20/08 10:55 AM

    This is true. Though one could probably make the argument that if you have Trac and Mylyn right there, you really shouldn't be using TODOs much. If you have a TODO to add, you can just add a task via Mylyn instead, so that it is permanently saved and is now part of your queue of tasks.

  • # Posted By Tom Chiverton | 3/20/08 11:03 AM

    Indeed and I'm trying to get in the habit.
    Unfortunately there are already TODO's in my code, and other peoples, so I'm stuck with both for the moment.
    A 'one time' import wizard of some sort would probably do it, tbh, it needn't be complex.

  • # Posted By Qasim Rasheed | 3/20/08 12:56 PM

    Brian

    Excellent post. My only gripe with Myln (that can be the lack of knowledge) is the you lose working set as soon as Mylyn is activated. I will have to restart Eclipse if I had to work with some working sets. Apart from this Mylyn really rocks!!

  • # Posted By Brian Kotek | 3/20/08 4:42 PM

    Yeah not sure I follow Qasim, unless you weren't aware that you can deactivate a an active task, your original working set comes back to the navigator panel. This is how the "contexts" work.

  • # Posted By Adam Haskell | 3/21/08 1:33 PM

    Great post Brian! Along with Standalone mode which Tom pointed out there is also an adapter to connect mylyn to JIRA that is awesome.

  • # Posted By Jon Messer | 3/21/08 9:22 PM

    I had just gotten into using mylyn with svn/trac at my old job and I loved it.

    At my new job we are using Test Track Pro instead of svn/trac, so I'm having to use mylyn stand alone... it's not as cool when you have to synch your local task to an external ticketing system...

    I'm hoping some eclipse plugin guru will develop an SCM/TTP mylyn plugin.