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


Java AnAction.EMPTY_ARRAY属性代码示例

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


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

示例1: RunContentDescriptor

public RunContentDescriptor(@Nullable ExecutionConsole executionConsole,
                            @Nullable ProcessHandler processHandler,
                            @NotNull JComponent component,
                            String displayName,
                            @Nullable Icon icon,
                            @Nullable Runnable activationCallback,
                            @Nullable AnAction[] restartActions) {
  myExecutionConsole = executionConsole;
  myProcessHandler = processHandler;
  myComponent = component;
  myDisplayName = displayName;
  myIcon = icon;
  myHelpId = myExecutionConsole instanceof HelpIdProvider ? ((HelpIdProvider)myExecutionConsole).getHelpId() : null;
  myActivationCallback = activationCallback;
  if (myExecutionConsole != null) {
    Disposer.register(this, myExecutionConsole);
  }

  myRestartActions = restartActions == null ? AnAction.EMPTY_ARRAY : restartActions;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:RunContentDescriptor.java

示例2: getChildren

@Override
@NotNull
public AnAction[] getChildren(@Nullable AnActionEvent e) {
  if (e == null) return AnAction.EMPTY_ARRAY;
  final Project project = e.getProject();
  if (project == null) {
    return AnAction.EMPTY_ARRAY;
  }
  final List<String> availableFavoritesLists = FavoritesManager.getInstance(project).getAvailableFavoritesListNames();
  availableFavoritesLists.remove(FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(e.getDataContext()));
  if (availableFavoritesLists.isEmpty()) {
    return new AnAction[]{new AddToNewFavoritesListAction()};
  }

  AnAction[] actions = new AnAction[availableFavoritesLists.size() + 2];
  int idx = 0;
  for (String favoritesList : availableFavoritesLists) {
    actions[idx++] = new AddToFavoritesAction(favoritesList);
  }
  actions[idx++] = Separator.getInstance();
  actions[idx] = new AddToNewFavoritesListAction();
  return actions;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AddToFavoritesActionGroup.java

示例3: getChildren

@Override
@NotNull
public AnAction[] getChildren(@Nullable AnActionEvent e) {
  if (e == null) return AnAction.EMPTY_ARRAY;
  final Project project = e.getProject();
  if (project == null) {
    return AnAction.EMPTY_ARRAY;
  }
  final List<String> listNames = FavoritesManager.getInstance(project).getAvailableFavoritesListNames();
  final List<String> availableFavoritesLists = FavoritesManager.getInstance(project).getAvailableFavoritesListNames();
  availableFavoritesLists.remove(FavoritesTreeViewPanel.FAVORITES_LIST_NAME_DATA_KEY.getData(e.getDataContext()));
  if (availableFavoritesLists.isEmpty()) {
    return new AnAction[]{new AddAllOpenFilesToNewFavoritesListAction()};
  }

  AnAction[] actions = new AnAction[listNames.size() + 2];
  int idx = 0;
  for (String favoritesList : listNames) {
    actions[idx++] = new AddAllOpenFilesToFavorites(favoritesList);
  }
  actions[idx++] = Separator.getInstance();
  actions[idx] = new AddAllOpenFilesToNewFavoritesListAction();
  return actions;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:AddAllToFavoritesActionGroup.java

示例4: createFilteringActions

@Override
@NotNull
public AnAction[] createFilteringActions(@NotNull final UsageView view) {
  final UsageViewImpl impl = (UsageViewImpl)view;
  if (view.getPresentation().isCodeUsages()) {
    final JComponent component = view.getComponent();
    final ShowImportsAction showImportsAction = new ShowImportsAction(impl);
    showImportsAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK)), component, view);
    return new AnAction[] { showImportsAction };
  }
  else {
    return AnAction.EMPTY_ARRAY;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ImportUsageFilteringRuleProvider.java

示例5: createActions

@Override
public AnAction[] createActions(Project project, final Runnable update) {
  if (ProjectViewDirectoryHelper.getInstance(project).supportsHideEmptyMiddlePackages()) {
    return new AnAction[]{new CompactEmptyMiddlePackagesAction(update)};
  }
  return AnAction.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ProjectPatternProvider.java

示例6: SMTestRunnerResultsForm

public SMTestRunnerResultsForm(@NotNull final JComponent console,
                               final TestConsoleProperties consoleProperties) {
  this(console, AnAction.EMPTY_ARRAY, consoleProperties, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:SMTestRunnerResultsForm.java

示例7: DefaultExecutionResult

public DefaultExecutionResult() {
  myConsole = null;
  myProcessHandler = null;
  myActions = AnAction.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DefaultExecutionResult.java

示例8: setRestartActions

public void setRestartActions(@Nullable AnAction... restartActions) {
  myRestartActions = (restartActions != null ? restartActions : AnAction.EMPTY_ARRAY);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:DefaultExecutionResult.java

示例9: getRestartActions

/**
 * @return actions to restart or rerun
 */
@NotNull
public AnAction[] getRestartActions() {
  return myRestartActions.length == 0 ? AnAction.EMPTY_ARRAY : myRestartActions.clone();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:RunContentDescriptor.java

示例10: createConsoleActions

@Override
@NotNull
public AnAction[] createConsoleActions() {
  return AnAction.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:BaseTestsOutputConsoleView.java

示例11: createGroupingActions

@NotNull
public AnAction[] createGroupingActions(UsageView view) {
    return AnAction.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:XsltStuffProvider.java


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