[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mylyn-integrators] Adding content to a new task before it opens
|
Thanks Shawn.
That will work for my current need, however I was aiming for something
that made better reuse of the existing Mylyn code.
My thought was to extend the NewTaskAction and use it's run method since
it looks to handle the cases of new local task vs. new repository task
so nicely (admittedly I haven't explored new repository tasks yet, so
maybe this won't really work in the end).
This is what motivated my question about being able to catch an "a new
task editor is about to open" event so that I could squeeze in there and
add some content. Is this possible?
If not, I can use the existing the code from NewTaskAction as a model
and create separate actions for the two cases or mimic what is done there.
John Anvik
Shawn Minto wrote:
Hey John,
With my testing, this works to set the notes:
AbstractTask task =
TasksUiPlugin.getTaskListManager().createNewLocalTask(title);
if (task != null){
task.setNotes("this is a test");
TasksUiUtil.openEditor(task, true);
}
Hope this helps
Shawn
On 10/25/07, John Anvik <janvik@xxxxxxxxxx> wrote:
I would like to add some information to a new task before it opens.
I tried catching the open event using a PartListener, but of course that
didn't work (at least the text that I inserted using
AbstractTask.setNotes() didn't work).
How do I catch the creation of a task editor event so that I can
add some information to a new task before the editor opens?
Pointers to code or tutorials also accepted. :)
John Anvik
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators