mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
macros. bug: if on start/stop write macro assign shortcut then on start writing this shortcut will be recorded.
This commit is contained in:
@@ -96,21 +96,20 @@ public class ActionMacroManager implements ExportableApplicationComponent, Named
|
||||
myActionManager = actionManagerEx;
|
||||
myActionManager.addAnActionListener(new AnActionListener() {
|
||||
public void beforeActionPerformed(AnAction action, DataContext dataContext, final AnActionEvent event) {
|
||||
if (myIsRecording) {
|
||||
String id = myActionManager.getId(action);
|
||||
//noinspection HardCodedStringLiteral
|
||||
if (id != null && !"StartStopMacroRecording".equals(id)) {
|
||||
myRecordingMacro.appendAction(id);
|
||||
String shortcut = null;
|
||||
if (event.getInputEvent() instanceof KeyEvent) {
|
||||
shortcut = KeymapUtil.getKeystrokeText(KeyStroke.getKeyStrokeForEvent((KeyEvent)event.getInputEvent()));
|
||||
}
|
||||
notifyUser(id + (shortcut != null ? " (" + shortcut + ")" : ""), false);
|
||||
}
|
||||
|
||||
if (id != null) {
|
||||
myLastActionInputEvent.add(event.getInputEvent());
|
||||
String id = myActionManager.getId(action);
|
||||
if (id == null) return;
|
||||
//noinspection HardCodedStringLiteral
|
||||
if ("StartStopMacroRecording".equals(id)) {
|
||||
myLastActionInputEvent.add(event.getInputEvent());
|
||||
}
|
||||
else if (myIsRecording) {
|
||||
myRecordingMacro.appendAction(id);
|
||||
String shortcut = null;
|
||||
if (event.getInputEvent() instanceof KeyEvent) {
|
||||
shortcut = KeymapUtil.getKeystrokeText(KeyStroke.getKeyStrokeForEvent((KeyEvent)event.getInputEvent()));
|
||||
}
|
||||
notifyUser(id + (shortcut != null ? " (" + shortcut + ")" : ""), false);
|
||||
myLastActionInputEvent.add(event.getInputEvent());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user