Community
Participate
Working Groups
As already described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=406651, Copy&Paste does not work in any dialog if you have registered a custom CopyHandler. Example: you have a copyHandler that is enabled for a specific type of selections (e.g. adaptable to IProject). You select a project (e.g. in package explorer) -> the copy handler is activated. Then you open a dialog and select any text. Try to copy/pase (using ctrl+c / ctrl+v). This will not work because the custom copy handler (of the project) is still active! There is a minimal example in https://bugs.eclipse.org/bugs/show_bug.cgi?id=406651. The bug exists at least since eclipse 4.2 and seems to occure only on windows.
Is anyone responsible for this bug?
This bug still persists in current 2019 releases.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
In our case it helped to override isHandled in our Handler @Override public boolean isHandled() { Display display = Display.getCurrent(); [...] return display != null && display.getFocusControl() instanceof Tree; } works till we use a Tree in a dialog...
It seems HandlerActivations are not in the same order as in E3: in E4, the custom handler will be registered AFTER the default handler such that when a key binding is executed, it will pick up the custom handler. Code location to analyze: org.eclipse.ui.internal.handlers.LegacyHandlerService.HandlerSelectionFunction
Registeration of handlers: org.eclipse.ui.internal.handlers.LegacyHandlerService.readHandlers() Anyone aware of the order of configuration elements having impact on handler activation?
alternative hypothesis: the selection service returns a valid selection when a dialog is open but should not return the selection from the workbench window (induced because of hierarchical IEclipseContext) without a valid selection, the custom copy handler would not be active/handled and key binding would fallback to the default WidgetMethodHandler
Erdal, please recreate issue at GitHub/Eclipse-Platform in the UI repo
https://github.com/eclipse-platform/eclipse.platform/issues/266