|
|
Re: CTRL+Z undo redo problem [message #1863604 is a reply to message #1863596] |
Thu, 15 February 2024 02:16 |
seokho yang Messages: 3 Registered: February 2024 |
Junior Member |
|
|
I appreciate your response. However, I added the following code, but the same issue persists:
@Override
public void setActiveEditor(IEditorPart targetEditor) {
super.setActiveEditor(targetEditor);
if (targetEditor instanceof XamEditor) {
XamEditor editor = (XamEditor) targetEditor;
IActionBars bars = getActionBars();
bars.clearGlobalActionHandlers();
bars.updateActionBars();
bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), editor.getEditorActionRegistry().getAction(ActionFactory.DELETE.getId()));
bars.setGlobalActionHandler(ActionFactory.UNDO.getId(), editor.getEditorActionRegistry().getAction(ActionFactory.UNDO.getId()));
bars.setGlobalActionHandler(ActionFactory.REDO.getId(), editor.getEditorActionRegistry().getAction(ActionFactory.REDO.getId()));
} else {
IActionBars bars = getActionBars();
bars.clearGlobalActionHandlers();
bars.updateActionBars();
}
}
Additionally, the issue occurs only in the Java editor. For example, in other editors like the text editor, undo works correctly.
The symptom is that when I have two Java editors open, if I perform a ctrl+z action in the first editor opened after making changes in both, the undo action affects the second editor opened.
Please assist
|
|
|
|
|
Re: CTRL+Z undo redo problem [message #1863616 is a reply to message #1863613] |
Fri, 16 February 2024 07:20 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
So simply installing your plugin but not actually using anything in it causes a problem. Such interaction is kind of inexplicable to me. I'm not sure how to answer questions about such a strange thing. Does your plugin.xml register key bindings? Does it do anything else that might be relevant? Special startup actions? Add listeners on startup?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.09692 seconds