En-/disabling action based on active editor [message #448269] |
Thu, 20 April 2006 01:23 |
Eclipse User |
|
|
|
Originally posted by: Alexander.Kriegisch.web.de
I want an action to be enabled when the current editor's widget is a
StyledText (e.g. Java source code editor). Thus, neither 'selection' nor
'enablement' are appropriate points in plugin.xml to achieve that
behaviour. I found some code on the web which registers an
IPropertyChangeListener implementation to the item on which the enablement
depends. As I don't know a certain item which I could watch (open editors
change all the time) and which is also compatible with
IPropertyChangeListener, I am a bit clueless at the moment and would
appreciate ideas of more experienced Eclipse adepts. I don't know the
component model of the Eclipse platform very well, I am afraid.
|
|
|
Powered by
FUDForum. Page generated in 0.07994 seconds