Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Knowing if an editor is visible
Knowing if an editor is visible [message #334780] Fri, 27 February 2009 05:49 Go to next message
Eclipse UserFriend
Hello,

How can I know, from all the opened editors, which one are visible to
the user? I mean visible as "we see the tab and the content" of the
editor. Most of the time there is only one editor visible, sometimes
more if you split your window into several editors.

I tried to iterate on each editor with:
getSite ().getPage ().getEditorReferences ()

and then we can get the IWorkbenchPart with editor.getEditorSite
().getPart ()

but can't find a way to know if it is visible or not.


I also tried to register a PartListener on the Page but can't we just
add a part listener only on the editor self?
Re: Knowing if an editor is visible [message #334790 is a reply to message #334780] Fri, 27 February 2009 09:33 Go to previous message
Eclipse UserFriend
You would have to get the IEditorParts (make sure you don't deliberately
instantiate them), and then you can use
org.eclipse.ui.IWorkbenchPage.isPartVisible(IWorkbenchPart)

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
Previous Topic:Ganymede Update - why does it not work? What is the point?
Next Topic:Debug: mouseover to look at value
Goto Forum:
  


Current Time: Tue Mar 25 03:05:32 EDT 2025

Powered by FUDForum. Page generated in 0.02229 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top