There may be a more direct way of doing it from Mylyn, but
here's how you can get the list of open editors:
IWorkbench workbench = Yourplugin.getDefault().getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
IEditorReference[] references = page.getEditors();
for (IEditorReference reference : references) {
TaskEditorInput input = (TaskEditorInput)
reference.getEditorInput();
ITask task = input.getTask();
// Then you can do something with
the task.
}
(I haven't run this code, but I bet it works fine.)
Larry Edelstein
Senior Member of Technical Staff
salesforce.com
ledelstein@xxxxxxxxxxxxxx
From: mylyn-integrators-bounces@xxxxxxxxxxx
[mailto:mylyn-integrators-bounces@xxxxxxxxxxx] On Behalf Of pankaj
chaitram turkar
Sent: Sunday, April 12, 2009 9:21 PM
To: Mylyn Integrators list
Subject: Re: [mylyn-integrators] how do i get all open tasks in Task Editor???
While closing eclipse IDE there
might be some Assignments that are open in Task Editor view in IDE. So i just
wanted the list of all the Assignments that are currently open. I have attached
screen shot of the view. In this screen shot currently open assignments are
Assignment 3 and Assignment 1. I just want those two assignments.
Thanks,
Pankaj