Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ActionHandler behavior change in Eclipse 4?
ActionHandler behavior change in Eclipse 4? [message #1044843] Fri, 19 April 2013 08:05
Philipp Bouillon is currently offline Philipp Bouillon
Messages: 16
Registered: July 2009
Junior Member
Hi,

in a plug-in developed in Eclipse 3.7, I used the following handler:

      <handler commandId="org.eclipse.ui.edit.copy">
         <class class="myplugin.MyCopyHandler"/>
         <activeWhen>
            <with variable="selection">
               <iterate ifEmpty="false">                     
                  <adapt type="myplugin.model.MyElement"/>
               </iterate>
            </with>
         </activeWhen>
      </handler>


which is called, whenever I select a "MyElement" object in an explorer tree. In Eclipse 3.7, when I am typing in an Edit field in a dialog, selecting this text and copying the text (via CTRL+C), I can afterwards paste the text and -- not surprisingly -- the "MyCopyHandler" is not involved.

Using Eclipse 4.2 and Windows 7, however, if I am editing a text in a text field (SWT Text), selecting it and copy it using CTRL+C, MyCopyHandler is involved, AND the element in the selection is indeed the currently selected MyElement -- but the keyboard focus is on the text field in a dialog...
Also note that when I do not register my handler, copying in the edit field works as it should, but as soon as my handler is registered, simply nothing is pasted anymore (obviously because of my paste handler; but it should not be involved in the first place).

Am I missing a change here? Or is this a bug? Or do I need to implement the handler differently?

Thanks!
Philipp

[Updated on: Fri, 19 April 2013 08:11]

Report message to a moderator

Previous Topic:IStatusLineManger
Next Topic:display the PreferencePage
Goto Forum:
  


Current Time: Fri Aug 22 21:43:43 EDT 2014

Powered by FUDForum. Page generated in 0.02147 seconds