In short you probably have to do the following steps (same for any mylyn
connector):
- check for the required connector
- lookup or create a MyLyn repository (see
TasksUi.getRepositoryManager() for both)
- create new TaskData (best see TasksUiInternal#createTaskData)
- create an ITask from the data (see TasksUiUtil.createOutgoingNewTask(...))
- submit the task using SubmitTaskJob (see
TasksUiPlugin.getTaskJobFactory().createSubmitTaskJob(...)
However, that's just the basic flow. I remember that we had to add a lot
of extra code that is also done by mylyn internally.
But it should help you to get stated. if you get stuck, just check how
MyLyn is doing it by intercepting at certain point in time e.g. after
Submit button was pressed in the editor).
One hint: some task repositories - and I think Jira is one of them -
require a "project" attribute to be set when creating the task. That is
typically handled when creating the task via the UI, so the Jira
specific MyLyn stuff but when you do it via plain MyLyn API, its more
difficult and you have to do it yourself. You of course may use the Jira
mylyn connector which probably reveals more functions then generic MyLyn
API.
Greetings Jan
Hi Jan,
thanks for aswer. To be more accurate, I don't need it to be connector
independent. I just need to be able to connect to both Jira and
Bugzilla. So, editing the question, is there a way to
praogrammatically connect my plugin to Jira and a way to p. connect to
Bugzilla?
Mario
Mario,
we started with a similar objective quite a while ago with MyLyn
3.6 and managed it only by using unofficial API and by partially
copying and changing code like the SubmitTaskJob. Our biggest
problem was to do it connector independent. Not sure whether it
can be done more elegant using newer versions of mylyn.
Still interested in any results of your discussion ;-)
Jan
Hi,
I've been working for some time on a plugin, trying to
programmatically create issues from errors given by other
plugins (this part is solved) and send them to systems like
Jira or Bugzilla. Unfortunately I'm not able to find any way
to do this. So, here is my question. Is there a "correct" way
to programmatically create issues (using Mylyn API), send them
to Jira or Bugzilla?
Many thanks for any hint or advice,
Mario
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@eclipse.org <mailto:mylyn-integrators@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
--
jan mauersberger
senior architect / ikv++ technologies ag
dessauer strasse 28/29; 10963 Berlin
e|mauersber...@ikv.de <mailto:mauersber...@ikv.de> w|www.ikv.de
<http://www.ikv.de>
p|+49 (30) 3480 7711 f|+49 (30) 3480 780
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@eclipse.org
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@eclipse.org
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
--
jan mauersberger
senior architect / ikv++ technologies ag
dessauer strasse 28/29; 10963 Berlin
e|mauersber...@ikv.de w|www.ikv.de
p|+49 (30) 3480 7711 f|+49 (30) 3480 780
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@eclipse.org
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators