Back to top

vogella training Training Books

Eclipse Mylyn - Tutorial

Lars Vogel

Version 2.3

17.04.2013

Revision History
Revision 0.1 18.09.2008 Lars
Vogel
Created
Revision 0.2 - 2.4 21.07.2009 - 17.04.2013 Lars
Vogel
bug fixes and enhancements

Using Eclipse Mylyn for task management

This tutorial describes the usage of Mylyn for Eclipse.


Table of Contents

1. Task management with Mylyn
1.1. Motivation of Mylyn
1.2. Task tracker integration
1.3. Scope of this description
2. Installation
3. Tutorial: Using Mylyn
3.1. Task List view
3.2. Create new tasks
3.3. Activate a task
3.4. Create task from Problems view
3.5. Export and import your tasks
4. Using Mylyn to integrate with Bugzilla
4.1. Mylyn and tracker integration
4.2. Eclipse Bugzilla
5. Coding Mylyn
6. Thank you
7. Questions and Discussion
8. Links and Literature
8.1. Mylyn Resources
8.2. vogella Resources
This tutorial is part of this book:

Eclipse IDE book

1. Task management with Mylyn

1.1. Motivation of Mylyn

Software developers perform a variety of activities. They write source code for new functionality, fix bugs, write documentation, answer questions, attend meetings and much more.

Developing software in the Eclipse IDE involves writing new classes or methods and modifying existing code.

For example the procedure of fixing a bug may involve writing unit tests, refactoring existing code, reading and searching involved code and finally fixing the affected code. If the activity of the developer during this task is interrupted or if the developer has to work on another task, e.g. an urgent bug, he loses the context he built while working on the previous task , i.e. all the involved classes which he has opened in the Eclipse IDE.

Eclipse Mylyn is a software component packaged with the Eclipse IDE. The idea of Mylyn is to preserve the current state of the Eclipse IDE, e.g. the context, in a task.

Eclipse Mylyn allows the developer to record his activities in such a task while he is working on it. Each task has a context which captures the involved classes, methods and the cursor position in the opened Java or text editor.

When switching between tasks, the corresponding context is restored and the editors which belong to this tasks are opened and the others are closed.

Mylyn can also filter information in the IDE. For example, the Package Explorer view can be set to show only the files relevant for the current task.

This functionality sounds simple but helps finding the right information much faster during a task switch of the developer.

1.2. Task tracker integration

It is also possible to integrate Mylyn with bug tracking solutions. For example you can integrate Mylyn with the Bugzilla bugtracker system or with the issue system of the Github website.

In this case, tasks and the content of these tasks can be shared among developers. This is even more powerful but will not be described here, as there are lots of different bug tracking systems and the integration to them is rapidly changing.

1.3. Scope of this description

This tutorial describes the usage of Mylyn for managing local tasks and describes the usage of the Bugzilla bugtracker integration for Eclipse.org.

There are a huge variety of available issue trackers it is beyond the scope of this book to cover all of them. Information about the integration with the different trackers can be found on the Mylyn homepage.

http://www.eclipse.org/mylyn/ 

2. Installation

Most Eclipse downloads contain Mylyn already. If you need to install it you can use the update manager via HelpInstall new Software... and install Mylyn from the update site or your release. The following screenshot shows this for the Kepler release.

Installing Mylyn

3. Tutorial: Using Mylyn

3.1. Task List view

The Task List view is part of the standard Java perspective.

In case you closed the view, you can re-open it via WindowShow ViewMylynTask List.

Task List View

3.2. Create new tasks

To create a new task press the New Task button or right-click in the Task List view and select NewTask.

Selecting local repository

Select the Local repository, as depicted in the following screenshot.

Selecting local repository

3.3. Activate a task

To start working on a task, select the Activate task button. If the task has already captured a context, Mylyn filters the visible elements in the Package Explorer view.

Activate Tasks in the Package Explorer

You can remove the filter in the Package Explorer view by clicking the Focus on Active Task button in the toolbar of this view. Afterwards all files are displayed.

If you open a file while having an activated task, this file is added to the context of the task.

Focus on active tasks

Once you have identified all necessary elements, you can focus again on the task to filter out the unnecessary elements.

If you have to switch to another task you simply can activate it. The context of the task will be restored.

3.4. Create task from Problems view

You can create a new Mylyn task from the Problems view, by right-clicking on a problem and selecting New Task from Marker... from the context menu.

Problems View

3.5. Export and import your tasks

Mylyn allows you to export and import your local tasks. Select your categories or tasks in the Task List view, right-click on them and select Export and Import from the context menu.

Export Mylyn tasks

4. Using Mylyn to integrate with Bugzilla

4.1. Mylyn and tracker integration

Mylyn allows to connect to bug tracking software and in most cases to share the task context with others via the bugtracker. Mylyn supports many bugtrackers, e.g. Github, Jira or Bugzilla.

The following description explains how you can use Mylyn to work on bugs and feature requests which are tracked in the Eclipse Bugzilla installation.

4.2. Eclipse Bugzilla

All known Eclipse bugs and feature requests are stored in the Eclipse Bugzilla database which can be found under the following link.

https://bugs.eclipse.org/bugs/

Mylyn has build in support for the Eclipse bug database. Just right click in the Task List view and select NewQuery.

Creating a bugzilla query in Mylyn - Part 1

Select the Eclipse entry and press the Next button.

Creating a bugzilla query in Mylyn - Part 2

Select the Create query entry and Create query using form.

Creating a bugzilla query in Mylyn - Part 3

If for example you want to see all open bugs in Platform - UI then you could enter a query as depicted in the following screenshot.

Creating a bugzilla query in Mylyn - Part 4

If you now activate a task, you can use Mylyn to work on Eclipse bugs.

Creating a bugzilla query in Mylyn - Part 3

5. Coding Mylyn

This blog entry describes how to add files to the Mylyn context via code Modifying Mylyn Context

6. Thank you

Please help me to support this article:

Flattr this

7. Questions and Discussion

Before posting questions, please see the vogella FAQ. If you have questions or find an error in this article please use the www.vogella.com Google Group. I have created a short list how to create good questions which might also help you.

8. Links and Literature

8.1. Mylyn Resources

www.eclipse.org/mylyn/ Mylyn Homepage

8.2. vogella Resources

vogella Training Android and Eclipse Training from the vogella team

Android Tutorial Introduction to Android Programming

GWT Tutorial Program in Java and compile to JavaScript and HTML

Eclipse RCP Tutorial Create native applications in Java

JUnit Tutorial Test your application

Git Tutorial Put everything you have under distributed version control system