Java 类com.intellij.openapi.actionSystem.KeyboardGestureAction 实例源码

项目:intellij-ce-playground    文件:KeyGestureState.java   
boolean process() {
  myProcessor.myDblClickTimer.stop();

  if (isPureModifierEvent(KeyEvent.KEY_RELEASED)) return false;

  if (!isPureModifierEvent(KeyEvent.KEY_PRESSED)) {
    myProcessor.setState(myProcessor.myWaitForStart);
    return false;
  }

  myContext.actionKey = myContext.keyToProcess;
  myProcessor.setState(myProcessor.myWaitForAction);

  myContext.actionShortcut = KeyStroke.getKeyStrokeForEvent(myContext.actionKey);
  myContext.modifierType = KeyboardGestureAction.ModifierType.dblClick;

  myProcessor.executeAction();

  return true;
}
项目:tools-idea    文件:KeyGestureState.java   
boolean process() {
  myProcessor.myDblClickTimer.stop();

  if (isPureModifierEvent(KeyEvent.KEY_RELEASED)) return false;

  if (!isPureModifierEvent(KeyEvent.KEY_PRESSED)) {
    myProcessor.setState(myProcessor.myWaitForStart);
    return false;
  }

  myContext.actionKey = myContext.keyToProcess;
  myProcessor.setState(myProcessor.myWaitForAction);

  myContext.actionShortcut = KeyStroke.getKeyStrokeForEvent(myContext.actionKey);
  myContext.modifierType = KeyboardGestureAction.ModifierType.dblClick;

  myProcessor.executeAction();

  return true;
}
项目:consulo    文件:KeyGestureState.java   
boolean process() {
  myProcessor.myDblClickTimer.stop();

  if (isPureModifierEvent(KeyEvent.KEY_RELEASED)) return false;

  if (!isPureModifierEvent(KeyEvent.KEY_PRESSED)) {
    myProcessor.setState(myProcessor.myWaitForStart);
    return false;
  }

  myContext.actionKey = myContext.keyToProcess;
  myProcessor.setState(myProcessor.myWaitForAction);

  myContext.actionShortcut = KeyStroke.getKeyStrokeForEvent(myContext.actionKey);
  myContext.modifierType = KeyboardGestureAction.ModifierType.dblClick;

  myProcessor.executeAction();

  return true;
}