public void actionPerformed(ActionEvent evt, JTextComponent target) { String cmd = evt.getActionCommand(); int mod = evt.getModifiers(); // Dirty fix for Completion shortcut on Unix !!! if (cmd != null && cmd.equals(" ") && (mod == ActionEvent.CTRL_MASK)) { // NOI18N // Ctrl + SPACE } else { Caret caret = target.getCaret(); if (caret instanceof ExtCaret) { ((ExtCaret)caret).requestMatchBraceUpdateSync(); // synced bracket update } super.actionPerformed(evt, target); } if ((target != null) && (evt != null)) { if ((cmd != null) && (cmd.length() == 1) && ((mod & ActionEvent.ALT_MASK) == 0 && (mod & ActionEvent.CTRL_MASK) == 0) ) { // Check whether char that should reindent the line was inserted checkIndentHotChars(target, cmd); // Check the completion checkCompletion(target, cmd); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { String cmd = evt.getActionCommand(); int mod = evt.getModifiers(); // Dirty fix for Completion shortcut on Unix !!! if (cmd != null && cmd.equals(" ") && (mod == ActionEvent.CTRL_MASK)) { // NOI18N // Ctrl + SPACE } else { Caret caret = target.getCaret(); if (caret instanceof ExtCaret) { ((ExtCaret) caret).requestMatchBraceUpdateSync(); // synced // bracket // update } super.actionPerformed(evt, target); } if ((target != null) && (evt != null)) { if ((cmd != null) && (cmd.length() == 1) && ((mod & ActionEvent.ALT_MASK) == 0 && (mod & ActionEvent.CTRL_MASK) == 0)) { // Check whether char that should reindent the line was // inserted checkIndentHotChars(target, cmd); // Check the completion checkCompletion(target, cmd); } } }