当前位置: 首页>>代码示例>>Java>>正文


Java ActionCallback.REJECTED属性代码示例

本文整理汇总了Java中com.intellij.openapi.util.ActionCallback.REJECTED属性的典型用法代码示例。如果您正苦于以下问题:Java ActionCallback.REJECTED属性的具体用法?Java ActionCallback.REJECTED怎么用?Java ActionCallback.REJECTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.openapi.util.ActionCallback的用法示例。


在下文中一共展示了ActionCallback.REJECTED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: queueUpdateFrom

@NotNull
public ActionCallback queueUpdateFrom(final Object element, final boolean forceResort, final boolean updateStructure) {
  if (getUi() == null) return ActionCallback.REJECTED;

  final ActionCallback result = new ActionCallback();

  getUi().invokeLaterIfNeeded(false, new TreeRunnable("AbstractTreeBuilder.queueUpdateFrom") {
    @Override
    public void perform() {
      if (updateStructure && forceResort) {
        getUi().incComparatorStamp();
      }
      getUi().queueUpdate(element, updateStructure).notify(result);
    }
  });


  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AbstractTreeBuilder.java

示例2: _execute

@Override
protected ActionCallback _execute(PlaybackContext context) {
  final String[] keyValue = getText().substring(PREFIX.length()).trim().split("=");
  if (keyValue.length != 2) {
    context.error("Expected expresstion: " + PREFIX + " key=value", getLine());
    return ActionCallback.REJECTED;
  }

  final String key = keyValue[0];
  final String value = keyValue[1];

  context.storeRegistryValue(key);

  Registry.get(key).setValue(value);

  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:RegistryValueCommand.java

示例3: tryToInitSessionFromFocus

private ActionCallback tryToInitSessionFromFocus(@Nullable SwitchTarget preselected, boolean showSpots) {
  if (isSessionActive()) {
    return ActionCallback.REJECTED;
  }

  Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
  SwitchProvider provider = SwitchProvider.KEY.getData(DataManager.getInstance().getDataContext(owner));
  if (provider != null) {
    return initSession(new SwitchingSession(this, provider, myAutoInitSessionEvent, preselected, showSpots));
  }

  return ActionCallback.REJECTED;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SwitchManager.java

示例4: _execute

public ActionCallback _execute(PlaybackContext context) {
  final String s = getText().substring(PREFIX.length()).trim();

  try {
    final Integer delay = Integer.valueOf(s);
    context.getRobot().delay(delay.intValue());
  }
  catch (NumberFormatException e) {
    dumpError(context, "Invalid delay value: " + s);
    return ActionCallback.REJECTED;
  }

  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DelayCommand.java

示例5: goRight

public ActionCallback goRight() {
  if (mySelectedIndex == mySlides.size() - 1) {
    return ActionCallback.REJECTED;
  }
  mySelectedIndex++;
  return applySlide(JBCardLayout.SwipeDirection.FORWARD);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:JBSlidingPanel.java

示例6: _execute

public ActionCallback _execute(PlaybackContext context) {
  final String one = getText().substring(PREFIX.length());
  if (!one.endsWith(POSTFIX)) {
    dumpError(context, "Expected " + "]");
    return ActionCallback.REJECTED;
  }

  type(context.getRobot(), getFromShortcut(one.substring(0, one.length() - 1).trim()));

  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:KeyShortcutCommand.java

示例7: fireModifiedAdded

ActionCallback fireModifiedAdded(@NotNull final Configurable configurable, @Nullable OptionsEditorColleague requestor) {
  if (myModified.contains(configurable)) return ActionCallback.REJECTED;

  myModified.add(configurable);

  return notify(new ColleagueAction() {
    public ActionCallback process(final OptionsEditorColleague colleague) {
      return colleague.onModifiedAdded(configurable);
    }
  }, requestor);

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:OptionsEditorContext.java

示例8: fireModifiedRemoved

ActionCallback fireModifiedRemoved(@NotNull final Configurable configurable, @Nullable OptionsEditorColleague requestor) {
  if (!myModified.contains(configurable)) return ActionCallback.REJECTED;

  myModified.remove(configurable);

  return notify(new ColleagueAction() {
    public ActionCallback process(final OptionsEditorColleague colleague) {
      return colleague.onModifiedRemoved(configurable);
    }
  }, requestor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:OptionsEditorContext.java

示例9: fireErrorsChanged

ActionCallback fireErrorsChanged(final Map<Configurable, ConfigurationException> errors, OptionsEditorColleague requestor) {
  if (myErrors.equals(errors)) return ActionCallback.REJECTED;

  myErrors = errors != null ? errors : new HashMap<Configurable, ConfigurationException>();

  return notify(new ColleagueAction() {
    public ActionCallback process(final OptionsEditorColleague colleague) {
      return colleague.onErrorsChanged();
    }
  }, requestor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:OptionsEditorContext.java

示例10: select

/** @see #select(Configurable) */
@Deprecated
public ActionCallback select(Class<? extends Configurable> configurableClass) {
  final Configurable configurable = findConfigurable(configurableClass);
  if (configurable == null) {
    return ActionCallback.REJECTED;
  }
  return select(configurable);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:OptionsEditor.java

示例11: updateIfCurrent

private ActionCallback updateIfCurrent(final Configurable configurable) {
  if (getContext().getCurrentConfigurable() == configurable && configurable != null) {
    updateDetails();
    final ConfigurableContent content = myConfigurable2Content.get(configurable);
    content.updateBannerActions();
    return ActionCallback.DONE;
  } else {
    return ActionCallback.REJECTED;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:OptionsEditor.java

示例12: navigateTo

@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
  ModuleEditor editor = getModuleEditor();
  return editor == null ? ActionCallback.REJECTED : editor.navigateTo(place, requestFocus);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ModuleConfigurable.java

示例13: _execute

@Override
protected ActionCallback _execute(PlaybackContext context) {
  String[] args = getText().substring(PREFIX.length()).trim().split(" ");
  String syntaxText = "Syntax error, expected: " + PREFIX + " " + ON + "|" + OFF + " actionName";
  if (args.length != 2) {
    context.error(syntaxText, getLine());
    return ActionCallback.REJECTED;
  }
  
  final boolean on;
  if (ON.equalsIgnoreCase(args[0])) {
    on = true;
  } else if (OFF.equalsIgnoreCase(args[0])) {
    on = false;
  } else {
    context.error(syntaxText, getLine());
    return ActionCallback.REJECTED;
  }
  
  String actionId = args[1];
  final AnAction action = ActionManager.getInstance().getAction(actionId);
  if (action == null) {
    context.error("Unknown action id=" + actionId, getLine());
    return ActionCallback.REJECTED;
  }

  if (!(action instanceof ToggleAction)) {
    context.error("Action is not a toggle action id=" + actionId, getLine());
    return ActionCallback.REJECTED;
  }

  final InputEvent inputEvent = ActionCommand.getInputEvent(actionId);
  final ActionCallback result = new ActionCallback();

  context.getRobot().delay(Registry.intValue("actionSystem.playback.delay"));

  IdeFocusManager fm = IdeFocusManager.getGlobalInstance();
  fm.doWhenFocusSettlesDown(new Runnable() {
    @Override
    public void run() {
      final Presentation presentation = (Presentation)action.getTemplatePresentation().clone();
      AnActionEvent event =
          new AnActionEvent(inputEvent, DataManager.getInstance()
              .getDataContext(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()), ActionPlaces.UNKNOWN,
                            presentation, ActionManager.getInstance(), 0);

      ActionUtil.performDumbAwareUpdate(action, event, false);

      Boolean state = (Boolean)event.getPresentation().getClientProperty(ToggleAction.SELECTED_PROPERTY);
      if (state.booleanValue() != on) {
        ActionManager.getInstance().tryToExecute(action, inputEvent, null, ActionPlaces.UNKNOWN, true).doWhenProcessed(result.createSetDoneRunnable());
      }
      else {
        result.setDone();
      }
    }
  });


  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:61,代码来源:ToggleActionCommand.java

示例14: selectAndFocus

@NotNull
@Override
public ActionCallback selectAndFocus(@Nullable final Content content, boolean requestFocus, final boolean forced, boolean implicit) {
  if (content == null) return ActionCallback.REJECTED;
  return getContentManager(content).setSelectedContent(content, requestFocus || shouldRequestFocus(), forced, implicit);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:RunnerLayoutUiImpl.java

示例15: cancelUpdate

@NotNull
public ActionCallback cancelUpdate() {
  if (isDisposed()) return ActionCallback.REJECTED;

  return getUi().cancelUpdate();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AbstractTreeBuilder.java


注:本文中的com.intellij.openapi.util.ActionCallback.REJECTED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。