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
[email protected]


From: [email protected] 
[mailto:[email protected]] 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
On Thu, Apr 9, 2009 at 10:31 PM, Steffen Pingel 
<[email protected]<mailto:[email protected]>> wrote:
Can you specify in more detail what you mean by task-items?

Steffen

On Thu, Apr 9, 2009 at 3:32 AM, pankaj chaitram turkar 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

How do I get all the open Task-Items in task editor??

Thanks,
Pankaj Turkar
_______________________________________________
mylyn-integrators mailing list
[email protected]<mailto:[email protected]>
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators



--
Steffen Pingel
Committer, http://eclipse.org/mylyn
Senior Developer, http://tasktop.com

_______________________________________________
mylyn-integrators mailing list
[email protected]<mailto:[email protected]>
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
_______________________________________________
mylyn-integrators mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators

Reply via email to