Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » API to access Task Categories / Queries?
API to access Task Categories / Queries? [message #749764] Tue, 25 October 2011 08:25 Go to next message
Stefan Winkler is currently offline Stefan Winkler
Messages: 277
Registered: July 2009
Location: Germany
Senior Member
Hi,

I have a Mylyn development question:
I have a requirement, which can be described as:
When <something> is done, present the user a dialog in which he can enter a comment.
For convenience, if a task is active in Mylyn, use the task summary as a default for the comment field.
If no task is active, still give the user the chance to select a task: present a list of known tasks, from which
he can select a task to fill the comment conveniently.

I have started to dig around, which information I can get from Mylyn.
I have managed to get the active task by calling TasksUi.getTaskActivityManager().getActiveTask() and I was able to subscribe to task activation events using the same class.
However, I haven't found any way to get all tasks from mylyn (well, Mylyn does not know about all the tasks in the repo, but I would at least want to know the tasks Mylyn knows about.
I thought, maybe there would be an API to query all ITaskContainers (or more specifically the TasksUiPlugin.getTaskList().getRootElements()), but all of the relevant methods I find are internal.
Is there any other way, I can fulfill the requirement mentioned above?

BTW, I started to dig around in the source code in order to find the API.
Is there a more "official" API documentation available somewhere?

Thanks in advance!

Cheers,
Stefan
Re: API to access Task Categories / Queries? [message #752551 is a reply to message #749764] Wed, 26 October 2011 08:36 Go to previous message
Steffen Pingel is currently offline Steffen Pingel
Messages: 706
Registered: July 2009
Senior Member
Hi Stefan,

it's usually best to ask development related questions on mylyn-integrators
(or mylyn-dev). Your observation, that there is no public API for the task
list at the moment, is correct.

Please vote for this bug and feel free to add your usecase if you are
interested in that enhancement:

239994: [api] provide access to task list
https://bugs.eclipse.org/bugs/show_bug.cgi?id=239994

For now you are best of using internals. We will announce on the bug in case
significant changes are made to the data model.

Steffen


Stefan Winkler wrote:

> Hi,
>
> I have a Mylyn development question:
> I have a requirement, which can be described as:
> When <something> is done, present the user a dialog in which he can enter
> a comment. For convenience, if a task is active in Mylyn, use the task
> summary as a default for the comment field. If no task is active, still
> give the user the chance to select a task: present a list of known tasks,
> from which he can select a task to fill the comment conveniently.
>
> I have started to dig around, which information I can get from Mylyn.
> I have managed to get the active task by calling
> TasksUi.getTaskActivityManager().getActiveTask() and I was able to
> subscribe to task activation events using the same class. However, I
> haven't found any way to get all tasks from mylyn (well, Mylyn does not
> know about all the tasks in the repo, but I would at least want to know
> the tasks Mylyn knows about. I thought, maybe there would be an API to
> query all ITaskContainers (or more specifically the
> TasksUiPlugin.getTaskList().getRootElements()), but all of the relevant
> methods I find are internal. Is there any other way, I can fulfill the
> requirement mentioned above?
>
> BTW, I started to dig around in the source code in order to find the API.
> Is there a more "official" API documentation available somewhere?
>
> Thanks in advance!
>
> Cheers,
> Stefan

--
Steffen Pingel
Committer, http://eclipse.org/mylyn
Senior Developer, http://tasktop.com
Previous Topic:Breakpoints not stored in a task context
Next Topic:Missing dependency on snapshot site
Goto Forum:
  


Current Time: Sat Aug 30 08:31:02 EDT 2014

Powered by FUDForum. Page generated in 0.01579 seconds