[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: List Open Files

On 2/13/2009 6:05 AM, Stuart Harper wrote:
Is there an Eclipse platform API to list the currently open files in the
editor?

Ideally I'd like to be able to get all the open files of a particular
type (e.g. all open XML files) but I can only see a way to get the
currently active editor and which editor is associated with which file.

Here is one way that works with no context: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()

It could be shorter if you have enough context to get the IWorkbenchWindow or IWorkbenchPage directly.

Hope this helps,
Eric