當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。