Support free tutorials









vogella training Training Books



Task management with Eclipse Mylyn - Tutorial

Lars Vogel

Version 2.5

17.04.2013

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. Using the Github connector
5.1. Github connector
5.2. Github issue integration
6. Coding Mylyn
7. Support this website
7.1. Thank you
7.2. Questions and Discussion
8. Links and Literature
8.1. Mylyn Resources
8.2. vogella Resources

Get the book Eclipse IDE book

1. Task management with Mylyn

1.1. Motivation of Mylyn

Eclipse Mylyn is a software component packaged with the Eclipse IDE. The idea of Mylyn is to integrate tasks into the Eclipse IDE and connect the current state of the Eclipse IDE, e.g. the context with such a task.

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 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 bug tracker 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 book describes the usage of Mylyn for managing local tasks and describes the usage of the Bugzilla bug tracker and Github issue integration.

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 bug tracker. Mylyn supports many bug trackers, 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 supports accessing the Eclipse bug database via its Bugzilla connector.

Tip

Some packaged version of Eclipse have the Eclipse Bugzilla preconfigured. If you open the Task Repositories view via WindowShow ViewOther...MylynTask Repositories menu.

If the Eclipse Bugzilla does not exists here, select Add Task Repository from the view menu and enter the URL to Bugzilla and your credentials similar to the following screenshot.

Eclipse Bugzilla connection in Mylyn

Afterwards 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. Using the Github connector

5.1. Github connector

The Mylyn Github connector allows to integrate Github issues, Pull requests and Gists.

5.2. Github issue integration

To integrate for example the Github issues you can use the Task List view and define a new repository and a new query as described via the following screenshots.

You first need to define the Github repository you want to use.

Creating a Github repository - Part 1

Creating a Github repository - Part 1

Creating a Github repository - Part 1

Afterwards you can directly create a new query.

Creating a Github repository - Part 1

Creating a Github repository - Part 1

6. Coding Mylyn

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

7. Support this website

This tutorial is Open Content under the CC BY-NC-SA 3.0 DE license. Source code in this tutorial is distributed under the Eclipse Public License. See the vogella License page for details on the terms of reuse.

Writing and updating these tutorials is a lot of work. If this free community service was helpful, you can support the cause by giving a tip as well as reporting typos and factual errors.

7.1. Thank you

Please consider a contribution if this article helped you. It will help to maintain our content and our Open Source activities.

7.2. Questions and Discussion

If you find errors in this tutorial, please notify me (see the top of the page). Please note that due to the high volume of feedback I receive, I cannot answer questions to your implementation. Ensure you have read the vogella FAQ as I don't respond to questions already answered there.

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, compile to JavaScript and HTML

Eclipse RCP Tutorial Create native applications in Java

JUnit Tutorial Test your application

Git Tutorial Put all your files in a distributed version control system