mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
@@ -72,7 +72,7 @@ public abstract class ActionManager implements ApplicationComponent {
|
||||
*
|
||||
* @return An instance of <code>ActionToolbar</code>
|
||||
*/
|
||||
public abstract ActionToolbar createActionToolbar(@NonNls String place, ActionGroup group, boolean horizontal);
|
||||
public abstract ActionToolbar createActionToolbar(@NonNls String place, @NotNull ActionGroup group, boolean horizontal);
|
||||
|
||||
/**
|
||||
* Returns action associated with the specified actionId.
|
||||
@@ -151,7 +151,7 @@ public abstract class ActionManager implements ApplicationComponent {
|
||||
* @return the created panel.
|
||||
* @since 5.1
|
||||
*/
|
||||
public abstract JComponent createButtonToolbar(final String actionPlace, final ActionGroup messageActionGroup);
|
||||
public abstract JComponent createButtonToolbar(final String actionPlace, @NotNull ActionGroup messageActionGroup);
|
||||
|
||||
public abstract AnAction getActionOrStub(@NonNls String id);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ public class PluginId implements Comparable<PluginId> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(PluginId o) {
|
||||
public int compareTo(@NotNull PluginId o) {
|
||||
return myIdString.compareTo(o.myIdString);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,6 +18,7 @@ package com.intellij.openapi.actionSystem.ex;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -31,7 +32,7 @@ public abstract class ActionManagerEx extends ActionManager {
|
||||
return (ActionManagerEx)getInstance();
|
||||
}
|
||||
|
||||
public abstract ActionToolbar createActionToolbar(String place, ActionGroup group, boolean horizontal, boolean decorateButtons);
|
||||
public abstract ActionToolbar createActionToolbar(String place, @NotNull ActionGroup group, boolean horizontal, boolean decorateButtons);
|
||||
|
||||
public abstract void fireBeforeActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event);
|
||||
|
||||
@@ -88,6 +89,7 @@ public abstract class ActionManagerEx extends ActionManager {
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public abstract String[] getPluginActions(PluginId pluginId);
|
||||
|
||||
public abstract void queueActionPerformedEvent(final AnAction action, DataContext context, AnActionEvent event);
|
||||
@@ -96,10 +98,12 @@ public abstract class ActionManagerEx extends ActionManager {
|
||||
|
||||
public abstract boolean isTransparentOnlyActionsUpdateNow();
|
||||
|
||||
@NotNull
|
||||
public List<String> getAbbreviations() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<String> findActionIdsByAbbreviation(String abbreviation) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -203,12 +203,12 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionToolbar createActionToolbar(final String place, final ActionGroup group, final boolean horizontal) {
|
||||
public ActionToolbar createActionToolbar(final String place, @NotNull final ActionGroup group, final boolean horizontal) {
|
||||
return createActionToolbar(place, group, horizontal, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionToolbar createActionToolbar(final String place, final ActionGroup group, final boolean horizontal, final boolean decorateButtons) {
|
||||
public ActionToolbar createActionToolbar(final String place, @NotNull final ActionGroup group, final boolean horizontal, final boolean decorateButtons) {
|
||||
return new ActionToolbarImpl(place, group, horizontal, decorateButtons, myDataManager, this, (KeymapManagerEx)myKeymapManager);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent createButtonToolbar(final String actionPlace, final ActionGroup messageActionGroup) {
|
||||
public JComponent createButtonToolbar(final String actionPlace, @NotNull final ActionGroup messageActionGroup) {
|
||||
return new ButtonToolbarImpl(actionPlace, messageActionGroup, myDataManager, this);
|
||||
}
|
||||
|
||||
@@ -1030,6 +1030,7 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[] getPluginActions(PluginId pluginName) {
|
||||
if (myPlugin2Id.containsKey(pluginName)){
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.ex.ActionManagerEx;
|
||||
import com.intellij.openapi.actionSystem.ex.ActionUtil;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -40,7 +41,7 @@ public class ButtonToolbarImpl extends JPanel {
|
||||
private final ArrayList<ActionJButton> myActions = new ArrayList<ActionJButton>();
|
||||
|
||||
public ButtonToolbarImpl(final String place,
|
||||
final ActionGroup actionGroup,
|
||||
@NotNull ActionGroup actionGroup,
|
||||
DataManager dataManager,
|
||||
ActionManagerEx actionManager) {
|
||||
super(new GridBagLayout());
|
||||
@@ -57,7 +58,7 @@ public class ButtonToolbarImpl extends JPanel {
|
||||
|
||||
}
|
||||
|
||||
private void initButtons(final ActionGroup actionGroup) {
|
||||
private void initButtons(@NotNull ActionGroup actionGroup) {
|
||||
final AnAction[] actions = actionGroup.getChildren(null);
|
||||
|
||||
if (actions.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user