Eclipse Mylyn Tutorial en v1.3 20100911
Eclipse Mylyn Tutorial en v1.3 20100911
Oliver Burkhalter
Berne, 11.09.2010
Contents
Contents ...................................................................................................................................................ii
List of figures ........................................................................................................................................... iv
1 Introduction ....................................................................................................................................... 5
2 Setup .................................................................................................................................................. 6
2.1 Requirements .............................................................................................................................. 6
2.2 Installation .................................................................................................................................. 6
2.2.1 Mylyn Update-Url ................................................................................................................. 6
2.2.2 Mylyn Weekly Update-Url .................................................................................................... 6
2.2.3 Atlassian Eclipse Connector .................................................................................................. 7
2.2.4 Subclipse ............................................................................................................................... 8
2.2.5 Subversive ............................................................................................................................. 8
2.3 Tipps and Tricks ......................................................................................................................... 11
2.3.1 Eclipse settings for big workspaces .................................................................................... 11
2.3.2 Problems with installing the Eclipse plugins ....................................................................... 11
3 Step-by-Step Tutorial ....................................................................................................................... 12
3.1 Task-List..................................................................................................................................... 12
3.1.1 Activate task list .................................................................................................................. 12
3.1.2 Create local tasks ................................................................................................................ 13
3.1.3 Repository tasks .................................................................................................................. 16
3.1.4 Activate tasks ...................................................................................................................... 17
3.2 Show, filter, sort and manage tasks .......................................................................................... 18
3.2.1 Create categories ................................................................................................................ 18
3.2.2 Filter tasks ........................................................................................................................... 18
3.2.3 Scheduled task view............................................................................................................ 19
3.2.4 Create task working set ...................................................................................................... 20
3.2.5 Track working time of a task ............................................................................................... 20
3.3 Task repositories ....................................................................................................................... 22
3.3.1 Connect to the Jira repository ............................................................................................ 23
3.3.2 Set the correct time tracking settings for Jira and Mylyn ................................................... 26
3.3.3 Manage repositories ........................................................................................................... 27
3.4 Create task queries ................................................................................................................... 29
3.5 Manage task contexts ............................................................................................................... 30
3.5.1 Configure the task context.................................................................................................. 32
3.5.2 Centralize the task context ................................................................................................. 33
3.5.3 Load a task context ............................................................................................................. 34
3.6 Enter a work log ........................................................................................................................ 35
ii
3.6.1 Set a new time estimation .................................................................................................. 35
3.7 Manage change-sets ................................................................................................................. 36
3.7.1 Subclipse or Subversive?..................................................................................................... 36
3.7.2 Create a change-set ............................................................................................................ 36
3.7.3 Adapt the change-set .......................................................................................................... 38
4 References ........................................................................................................................................ 41
iii
List of figures
Figure 1: Mylyn installation per update site ........................................................................................... 6
Figure 2: Installation Atlassian Eclipse Plugin and Mylyn, Subclipse Integration.................................... 7
Figure 3: Installation Subclipse with Mylyn Integration .......................................................................... 8
Figure 4: Subversive installation.............................................................................................................. 9
Figure 5: Subversive SVN connectors .................................................................................................... 10
Figure 6: Open task list .......................................................................................................................... 12
Figure 7: Choose the task list view from the Show View menu ............................................................ 13
Figure 8: Storage location of your local tasks........................................................................................ 14
Figure 9: Create a local task .................................................................................................................. 15
Figure 10: Input mask for local tasks ..................................................................................................... 16
Figure 11: Activate task ......................................................................................................................... 18
Figure 12: Create categories.................................................................................................................. 18
Figure 13: Filter tasks ............................................................................................................................ 19
Figure 14: Plan tasks with their schedule .............................................................................................. 19
Figure 15: Scheduled view for the tasks................................................................................................ 20
Figure 16: Create task working set ........................................................................................................ 20
Figure 17: Activate time tracking for tasks............................................................................................ 21
Figure 18: Working time of a task is displayed in the „Private“-section ............................................... 22
Figure 19: Add new repository .............................................................................................................. 23
Figure 20: Select the Jira connector ...................................................................................................... 23
Figure 21: Configure your Jira profile .................................................................................................... 24
Figure 22: Configure the Jira repository connection ............................................................................. 25
Figure 23: Time tracking settings for the repository ............................................................................. 26
Figure 24: Open the task repositories view per task list ....................................................................... 27
Figure 25: Open the task repositories view per the „Window“ menu .................................................. 28
Figure 26: The task repositories view.................................................................................................... 28
Figure 27: Create or select a predefined repository query ................................................................... 29
Figure 28: Create new repository query ............................................................................................... 30
Figure 29: Start creating a task context................................................................................................. 31
Figure 30: Activated task context .......................................................................................................... 31
Figure 31: Configure the task context ................................................................................................... 32
Figure 32: Add the task context to the repository task......................................................................... 33
Figure 33: Jira task view in the browser for the added task context .................................................... 33
Figure 34: Load a task context............................................................................................................... 34
Figure 35: Enter a work log ................................................................................................................... 35
Figure 36: The „Date-Time-Icon“ for creating a work log entry ............................................................ 35
Figure 37: Set new time estimation ...................................................................................................... 36
Figure 38: Execute the „Synchronize with repository..:“ command ..................................................... 37
Figure 39: Change-set view ................................................................................................................... 38
Figure 40: Open the change-set view for Subversive ............................................................................ 38
Figure 41: Adapting the change-set ...................................................................................................... 39
Figure 42: Configure a default commit-text in Eclipse with placeholders ............................................ 40
iv
Context-Based Development with Eclipse Mylyn - Tutorial
1 Introduction
This tutorial helps you understanding the main features of Eclipse Mylyn and explains step-by-step
how you can work with Mylyn and the Jira issue tracking system. Further you learn how to manage
change-set with Subclipse/Subversive.
Page | 5
Context-Based Development with Eclipse Mylyn - Tutorial
2 Setup
2.1 Requirements
Java JDK >= 1.5
Eclipse >= 3.4
2.2 Installation
2.2.1 Mylyn Update-Url
Mylyn is normally bundled with the J2EE Eclipse package, which you can download from the Eclipse
webpage. If you have to install Mylyn separately you can find the Update-Url below:
Installation for Eclipse >= 3.4:
http://download.eclipse.org/tools/mylyn/update/e3.4
Installation:
Page | 6
Context-Based Development with Eclipse Mylyn - Tutorial
The Weekly Update-Url for the newest features and bugfixes reads as follows:
http://update.atlassian.com/atlassian-eclipse-plugin/weekly/e3.5/site.xml
Page | 7
Context-Based Development with Eclipse Mylyn - Tutorial
2.2.4 Subclipse
Subclipse is the Eclipse plugin for accessing a Subversion repository out of Eclipse. The plugin offers
also an integration with Mylyn. This allows you to manage the files which belong exactly to one task,
also called a change-set.
For SVN >= 1.6 and Eclipse >= 3.2:
http://subclipse.tigris.org/update_1.6.x
Installation:
2.2.5 Subversive
The Subversive plugin contains the plugin itself and offers you to choose different SVN connectors.
You can decide between the native implementation „JavaHL“ or the plain Java-based implementation
“SVNKit”. The differences between these two connectors can be read here [5]. From my personal
experience I can recommend the SVNKit connector.
The installation is quite easy because the Subversive package is already integrated in the new Eclipse
Helios plugin packages. In the software installation dialog just select the update site “„Helios -
http://download.eclipse.org/releases/helios“, navigate to “Collaboration” and choose the Subversive
components.
Page | 8
Context-Based Development with Eclipse Mylyn - Tutorial
After the installation and the Eclipse restart, you will be asked to choose your SVN connector, choose
the newest version of SVNKit:
Page | 9
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 10
Context-Based Development with Eclipse Mylyn - Tutorial
-vmargs
-Xms512m
-Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=256M
-XX:MaxPermSize=512M
Page | 11
Context-Based Development with Eclipse Mylyn - Tutorial
3 Step-by-Step Tutorial
3.1 Task-List
The task list is the “heart” of Mylyn and lets you manage your local and remote tasks from the task
repositories.
3.1.1 Activate task list
You can activate your task list in the “Window” menu:
If you don’t find the “Task list” entry under “Show View”, then select “Other…” and search for the
task list:
Page | 12
Context-Based Development with Eclipse Mylyn - Tutorial
Figure 7: Choose the task list view from the Show View menu
Page | 13
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 14
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 15
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 16
Context-Based Development with Eclipse Mylyn - Tutorial
How you can load your Jira tasks into Eclipse is described here “3.4 Create task queries”.
Page | 17
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 18
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 19
Context-Based Development with Eclipse Mylyn - Tutorial
If your tasks are managed through this scheduling you can then choose also the “Scheduled” task list
view which offers you a nice task list view by time:
It is also possible then to only show these tasks which are important for the current week. This is
called “Focus on workweek”. That’s quite helpful if you have a lot of tasks in your list.
Page | 20
Context-Based Development with Eclipse Mylyn - Tutorial
After this setting the working time of a task is tracked automatically. As soon as you activate a task
the working time is tracked and will be stored for this task. This can be very useful for your time
management and time reporting. If you are entering a work log in Jira, you can also use this feature
for filling out automatically your worked time on a task.
Page | 21
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 22
Context-Based Development with Eclipse Mylyn - Tutorial
Afterwards you have to enter the correct connection settings for the repository. Further you can set
several other repository connection settings. An important setting is the format of the date. This
setting has to be the same as you have configured in your Jira profile.
Page | 23
Context-Based Development with Eclipse Mylyn - Tutorial
Take care of changing your locale. If you change your locale in Mylyn, for example to
“Deutsch(Schweiz)” then you have to change this on your Jira profile too!
Page | 24
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 25
Context-Based Development with Eclipse Mylyn - Tutorial
3.3.2 Set the correct time tracking settings for Jira and Mylyn
Depending on the configurations on your Jira system it is necessary to set the correct value for the
time tracking “working days per week” and “working hours per day”. This is necessary because of the
time estimations which can be defined in the tasks. If you don’t have the correct value set, there can
be wrong time estimations on the tasks:
You can save the settings by clicking on the “Finish” button. You are then asked to create a task
query for the currently configured repository, just answer with “yes” and follow the chapter “3.4
Create task queries”.
Page | 26
Context-Based Development with Eclipse Mylyn - Tutorial
Figure 24: Open the task repositories view per task list
Page | 27
Context-Based Development with Eclipse Mylyn - Tutorial
Figure 25: Open the task repositories view per the „Window“ menu
Page | 28
Context-Based Development with Eclipse Mylyn - Tutorial
Within this dialog you have the possibility to choose one of the predefined queries below or you can
configure your own task query. To create a custom task query just click on the “Next” button:
Page | 29
Context-Based Development with Eclipse Mylyn - Tutorial
Depending on the repository you can set several settings. To finish your query just click “Finish”.
Mylyn will then load all the tasks which are fulfilling your conditions. The loading time of the tasks
into your Eclipse depends on the size of your task query. If your query matches a lot of tasks then the
loading time takes some minutes.
Page | 30
Context-Based Development with Eclipse Mylyn - Tutorial
If you start a task for the first time you will see an empty view with a text “Empty task context,
unfocus or Alt+click“.
This means that you have opened the task for the first time and there are no files in the task-context
yet. If you now want to open/edit a file just press and click “Alt+Click” and then you see your files in
the view. Just navigate to your file by clicking on the file itself. It is not necessary to click on the „+“ -
sign to expand a folder. Of course you can open files by using the Eclipse default open dialogs. Mylyn
also recognize such operations and adds the file to the task-context.
You will remark that uninteresting files have the font color light grey and the relevant files have black
color. Just continue your navigation to other files, open them, edit them, etc. Mylyn will build up the
task-context step by step with the new files automatically.
If you want to remove a file from the task-context you have to select the file and press
„Ctrl+Alt+Shift+Down“. As alternative you can also remove the file by right-clicking on the file and
select “Remove from context”.
Page | 31
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 32
Context-Based Development with Eclipse Mylyn - Tutorial
During attaching a context to a task you can enter a comment and then submit it. In Jira you can see
then the uploaded task-context as zip file attachment:
Figure 33: Jira task view in the browser for the added task context
If you attach later on again a task-context with the same task, then Mylyn creates a new file
attachment. So you have an indirect versioning of your task-contexts. Of course you can delete then
old task-contexts which aren’t useable anymore.
Page | 33
Context-Based Development with Eclipse Mylyn - Tutorial
Alternatively you can also right-click directly in the task list on the corresponding task and select
“Retrieve context”.
Page | 34
Context-Based Development with Eclipse Mylyn - Tutorial
You can enter the work log like you do it on the Jira webpage. Just fill out your time spent and give a
description.
If you have activated the automatically time tracking in Eclipse (see chapter „3.2.5 Track working
time of a task “), then you can simply click on the “time-date-icon” and Mylyn fills out for you your
time spent field. Of course you still have the possibility to change this time.
Page | 35
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 36
Context-Based Development with Eclipse Mylyn - Tutorial
Normally in the Synchronize view we just see all changed files in a list. If we want to see the changes
sorted by tasks we can switch to the change-set view in the „Synchronize-View” by clicking on this
icon:
Page | 37
Context-Based Development with Eclipse Mylyn - Tutorial
The change-set view give us an overview over all tasks and their changed files.
During the commit process the commit-text is taken automatically from the task title itself, which is
also a quite comfortable feature.
For Subversive you can switch to the change-set view as follow:
Page | 38
Context-Based Development with Eclipse Mylyn - Tutorial
The commit-text template can also be configured globally in Eclipse, open this settings page:
Page | 39
Context-Based Development with Eclipse Mylyn - Tutorial
Page | 40
Context-Based Development with Eclipse Mylyn - Tutorial
4 References
[1] Atlassian.com, Installing the Eclipse Connector - Atlassian IDE Connectors - Atlassian
Documentation - Confluence. Available at:
http://confluence.atlassian.com/display/IDEPLUGIN/Installing+the+Eclipse+Connector
[Zugegriffen März 10, 2010].
[2] Eclipse.org, Mylyn Downloads. Available at: http://www.eclipse.org/mylyn/downloads/
[Zugegriffen März 10, 2010].
[3] Kersten, M., Elves, R. & Pingel, S., Effective Mylyn - Tutorial. Available at:
http://tasktop.com/docs/tutorials/2009-03-mylyn-tutorial.pdf.
[4] tigris.org, subclipse: Download and Install. Available at:
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA [Zugegriffen März 10, 2010].
[5] Polarion® : Subversive - Subversion Team Provider for Eclipse - Downloads. Available at:
http://www.polarion.com/products/svn/subversive/download.php?utm_source=eclipse.org&ut
m_medium=link&utm_campaign=subversive [Zugegriffen Juli 30, 2010].
Page | 41