Version 2.3
Copyright © 2008, 2009, 2010, 2011, 2012, 2013 Lars Vogel
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 |
Table of Contents
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.
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.
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/
Most Eclipse downloads contain Mylyn already. If you need to install it you can use the update manager via → and install Mylyn from the update site or your release. The following screenshot shows this for the Kepler release.

The Task List view is part of the standard Java perspective.
In case you closed the view, you can re-open it via → → → .

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

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

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

You can remove the filter in the Package Explorer view by clicking the 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.

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.
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.
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 → .

Select the Eclipse entry and press the Next button.

Select the Create query entry and Create query using form.

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.

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

This blog entry describes how to add files to the Mylyn context via code Modifying Mylyn Context
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.
www.eclipse.org/mylyn/ Mylyn Homepage
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