Mylyn: Creating new Issues from TODO comments

Wednesday, March 3, 2010

On Twitter, the Eclipse PDE lead commented on a neat feature of Mylyn that I hadn’t seen before: the ability to add issues/bugs into your issue tracker directly from the “Problems” view. I wanted to see if you could do this from the “Tasks” view if you entered “TODO” comments into your CFML, and sure enough, it works. As of this writing, CFEclipse supports TODO tasks but ColdFusion Builder does not. Please consider voting for this feature request.

What I love about this feature is that you can fairly seamlessly create tasks and attach your context for that new task in less than a minute. When executives yammer on about “Work Smarter, Not Harder”, Mylyn features such as this exemplify the “work smarter” mentality. The point here is that you reduce friction in two areas: 1) creating the task with relevant information, 2) sharing your context with the developer to whom you’re assigning the task.

Reduced friction == Increased Productivity.

Here’s how:

In Words:

  1. In CFEclipse, enter a TODO comment in your source code, Something like <!--- TODO: make this thing actually work --->
  2. Open the “Tasks” view – notice your TODO is now in the that view as a new task
  3. Right click on that table row, and select “New Task from Marker”
  4. This will bring up the screens necessary to add the issue to your issue tracker (or enter as a “Local task” if not using an issue tracker)

To then attach that file as the “context” for the issue:

  1. Activate the new task
  2. Navigate back to your file that contains the “TODO”. This file will now be part of the context for the issue
  3. In the Issue editor, go to the “context” tab and click the “Attach Context…” link. Follow the steps to completion
  4. Note that this is the same thing I wrote about previously

Now, when the developer to whom the issue is assigned (even if it’s you) opens this issue, they’ll be able to retrieve the context and get working on the file you want them to work on without having to navigate a single tree.

If this ain’t Jedi effect smoothness, I don’t know what is.

Happy Coding.

Mylyn and Jira: Sharing Context with Another Developer

Tuesday, March 2, 2010

When working on a team of developers, it sometimes is useful to reassign an issue to another developer. In Jira, you simply hit the “Reassign” link; this is standard amongst all issue trackers worth their salt.

Wouldn’t it be nice if you could also copy your Mylyn context? If you could say “I’ve been working on these 5 files, and when I reassign this issue to you, you’re going to get the same view of the world as me so you don’t have to figure out what files are involved in this issue”?

Here’s how:

In Words

  1. In ColdFusion Builder or Eclipse, In the Issue editor for a given issue, go to the “Context” tab
  2. It will show you all the elements associated with your context
  3. In the upper left, Click the “Attach Context” link. Follow to completion. This will attach your context to the Jira issue
  4. When the other developer working on the issue activates it, Mylyn will recognize that they do not have any context for the issue yet and will prompt them to open your context.
  5. When they do so, it’ll open up just the files you had attached to the context


Big Caveat: This relies on both developers having projects that are named the same

Mylyn and Jira: A Short Tutorial

Monday, March 1, 2010

Recently, I wrote about why I believe Mylyn is an indispensable tool for developers on the Eclipse platform – this includes CFEclipse and ColdFusion Builder users. I also wrote about my favorite Mylyn-related toolbar item.

Today, I created a screencast that quickly shows how to link Mylyn to a Jira instance:

In Words:

In Eclipse or ColdFusion Builder:

  1. Window – Show View – Task Repositories
  2. Right click in the view and select “Add Task Repository”
  3. Select “Jira”. If it’s not in the list, hit the “Install More Connectors” button and install the Atlassian  Connector from there
  4. Hit “Next”
  5. Enter the URL to your jira install, label it, and enter your credentials
  6. Expand “Additional Settings”.
  7. I like to set the “Refresh Configuration Automatically” checkbox and I limit the search results to 100. Do whatever you like
  8. Hit the “Validate Settings” button at the bottom. Then hit “Finish”
  9. It’ll prompt you to pull in a Query from Jira. These will be your saved filters, which will include Jira’s default filters in addition to any custom filters you’ve created
  10. Select a filter or create  a new query. Hit enter and wait for them to load.



Once you’ve done that initial bit of setup, you’re ready to rock. You can now work with Mylyn from the “Task list” view (this will be your main Mylyn view). If you want to include other filters, do this:

  1. From the “Task List” view, right click and select “New Query”
  2. Select your jira install, and hit Next
  3. You can create a new query with the query builder form, OR:
  4. You can use a saved filter from your Jira Install. I like this method
  5. Select the “use saved filter” radio button, and select a filter. If you’ve added one that doesn’t show up in the list, hit the “Update from repository” button
  6. Hit “Finish”

Your filter will now show up as a new tree item in the Task List view

Happy Mylyn-ing!

ColdFusion Builder: Importing existing projects into a new workspace

In ColdFusion builder and CFEclipse, I like to keep my workspace “light”, meaning I keep only a few open projects in the workspace at any one time. When it becomes necessary to work on a previous project that isn’t in my workspace, I “import” that project back in.

This method is also useful when you have already created projects in CFBuilder or CFEclipse and you want to use them in a new workspace. The “long” way would be to start a new workspace and then to do File – New – Create Project… for all the projects that you’ve already created.

The fast way is to simply “Import” them. I whipped up a screencast to demonstrate this:

In words:

In ColdFusion Builder or CFEclipse:

  1. File – Import – Existing Projects into Workspace
  2. Type the directory where your project lives.
    1. If you want the option to import ALL projects in your webroot, you could simply type the location of your webroot – for example, c:\inetpub\wwwroot. This will take a while since it will scan every directory for .project files
    2. Alternately, if you know which directories your project lives in, you could do them one at a time
  3. Hit Enter
  4. Hit Finish

Special Thanks to Dan Wilson for suggesting this tutorial