本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例6: SMTestRunnerResultsForm
public SMTestRunnerResultsForm(@NotNull final JComponent console,
final TestConsoleProperties consoleProperties) {
this(console, AnAction.EMPTY_ARRAY, consoleProperties, null);
}
示例7: DefaultExecutionResult
public DefaultExecutionResult() {
myConsole = null;
myProcessHandler = null;
myActions = AnAction.EMPTY_ARRAY;
}
示例8: setRestartActions
public void setRestartActions(@Nullable AnAction... restartActions) {
myRestartActions = (restartActions != null ? restartActions : AnAction.EMPTY_ARRAY);
}
示例9: getRestartActions
/**
* @return actions to restart or rerun
*/
@NotNull
public AnAction[] getRestartActions() {
return myRestartActions.length == 0 ? AnAction.EMPTY_ARRAY : myRestartActions.clone();
}
示例10: createConsoleActions
@Override
@NotNull
public AnAction[] createConsoleActions() {
return AnAction.EMPTY_ARRAY;
}
示例11: createGroupingActions
@NotNull
public AnAction[] createGroupingActions(UsageView view) {
return AnAction.EMPTY_ARRAY;
}