Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » FocusListener vs IPartListener
FocusListener vs IPartListener [message #549882] Wed, 28 July 2010 10:45 Go to next message
Missing name Mising name is currently offline Missing name Mising name
Messages: 100
Registered: March 2010
Senior Member
Hello

I am making a plug-in for eclipse.

There is a command that need to know the editor active and which has the focus and if the focus change to other editor or other part of workbench.

I have seen the interface FocusListener, but I don't know as to add its to a editor.

I have seen the IPartListener too. Which interface must I use, IPartListener or FocusListener?

Thanks a lot
Jose
Re: FocusListener vs IPartListener [message #549902 is a reply to message #549882] Wed, 28 July 2010 12:23 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Focus listener is about SWT focus. But since you care about editors,
you want IPartListener2. That will tell you which part is active, and
when a new part becomes active.

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/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: FocusListener vs IPartListener [message #549941 is a reply to message #549902] Wed, 28 July 2010 14:11 Go to previous message
Missing name Mising name is currently offline Missing name Mising name
Messages: 100
Registered: March 2010
Senior Member

is FocusListener invalid for workbench eclipse??

Thanks you, I'm going to use the IPartListener2
Previous Topic:[databinding] ComboViewer with empty/null entry
Next Topic:[SOLVED] Expandable Text widget
Goto Forum:
  


Current Time: Wed Sep 03 02:18:11 GMT 2014

Powered by FUDForum. Page generated in 0.03676 seconds