While software systems, frameworks, and tools can keep growing indefinitely, a developer's ability to process information has a practical upper limit. Most integrated development environments (IDEs) try to address this limit with structured views, editors, and advanced search facilities. Such mechanisms make it easier to navigate large systems, but they're often insufficient to help you manage the enormous volume of information that must be processed to complete a typical programming task. As a result, structured views become overloaded -- the Eclipse Package Explorer, for example, can often show thousands of source files when you navigate even a small enterprise application -- and you can waste a tremendous amount of time scrolling, navigating, and keeping track of this information.
What's interesting is that in most cases, you don't need to see the entire hierarchical structure of a system or every single reference to a particular method to complete a programming task. For example, for any bug you fix or feature you add, you are interested in only a subset of the system. Mylyn is an interaction technology that makes that subset explicit by adding two facilities to Eclipse: integrated task management and automated context management. Task management integrates your task/bug/defect/ticket/story/issue tracker into Eclipse and provides advanced task-editing and task-scheduling facilities. Context management monitors your interactions with Eclipse, automatically identifies information relevant to the task at hand, and focuses structured views and editors to show only the relevant information. When combined, these facilities make up Mylyn's Task-Focused UI, which makes multitasking much easier and dramatically reduces information overload. (For field-study results, see Resources for a link to the "Using Task Context to Improve Programmer Productivity" research paper.)
This two-part article is a guide to using Mylyn. Some parts of the article, in particular those focused on programming and not task management, assume that you're familiar with the Eclipse IDE. Part 1 gets you started with Mylyn and introduces you to its facilities for task management. Part 2 presents Mylyn's facilities for context management and discusses the impact of its Task-Focused UI on your programming day and development methodology. Both parts of this article are published simultaneously for your convenience.
Part 1 is not specific to programming activities and applies to using Mylyn in any of the Eclipse distributions or standalone applications with
which it's integrated. Part 2 focuses on Java
Mylyn extends the Eclipse SDK with sophisticated mechanisms for keeping track of tasks (see Resources for supported versions). A task is any unit of work that you want to recall or share with others, such as a user-reported bug or a note to yourself about improving a feature. Mylyn lets you store tasks locally in your workspace or work with tasks stored in one or more task repositories. (An example of a task repository is an issue tracker such as Bugzilla, Trac, or JIRA.) To connect to a particular task repository, you must have also installed a Mylyn connector for that repository.
Once your tasks are integrated, Mylyn monitors your work activity on those tasks to identify information relevant to the task at hand. From this, Mylyn creates a task context -- the set of all artifacts related to your task. These can include documents you've browsed, methods you've edited, and APIs you've referred to. Mylyn uses the task context to focus the UI on interesting information, hide what's uninteresting, and automatically find what's related. Having the information you need to get your work done at your fingertips improves your productivity by reducing the time you spend searching, scrolling, and navigating. By making task context explicit, Mylyn also helps with multitasking, planning, reusing past efforts, and sharing expertise.
Over time, the result of using Mylyn is a subtle but fundamental shift in the way you work. Once you become accustomed to working in a task-focused way, you're likely to notice a dramatic increase in your productivity. Being organized, staying on top of dozens of collaborative tasks, and tracking your progress will gradually become effortless.
The numbered areas in Figure 1 show some of Mylyn's task and context management features at work:
Figure 1. Mylyn's Task-Focused UI
The sections that follow walk you through installing and configuring Mylyn and introduce its key features. Once you have an overview of Mylyn's task management facilities, you'll learn in more depth how it impacts your day-to-day workflow.
In this article, I use Mylyn's Bugzilla Connector to highlight key concepts of working with task repository integration. The concepts are identical for other supported task repositories, but the level of integration and maturity of connectors varies. The Bugzilla and Trac connectors bundled with Mylyn are mature and considered the reference implementation. Connectors for other issue trackers and project-management tools (such as CollabNet, Rally, Mantis, and XPlanner) are listed on the Mylyn Extensions page (see Resources).
A fully integrated connector provides the following features:
To let you get the fully integrated experience from Mylyn and stop relying on external or Web-based UIs, the connector must support all four of the facilities listed here. But you can still benefit from Mylyn's Task-Focused UI as long as enough facilities are in place for you to work with your tasks within Eclipse. If a task repository for your connector is not available, you can still:
Mylyn is included in most Eclipse distributions now, so the easiest way to get it is to download one of the packages that contains it from the Eclipse Downloads page (see Resources). However, the following instructions are still useful for updating to a new Mylyn version or installing Mylyn into an Eclipse version that it's not bundled with.
To install Mylyn for your version of Eclipse, use the Eclipse Update Manager: Help > Software Updates > Find and install > Search for new features to install. When updating on Eclipse 3.2, it's better to use this mechanism instead of Search for updates, which doesn't do a proper dependency check. On Eclipse 3.3, either way works. For the latest Mylyn update sites to provide the Update Manager, refer to Mylyn's download page (see Resources).
One of Mylyn's key design goals is to integrate seamlessly with Eclipse's existing UI facilities. Another is to require you to install and use only the features you need. Figure 2 shows the UI for selecting the features you want to install. For example, if your role is bug triaging and not development, you can install Mylyn's Task List without installing the Task-Focused UI and independently select the connector for your issue tracker. Software developers will most likely want to install both features.
Figure 2. Selecting Mylyn features and repository connectors
When you select features to install from the update site, choose one or more task repository connectors that you use. Note that, as instructed on the Mylyn Downloads page, you might need to add additional update sites to get the desired connectors. When installing the recommended Task-Focused UI feature, you should also select all of the bridges that you can install into your version of Eclipse. (See Part 2 for details on bridges.) After restarting Eclipse 3.3 or later, you are presented with the welcome screen shown in Figure 3. If you're using Eclipse 3.2, manually open this welcome screen from the Help menu.
Figure 3. Welcome screen
Mylyn provides support for working with two kinds of tasks:
This section shows you how to create and edit local tasks and reviews the features available for working with repository tasks. The availability of the features covered here depends on your connector's level of integration, so you need to refer only to those that are applicable. Regardless of the level of integration, you can use all of Mylyn's task management facilities, which Task management and personal planning discusses.
After installing Mylyn, follow these steps:
The shortcut for creating a local task is the Insert key or you can drag text or a URL from your Web browser into your Task List. The new task's description is automatically populated by the title of the corresponding Web page. (In Firefox, do a regular drag; in Internet Explorer, press Ctrl while dragging.) Double-clicking the task in the Task List opens the task editor (shown in Figure 4), which you can use to create notes, paste in relevant hyperlinks, or schedule the task for a particular date. By default, newly created tasks are scheduled for the date they are created.
Figure 4. Editing a local task
Once you create a dozen or more local tasks, you might want to organize them by creating categories. If you create a task and do not have a category selected in the Task List, the task is placed in the Uncategorized container. You can move a task you've created to another category using the Move to pop-up menu in the Task List or task editor or via drag-and-drop.
To mark local tasks as completed, use either the task's pop-up menu or the task editor. Tasks marked completed are filtered by default but can be unfiltered through the Task List's view menu (opened with the upside-down triangle toward the right of the Task List view's toolbar). To reduce clutter, categories that don't show any tasks (for example, because all tasks in that category are completed) don't appear. Use the Find: box at the top of the Task List to access filtered tasks. Finally, you can set priority and planning information for local tasks through the task editor. Task management and personal planning discusses planning further.
To familiarize yourself with Mylyn's icon scheme, use the Show UI Legend action in the Task List view menu (see Figure 5). I'll refer to the icon scheme throughout this article.
Figure 5. Mylyn UI Legend
Task repositories can vary widely in terms of their capabilities and the metaphors they use for task management. Mylyn's task management facilities provide a unified way of working with a broad range of repositories, including:
You can create a task repository by opening the Task Repositories view (Window > Show View > Mylyn > Task Repositories) or using a perspective that contains it, such as the Team Synchronizing perspective. Once it's open, use the view's toolbar to add a new repository. You can then enter your repository credentials and any other connection details or select one from the available templates. The bugs.eclipse.org repository shown in Figure 6 is created automatically when you install Mylyn to make it easy to report bugs and feature requests for Mylyn and Eclipse.
Figure 6. Adding the Eclipse.org Bugzilla repository
Once you've successfully added a task repository, you can create queries to access tasks on that repository through the New Query action in the Task List's pop-up menu. For example, I might write a query to access all the Bugzilla reports assigned to my e-mail address, as shown in Figure 7:
Figure 7. Creating a new Bugzilla query
After you set the parameters and click Finish, the query container in the Task List is populated with the corresponding tasks. Mylyn retrieves information for the task in the background as the query synchronizes. Once the task information is downloaded, opening the task is instantaneous because it doesn't require a round-trip to the server to retrieve the task's information. To change a query's parameters, you can reopen it (by double-clicking on the query in the Task List) and edit the selected values. While query parameter settings can vary widely across connectors, they tend to reflect the facilities provided by the connector's Web UI. Refer to your connector documentation or the server Web UI documentation for details on creating queries.
By default, queries synchronize automatically every 20 minutes and show any new tasks that match the query parameters. (You can change this schedule via Preferences > Mylyn > Task List.) Mylyn doesn't need to be put into an offline mode when you're disconnected from the Web. However, if you want to turn off synchronization -- for example, when you work offline for extended periods or pay directly for bandwidth used -- you can do so by toggling the Synchronize Automatically setting in the Task List's view menu. You can then synchronize all tasks and queries manually through the button on the toolbar, or each task or query individually from the pop-up menu or the F5 keyboard shortcut. You can also put a task repository into an offline mode if needed from its pop-up menu. This can be useful when you're working for extended periods when the repository is inaccessible.
For connectors that are accessible through a Web browser, Mylyn provides integration with the Web UI that you are already accustomed to and may need to fall back on if some operations are not supported by Mylyn's rich editing facilities. You can right-click any task or query to open it with a Web browser (Eclipse browser settings are in Window > Preferences > General > Web Browser), and all repository tasks with an associated URL can be opened from the Open with Browser action on the Task Editor's toolbar and on the task's pop-up menu. You can also open a Bugzilla query with the browser (for example, if you want to paste it into an e-mail to refine it using the Bugzilla Web UI). You can then create a new query in the Task List from the updated URL by pasting it in when prompted by the New Query wizard.
Searching for tasks is similar to creating queries, but it doesn't store the results in your Task List. Use Ctrl+H or the Search menu (Search > Task Search), select the repository of interest, enter your search criteria, and click Search. The Search view opens, allowing you to open tasks that match your search, as shown in Figure 8. To refine a search, simply open the Search dialog again to restore your previous search criteria. Search results can be turned into a query from the pop-up menu in the Search view.
Figure 8. Task search and results
To create a new repository task, use the corresponding action from the Task List toolbar or the File > New menu, selecting a repository if you have more than one available. After this step, the connector may ask you for additional attributes for the task, such as its Bugzilla component. A new editor then opens to allow you to fill in attributes and a description of the task. Some attributes may be automatically selected for you, such as your operating system if you're using the Bugzilla connector.
Another kind of task you may want to create is a bug report for Mylyn or another Eclipse-based tool that you use. Bug reporting is made easy with the automatic addition of the bugs.eclipse.org repository and an action for automatic bug reporting that you can access from Eclipse's Error Log view and from the Help menu. If you see an error event that you would like to report, right-click it and select Report as Bug. The New Repository Task editor opens and includes all relevant information, such as the stack trace.
Because one-click bug reporting of this sort could potentially lead to numerous duplicate bug filings, Mylyn also provides automated duplicate detection. The Search for Duplicates button uses the automatically inserted or manually pasted stack trace in the report's Description to query the corresponding repository for any potential duplicates. The results of the duplicate detection show up in the Search view, as shown in Figure 9. If a match is found, you can open it and comment instead of creating a new bug report.
Figure 9. Integrated bug reporting and duplicate detection
Upon opening a Bugzilla task, you'll notice both a Bugzilla and a Planning tab on the editor. Repository connectors provide a rich editor, such as this Bugzilla tab, for editing the task information that's shared on the repository. Also, the Planning tab provides the same facilities that you have with local tasks for creating personal notes.
When viewing comments on a bug, you can use the Outline view to navigate between comments, but the automatic folding of unread comments means that most navigation can be done in the Task Editor itself. References to other tasks as well as other structured elements (such as Java stack-trace elements) are hyperlinked (see Figure 10 and Figure 1)). The syntax of hyperlinks is specific to the connector. In general, the same reference that you see in the top left of the task editor can be used to hyperlink the bug. Alternate syntaxes supported by the connector's Web UI may also be supported. The task <key> syntax is always supported.
Figure 10. Repository task editor and content assist
If your connector supports offline editing, Mylyn maintains a cached copy of any task that you open and updates this copy whenever the corresponding query or task is synchronized. If you make any changes, for example by setting an attribute or composing part of a comment, you can save your changes locally by pressing Ctrl+S. This causes the task to get an outgoing indicator on it. When you're ready to submit the task, click Submit at the bottom of the editor.
If a task has been opened previously, opening it again retrieves the offline copy and initiates a background synchronization of the task. This ensures that you needn't wait for the round-trip to the server before you can start reading and working with a task. If a new incoming change is found, or if someone else changes a task while the editor is open, the editor's title bar indicates this and prompts you to refresh the editor.
If someone else changes the task on the repository, for example by adding a new comment, a pop-up window appears at the bottom right-hand of the screen to indicate the change, and the task is shown with an incoming arrow. Mouse over the task to view a tooltip that summarizes the incoming changes. If you open the task, the changes are highlighted and any new comments that have been added are automatically expanded. If both your local copy and the server's copy have changed, you're presented with a red conflict indicator and prompted to resolve the conflict. If you see a conflict, ensure that the task is synchronized via the task editor's Synchronize button and either submit your changes, or discard them through the pop-up menu's Mark > Clear Outgoing.
You can add attachments to repository with the Add... button in the task editor's Attachments section. You can also drag files or text from the workspace or from your window manager to the editor's Attachments section. Adding an attachment invokes a wizard that lets you select whether the attachment should be created from Clipboard contents, from a file on your computer, or from the Eclipse workspace. The Attachments table lets you open attachments with a Web browser or editor and perform specific actions through the context menu, such as saving or copying to the Clipboard.
Now I'll discuss how to make Mylyn your single task list and inbox for managing all the tasks relevant to your workweek. For many developers, the range of tasks to be tracked and scheduled in any given work week includes:
Having all of your tasks integrated in a single view makes them easier to manage because you only need to look in a single place to know what should be done next. To further facilitate task management, Mylyn implicitly embodies commonly recognized task management best practices such as scheduling and deferring tasks, along with the immediacy and adaptability of the XP style of development. Mylyn's task management tools let you adapt to changing demands easily throughout the week without losing track of long-term priorities. In addition to putting control of your workweek in your hands, Mylyn also helps you integrate with team practices by making shared-repository attributes such as milestones and priorities easy to work with, all without leaving Eclipse.
Mylyn provides two kinds of dates for scheduling purposes: scheduled dates and due dates. (You may have noticed both showing up in the task editor.) Scheduled dates are intended to help you manage and prioritize your own workweek, whereas due dates correspond to fixed events such as deadlines.
A task's scheduled date is a soft date intended for personal scheduling that can be easily deferred as priorities change. It defines the time that you plan to start working on the task. Once a task hits its scheduled date, the task turns red to indicate that you should start working on it or consider deferring its start date. A task scheduled for Today turns blue instead of red and is scheduled for the end of your workday so that you don't need to reschedule tasks throughout the workday.
In contrast, a task's due date is a hard date: the date that the task must be completed by. It is often related to external constraints such as deadlines. If you use shared task repositories or calendaring tools, due dates are synchronized so they are visible to other team members. For example, if Bugzilla's time-tracking facilities are enabled, due dates for Bugzilla tasks can be set through the Time Tracking section within the task editor's Attributes section and can be seen and potentially edited by other team members. The presence of a due date is indicated by a small clock overlay on the task icon that is blue before the date and red after.
Given that Mylyn makes it so easy to create and share tasks, it might seem that once you begin using it, your Task List will soon overflow with dozens, or possibly thousands, of tasks. This is exactly what happened to the earliest users of Mylyn, myself included. Perhaps because I was the first user, my current Task List contains well over 5,000 tasks, over 1,000 of which are incomplete. This may seem in conflict with Mylyn's goal to reduce information overload, not contribute to it. To address this, Mylyn provides streamlined facilities for scheduling and deferring tasks, and it uses this information to focus the Task List on showing only the tasks relevant to your workweek. Newly created tasks are scheduled for the day of creation and can quickly be deferred to a later time or date through either the task editor's Planning section or the context menu.
Once a task reaches its scheduled date, the task and its container (for example, a query) turn red, and a pop-up window appears on your desktop as a reminder. (As with other Mylyn color and font settings, you can set your task-highlighting preferences with Window > Preferences > General > Appearance > Colors and Fonts.) The start of the workday, set in Window > Mylyn > Tasks > Scheduling, determines the hour that tasks are scheduled for when deferred to a future date. Changing the end of the workday determines at which hours tasks scheduled for that day become overdue.
Key to Mylyn's task management model is interest-based ranking and filtering, which you can activate through the Focus on Workweek action on the Task List toolbar. Focusing causes only tasks relevant to your workweek to be visible. This includes tasks that are:
As you can see in Figure 11, tasks are colored and sorted to help you quickly identify what to do next:
Figure 11. Scheduling tasks
By letting you easily schedule and defer tasks and by limiting your view to tasks scheduled for a given week, Mylyn helps you maintain an overall sense of priorities. To make your workday explicit, Mylyn highlights all tasks scheduled for the current day in blue. Because you're less likely to see a scrollbar when working in focused mode, the Task List is kept expanded, so you always know what you should consider responding to or doing next.
Consider the flow of an example workweek managed with Mylyn's task-focusing facilities:
Because task scheduling is such a primary part of task management, Mylyn provides the Scheduled presentation in the Task List, which organizes tasks by due date instead of by categories and queries. In focused mode, this presentation shows you all the tasks that you must complete on each day of the week. This can be useful for balancing your workload throughout the week. It also has the benefit of reducing distraction when you're using shared tasks because unscheduled tasks with new comments aren't shown. To check for new incomings, you need to flip back into the Categorized presentation, reprioritize, and then focus on your schedule again. When not in focused mode, you can use the scheduled presentation to balance your task load for future weeks -- for example, to check how many tasks have been deferred by hovering over the Next Week container.
All of the facilities described so far treat your Task List as a unified set of related tasks that you can schedule in flexible ways. Tasks can be grouped with queries and further nested with subtasks if your repository connector supports them (as the Bugzilla connector does; enable the option from the Task List's view menu). But thanks to Mylyn 2.0's support for working sets, you can also work on different sets of completely unrelated tasks. Suppose you work on a product and two different open source projects. You may want to spend most of your workday focused on the primary product but still have the option of checking in on the other projects. Mylyn's working sets let you group queries and categories related to a particular product or project and provide facilities for scoping down the number of files and other resources that you see in the Eclipse workspace.
Using the switcher bar at the top of the Task List, create working sets that include related queries, categories, and workspace resources (see Figure 12). As long as Eclipse views are set to show the Window Working Set (this is the default), switching Mylyn working sets causes both the Task List and Eclipse views to show only the tasks and projects that are part of the working set. For example, if you set up a working set for one of your open source projects and enable it with the drop-down, the Eclipse Task List, Package Explorer, and Problems views show only content related to that project. The Task List Find facility shows only matches within the working set. You can even scope Search (Ctrl+H) to find only things in the Working Set, which can be very useful if you have a large workspace. In other words, your entire Eclipse shows only what's relevant to the working set that you created. Working sets reduce clutter in your workspace and eliminate the need to use multiple workspaces. In Part 2, you'll see how Mylyn takes this idea of focus further by letting you scope what's visible in Eclipse to a single task.
Figure 12. Editing and toggling working sets
In addition to its automated facilities, Mylyn also provides manual sorting and filtering facilities:
Figure 13 shows the available manual Task List filters:
Figure 13. Manual Task List filters
Manual searching and filtering present the usual burden of needing to toggle various filters and sorters repeatedly. They're not recommended for the default mode of operation but can be useful for planning and organizing. Note that when Focus on Workweek is active, your manual filtering and sorting settings are disabled; you can restore them by toggling focus off.
When organizing your Task List, you can move any task either through the Move to Category context menu or by selecting Remove from Category in the context menu. No task disappears from the Task List unless you explicitly delete it through the context menu, even if it disappears from a query or is removed from its category. Removed tasks can be found in the Archive container. The Find bar at the top of the Task List is a convenient way to search for old tasks in the Archive or elsewhere. Clicking the Clear button to its right or pressing the Esc key restores the previously visible tasks. The Archive container can also be useful for seeing previously resolved tasks that have been commented on because a common way to create queries is to exclude resolved tasks (but see Query setup recommendations for some caveats on this practice).
The more you work in a task-focused way, the more valuable your Task List becomes. Automatic backup of the Task List is enabled by default, and you can set the backup directory with Window > Preferences > Mylyn > Tasks. To restore from a backup, select the corresponding radio button and select a backup snapshot. By default, Mylyn snapshots all of your task data daily and keeps 30 days of backups (configure through Preferences > Tasks). You can export tasks by clicking File > Export.
In this first half of my guide to using Mylyn, I've introduced you to Mylyn's task management facilities. I've shown you how these facilities support personalized task management and how they thoroughly integrate Web-based issue trackers like Bugzilla into Eclipse. I've also given you an overview of the typical workweek or workday as managed by Mylyn and shown you how to manage your Task List.
The Task List view provides you with a single place from which to manage all of your work, no matter how many task repositories are in your sphere of interest. It enables you to spend more of the workday in Eclipse, where you are productive, instead of constantly switching out to external browser windows. It also means that you get the benefits of a rich client experience for your Web-based issue tracker, such as drag-and-drop attachments and offline support.
The best part of working with Mylyn is yet to come. Once tasks become an explicit part of your work, Mylyn begins to manage their context for you automatically. The second part of this article introduces you to Mylyn's context management facilities and shows you how they can reduce information overload and make multitasking as easily as a single click. Go to Part 2 now.