Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] How to get TaskData?

Hi Avin,

Have a look at TaskEditorPlanningPart to get an idea for how these fields are accessed and manipulated. Some of these fields are internal so you may need to break some 'rules' to manipulate them. In these cases, look for an existing api bug or create a new one, to address your specific needs.

-Rob

Avin Ismail wrote:
Thank you for the clarification Rob. TasksUi.getTaskData.getTaskDataManager().getTaskData(taskRepository, taskId) actually works fine for me.

Do you allso happen to know where the taskEditorn gets its data from (ex. scheduled for, due, estimated hours...ect)?

/Avin
________________________________________
From: mylyn-integrators-bounces@xxxxxxxxxxx [mylyn-integrators-bounces@xxxxxxxxxxx] On Behalf Of Robert Elves [rob.elves@xxxxxxxxxxx]
Sent: Sunday, July 27, 2008 6:58 PM
To: Mylyn Integrators list
Subject: Re: [mylyn-integrators] How to get TaskData?

Yes, this is a problem. Although the TaskDataManager lies in the
tasks.core package, it is initialized and its instance held by the
tasks.ui.TasksUiPlugin.  Same goes for the tasklist itself. If you could
create a new bug report and prefix the summary with "[api]" we can
discuss options there. In the mean time you'll need to add a dependency
on tasks.ui to get access to these facilities.

-Rob


Beyhan Veliev wrote:
Hi Robert,

TasksUi.getTaskData.getTaskDataManager().getTaskData(taskRepository,
taskId)
It works fine but I have a "core" and a "ui" plugin. I want to
separate the "ui" and the "core" functionality. My
"RepositoryConnector" is in my "core" plugin which depends only on
"org.eclipse.mylyn.tasks.core". I don't want to have dependency on
"org.eclipse.mylyn.tasks.ui" in my "core" plugin but in the APIs of
"org.eclipse.mylyn.tasks.core" I haven't found the functionality to
get a task or taskdata of its id.

Best regards and thank you
Beyhan

Robert Elves wrote:
Hi Beyhan,

Given a taskRepository and taskId, you can get the associated
TaskData via:

 TasksUi.getTaskData.getTaskDataManager().getTaskData(taskRepository,
taskId)

-Rob


Beyhan Veliev wrote:
Hello,

I am writing a new connector for Mylyn 3.0 and Eclipse 3.4 and I
have the same challenge in getTaskData(repository, taskid,
iprogressMonitor). I need to find the existing task or its taskdata
for the passed taskid and I should use only the APIs of
"org.eclipse.mylyn.tasks.core".  I haven't found a way to do this.
Is it possible?
@Ismail: How can you retrieve the task with the specified taskid?

Thank you in advance
Beyhan

Avin Ismail wrote:
Hello,

How can I extract the TaskData of a specific task? I am trying to
implement getTaskData(repository, taskId, iprogressMonitor) that
has to
return a TaskData. Now I can retrieve the task with the specified
taskId,
but how can I get the TaskData of that task?

FYI:
in PerformQuery(), I followed the example on
http://wiki.eclipse.org/Mylyn/Porting_Guide/3.0 and created the
task as
follows:

TaskData data = createTaskData(repository, id);
TaskMapper mapper = new TaskMapper(data, true);
mapper.setTaskUrl(taskPrefix + id);
mapper.setSummary(description);
mapper.setCreationDate(creationDate);
mapper.setDueDate(dueDate);
resultCollector.accept(data);

Thank you in advance
Avin

_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators


_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators

_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators



--
Robert Elves
Mylyn Committer, http://eclipse.org/mylyn

_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators



--
Robert Elves
Mylyn Committer, http://eclipse.org/mylyn



Back to the top