Commit 18fc82ee authored by Vassiliy.Kudryashov's avatar Vassiliy.Kudryashov
Browse files

Add "nullable" annotations

parent 06dcc83c
Branches unavailable Tags unavailable
No related merge requests found
Showing with 7 additions and 1 deletion
+7 -1
......@@ -470,27 +470,33 @@ public abstract class ToolbarDecorator implements CommonActionsPanel.ListenerFac
}
};
}
@Nullable
public static AnActionButton findAddButton(@NotNull JComponent container) {
return findButton(container, CommonActionsPanel.Buttons.ADD);
}
@Nullable
public static AnActionButton findEditButton(@NotNull JComponent container) {
return findButton(container, CommonActionsPanel.Buttons.EDIT);
}
@Nullable
public static AnActionButton findRemoveButton(@NotNull JComponent container) {
return findButton(container, CommonActionsPanel.Buttons.REMOVE);
}
@Nullable
public static AnActionButton findUpButton(@NotNull JComponent container) {
return findButton(container, CommonActionsPanel.Buttons.UP);
}
@Nullable
public static AnActionButton findDownButton(@NotNull JComponent container) {
return findButton(container, CommonActionsPanel.Buttons.DOWN);
}
@Nullable
private static AnActionButton findButton(JComponent comp, CommonActionsPanel.Buttons type) {
final CommonActionsPanel panel = UIUtil.findComponentOfType(comp, CommonActionsPanel.class);
if (panel != null) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment