This commit is contained in:
Alexey Kudravtsev
2013-02-14 12:01:40 +04:00
parent 7cf0bd0a21
commit 14aa2e2b29
152 changed files with 310 additions and 21 deletions
@@ -35,6 +35,7 @@ import com.intellij.util.ListWithSelection;
import com.intellij.util.ui.ComboBoxTableCellEditor;
import com.intellij.util.ui.Table;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
@@ -350,6 +351,7 @@ public class GenerateAntBuildDialog extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -27,6 +27,7 @@ import com.intellij.openapi.fileTypes.FileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.EditorTextField;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -62,6 +63,7 @@ public class ViewTextAction extends BaseValueAction {
myTextViewer.setText(text);
}
@NotNull
protected Action[] createActions() {
return new Action[] {getCancelAction()};
}
@@ -42,6 +42,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.ScrollPaneFactory;
import com.sun.jdi.*;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -77,6 +78,7 @@ public class ExportDialog extends DialogWrapper {
setHorizontalStretch(1.5f);
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(), myCopyToClipboardAction, getCancelAction(), getHelpAction()};
}
@@ -27,6 +27,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.DoubleClickListener;
import com.intellij.ui.JBColor;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -42,6 +43,7 @@ public class GetJPDADialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction()};
}
@@ -25,6 +25,7 @@ import com.intellij.openapi.ui.MultiLineLabelUI;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.util.ui.OptionsDialog;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -98,6 +99,7 @@ public class RunHotswapDialog extends OptionsDialog {
return true;
}
@NotNull
protected Action[] createActions(){
setOKButtonText(CommonBundle.getYesButtonText());
setCancelButtonText(CommonBundle.getNoButtonText());
@@ -38,6 +38,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiWhiteSpace;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -167,6 +168,7 @@ public class StatementEvaluationDialog extends EvaluationDialog{
mySwitchAction.setEnabled(true);
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(), getCancelAction(), mySwitchAction, getHelpAction() };
}
@@ -37,6 +37,7 @@ import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBList;
import com.intellij.util.ArrayUtil;
import gnu.trove.TIntArrayList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -282,6 +283,7 @@ public class JdkChooserPanel extends JPanel {
return JdkChooserPanel.this;
}
@NotNull
protected Action[] createActions() {
return new Action[]{new ConfigureAction(), getOKAction(), getCancelAction()};
}
@@ -125,6 +125,7 @@ public class ProjectStructureChooseLibrariesDialog extends ChooseLibrariesFromTa
return library.getName();
}
@NotNull
@Override
protected Action[] createActions() {
if (SystemInfo.isMac) {
@@ -19,6 +19,7 @@ import com.intellij.openapi.Disposable;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Disposer;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -54,6 +55,7 @@ public class AnalyzeDependenciesDialog extends DialogWrapper {
/**
* {@inheritDoc}
*/
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction()};
@@ -21,6 +21,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.psi.PsiVariable;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -53,6 +54,7 @@ public class SideEffectWarningDialog extends DialogWrapper {
}
@NotNull
@Override
protected Action[] createActions() {
List<AbstractAction> actions = new ArrayList<AbstractAction>();
@@ -97,11 +99,13 @@ public class SideEffectWarningDialog extends DialogWrapper {
return actions.toArray(new Action[actions.size()]);
}
@NotNull
@Override
protected Action getCancelAction() {
return myCancelAllAction;
}
@NotNull
@Override
protected Action getOKAction() {
return myRemoveAllAction;
@@ -126,6 +126,7 @@ public class CreateClassDialog extends DialogWrapper {
return false;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()};
@@ -20,6 +20,7 @@ import com.intellij.ide.IdeBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -55,6 +56,7 @@ class SuperMethodWarningDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),new NoAction(),getCancelAction()};
}
@@ -35,6 +35,7 @@ import com.intellij.ui.NonFocusableCheckBox;
import com.intellij.util.Function;
import com.intellij.util.containers.HashMap;
import com.intellij.util.ui.FormBuilder;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -105,6 +106,7 @@ class AnonymousToInnerDialog extends DialogWrapper{
myNameField.selectNameWithoutExtension();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
@@ -37,6 +37,7 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ui.FormBuilder;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -84,6 +85,7 @@ class CopyClassDialog extends DialogWrapper{
myNameField.selectAll();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
@@ -41,6 +41,7 @@ import com.intellij.util.VisibilityUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.border.Border;
@@ -142,6 +143,7 @@ public class ExtractMethodDialog extends AbstractExtractDialog {
return myCbChainedConstructor != null && myCbChainedConstructor.isSelected();
}
@NotNull
protected Action[] createActions() {
if (myHelpId != null) {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -33,6 +33,7 @@ import com.intellij.util.VisibilityUtil;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -126,6 +127,7 @@ public class ExtractMethodObjectDialog extends AbstractExtractDialog {
return false;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -55,6 +55,7 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ui.UIUtil;
import gnu.trove.THashSet;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -163,6 +164,7 @@ class IntroduceConstantDialog extends DialogWrapper {
return myTypeSelector.getSelectedType();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -32,6 +32,7 @@ import com.intellij.refactoring.ui.*;
import com.intellij.refactoring.util.CommonRefactoringUtil;
import com.intellij.refactoring.util.RefactoringMessageUtil;
import com.intellij.util.ArrayUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -125,6 +126,7 @@ class IntroduceFieldDialog extends DialogWrapper {
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -32,6 +32,7 @@ import com.intellij.refactoring.ui.MethodCellRenderer;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.components.JBList;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -62,6 +63,7 @@ public class EnclosingMethodSelectionDialog extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()/*, getHelpAction()*/};
}
@@ -29,6 +29,7 @@ import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.ui.*;
import com.intellij.ui.NonFocusableCheckBox;
import com.intellij.ui.StateRestoringCheckBox;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -82,6 +83,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable
super.dispose();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -23,6 +23,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.refactoring.HelpID;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.ui.ScrollPaneFactory;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -56,6 +57,7 @@ public class MigrationDialog extends DialogWrapper{
init();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
@@ -32,6 +32,7 @@ import com.intellij.usageView.UsageInfo;
import com.intellij.usages.impl.UsagePreviewPanel;
import com.intellij.util.ui.Table;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -93,6 +94,7 @@ class OverridingMethodsDialog extends DialogWrapper {
return result;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()/*, getHelpAction()*/};
}
@@ -21,6 +21,7 @@ import com.intellij.refactoring.RefactoringBundle;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -43,6 +44,7 @@ public class FailedConversionsDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), new ViewUsagesAction(), new CancelAction()};
}
@@ -25,6 +25,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.project.Project;
import com.intellij.util.ui.UIUtil;
import com.intellij.refactoring.RefactoringBundle;
import org.jetbrains.annotations.NotNull;
public class InfoDialog extends DialogWrapper{
private JCheckBox myShowInFutureCheckBox;
@@ -42,6 +43,7 @@ public class InfoDialog extends DialogWrapper{
setOKButtonText(RefactoringBundle.message("ok.button"));
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction()};
}
@@ -26,6 +26,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.MultiLineLabelUI;
import com.intellij.openapi.ui.Messages;
import com.intellij.refactoring.RefactoringBundle;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -80,6 +81,7 @@ public class YesNoPreviewUsagesDialog extends DialogWrapper {
return panel;
}
@NotNull
protected Action[] createActions() {
if(myHelpID != null){
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -257,6 +257,7 @@ public class CreateTestDialog extends DialogWrapper {
return getClass().getName();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -45,6 +45,7 @@ import com.intellij.util.Consumer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.CharArrayUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -207,6 +208,7 @@ public class UnscrambleDialog extends DialogWrapper {
myEditorPanel.add(myStacktraceEditorPanel, BorderLayout.CENTER);
}
@NotNull
protected Action[] createActions(){
return new Action[]{createNormalizeTextAction(), getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -20,6 +20,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.MultiLineLabelUI;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -42,6 +43,7 @@ public class RefactoringMessageDialog extends DialogWrapper {
init();
}
@NotNull
@Override
protected Action[] createActions() {
List<Action> actions = new ArrayList<Action>();
@@ -153,6 +153,7 @@ public class ManageCodeStyleSchemesDialog extends DialogWrapper {
return mySchemesTableModel.getSchemeAt(row);
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{};
@@ -28,6 +28,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.LabeledComponent;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.ui.OptionGroup;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -183,6 +184,7 @@ public class ExportToHTMLDialog extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(),getCancelAction(), getHelpAction()};
}
@@ -22,6 +22,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.TabbedPaneWrapper;
import com.intellij.ui.MappingListCellRenderer;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -632,6 +633,7 @@ class PrintDialog extends DialogWrapper {
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(),getCancelAction(), new ApplyAction(), getHelpAction()};
}
@@ -208,6 +208,7 @@ public class LayoutCodeDialog extends DialogWrapper {
return OptionsDialog.addDoNotShowCheckBox(southPanel, myDoNotAskMeCheckBox);
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -79,6 +79,7 @@ public class LayoutProjectCodeDialog extends DialogWrapper {
return panel;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -30,6 +30,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.table.JBTable;
import com.intellij.util.ui.EditableModel;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
@@ -57,6 +58,7 @@ class EditVariableDialog extends DialogWrapper {
setOKButtonText(CommonBundle.getOkButtonText());
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -28,6 +28,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -56,6 +57,7 @@ public class RunDialog extends DialogWrapper implements RunConfigurable.RunDialo
myConfigurable.reset();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),getCancelAction(),new ApplyAction(),getHelpAction()};
}
@@ -89,6 +89,7 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
setTitle(isSingleFile ? FindBundle.message("find.usages.in.file.dialog.title") : FindBundle.message("find.usages.dialog.title"));
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -27,6 +27,7 @@ import com.intellij.ui.DoubleClickListener;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.SeparatorFactory;
import com.intellij.ui.components.JBList;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -99,6 +100,7 @@ public final class MacrosDialog extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
@@ -26,6 +26,7 @@ import com.intellij.psi.search.TodoPattern;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.Table;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.border.Border;
@@ -106,6 +107,7 @@ class FilterDialog extends DialogWrapper {
super.doOKAction();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -25,6 +25,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.refactoring.RefactoringSettings;
import com.intellij.refactoring.safeDelete.SafeDeleteHandler;
import com.intellij.ui.StateRestoringCheckBox;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -63,10 +64,12 @@ public class DeleteDialog extends DialogWrapper {
return myCbSearchInNonJava.isSelected();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()/*, getHelpAction()*/};
}
@NotNull
@Override
protected Action getOKAction() {
Action result = super.getOKAction();
@@ -235,6 +235,7 @@ public class MemberChooser<T extends ClassMember> extends DialogWrapper implemen
}
@NotNull
protected Action[] createActions() {
if (myAllowEmptySelection) {
return new Action[]{getOKAction(), new SelectNoneAction(), getCancelAction()};
@@ -90,6 +90,7 @@ public class ImageDuplicateResultsDialog extends DialogWrapper {
TreeUtil.selectFirstNode(myTree);
}
@NotNull
@Override
protected Action[] createActions() {
final Action[] actions = new Action[4];
@@ -688,6 +688,7 @@ public class PsiViewerDialog extends DialogWrapper implements DataProvider, Disp
return null;
}
@NotNull
@Override
protected Action[] createActions() {
AbstractAction copyPsi = new AbstractAction("Cop&y PSI") {
@@ -31,6 +31,7 @@ import com.intellij.ui.*;
import com.intellij.ui.table.JBTable;
import com.intellij.util.PlatformIcons;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -277,6 +278,7 @@ public class RegistryUi implements Disposable {
return myTable;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{myRestoreDefaultsAction, new AbstractAction("Close") {
@@ -45,6 +45,7 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ui.FormBuilder;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -144,6 +145,7 @@ public class CopyFilesOrDirectoriesDialog extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -23,6 +23,7 @@ import com.intellij.openapi.ui.Messages;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.ui.DocumentAdapter;
import com.intellij.util.containers.HashMap;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -118,6 +119,7 @@ public class AbstractExtractMethodDialog extends DialogWrapper implements Extrac
return map;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -177,6 +177,7 @@ public class ExtractIncludeDialog extends DialogWrapper {
return ExtractIncludeFileBase.HELP_ID;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -47,6 +47,7 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ui.FormBuilder;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -76,6 +77,7 @@ public class MoveFilesOrDirectoriesDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -26,6 +26,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.RefactoringSettings;
import com.intellij.refactoring.util.TextOccurrencesUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -66,6 +67,7 @@ public class SafeDeleteDialog extends DialogWrapper {
return false;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -26,6 +26,7 @@ import com.intellij.refactoring.RefactoringBundle;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -44,6 +45,7 @@ public class UnsafeUsagesDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions() {
final ViewUsagesAction viewUsagesAction = new ViewUsagesAction();
@@ -101,6 +101,7 @@ public class ConflictsDialog extends DialogWrapper{
init();
}
@NotNull
protected Action[] createActions(){
final Action okAction = getOKAction();
if (myElementConflictDescription == null) {
@@ -119,6 +119,7 @@ public abstract class RefactoringDialog extends DialogWrapper {
return true;
}
@NotNull
protected Action[] createActions() {
List<Action> actions = new ArrayList<Action>();
actions.add(getRefactorAction());
@@ -23,6 +23,7 @@ import com.intellij.openapi.help.HelpManager;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.*;
import com.intellij.ui.components.JBList;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -42,6 +43,7 @@ public class OutputFiltersDialog extends DialogWrapper {
initGui();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -168,6 +168,7 @@ public class ToolEditorDialog extends DialogWrapper {
return panel;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -103,6 +103,7 @@ public class UiDebugger extends JPanel implements Disposable {
return result;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[] {new AbstractAction("Close") {
@@ -318,7 +318,9 @@ public class DialogBuilder implements Disposable {
}
public void init() { super.init(); }
@NotNull
public Action getOKAction() { return super.getOKAction(); } // Make it public
@NotNull
public Action getCancelAction() { return super.getCancelAction(); } // Make it public
protected JComponent createCenterPanel() { return myCenterPanel; }
@@ -140,11 +140,12 @@ public abstract class DialogWrapper {
return DialogWrapper.this.toString();
}
@Override
public void dispose() {
DialogWrapper.this.dispose();
}
};
private List<JBOptionButton> myOptionsButtons = new ArrayList<JBOptionButton>();
private final List<JBOptionButton> myOptionsButtons = new ArrayList<JBOptionButton>();
private int myCurrentOptionsButtonIndex = -1;
private boolean myResizeInProgress = false;
private ComponentAdapter myResizeListener;
@@ -237,6 +238,7 @@ public abstract class DialogWrapper {
//validation
private final Alarm myValidationAlarm = new Alarm(getValidationThreadToUse(), myDisposable);
@NotNull
protected Alarm.ThreadToUse getValidationThreadToUse() {
return Alarm.ThreadToUse.SWING_THREAD;
}
@@ -272,12 +274,13 @@ public abstract class DialogWrapper {
myValidationDelay = delay;
}
private void reportProblem(final ValidationInfo info) {
private void reportProblem(@NotNull final ValidationInfo info) {
installErrorPainter();
myErrorPainter.setValidationInfo(info);
if (! myErrorText.isTextSet(info.message)) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (myDisposed) return;
setErrorText(info.message);
@@ -303,6 +306,7 @@ public abstract class DialogWrapper {
myErrorPainter.setValidationInfo(null);
if (! myErrorText.isTextSet(null)) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (myDisposed) return;
setErrorText(null);
@@ -323,15 +327,15 @@ public abstract class DialogWrapper {
myPeer.setUndecorated(undecorated);
}
public final void addMouseListener(MouseListener listener) {
public final void addMouseListener(@NotNull MouseListener listener) {
myPeer.addMouseListener(listener);
}
public final void addMouseListener(MouseMotionListener listener) {
public final void addMouseListener(@NotNull MouseMotionListener listener) {
myPeer.addMouseListener(listener);
}
public final void addKeyListener(KeyListener listener) {
public final void addKeyListener(@NotNull KeyListener listener) {
myPeer.addKeyListener(listener);
}
@@ -516,7 +520,8 @@ public abstract class DialogWrapper {
return false;
}
public static JPanel addDoNotShowCheckBox(JComponent southPanel, JCheckBox checkBox) {
@NotNull
public static JPanel addDoNotShowCheckBox(JComponent southPanel, @NotNull JCheckBox checkBox) {
final JPanel panel = new JPanel(new BorderLayout());
JPanel wrapper = new JPanel(new GridBagLayout());
@@ -529,7 +534,7 @@ public abstract class DialogWrapper {
return panel;
}
private boolean hasFocusedAction(Action[] actions) {
private boolean hasFocusedAction(@NotNull Action[] actions) {
for (Action action : actions) {
if (action.getValue(FOCUSED_ACTION) != null && (Boolean)action.getValue(FOCUSED_ACTION)) {
return true;
@@ -539,7 +544,8 @@ public abstract class DialogWrapper {
return false;
}
private JPanel createButtons(Action[] actions, List<JButton> buttons) {
@NotNull
private JPanel createButtons(@NotNull Action[] actions, @NotNull List<JButton> buttons) {
if (!UISettings.getShadowInstance().ALLOW_MERGE_BUTTONS) {
final List<Action> actionList = new ArrayList<Action>();
for (Action action : actions) {
@@ -618,7 +624,8 @@ public abstract class DialogWrapper {
}
}
} else {
}
else {
button = new JButton(action);
}
@@ -681,7 +688,7 @@ public abstract class DialogWrapper {
}
}
protected DialogWrapperPeer createPeer(final Component parent, final boolean canBeParent) {
protected DialogWrapperPeer createPeer(@NotNull Component parent, final boolean canBeParent) {
return DialogWrapperPeerFactory.getInstance().createPeer(this, parent, canBeParent);
}
@@ -765,6 +772,7 @@ public abstract class DialogWrapper {
public static void unregisterKeyboardActions(final JRootPane rootPane) {
new AwtVisitor(rootPane) {
@Override
public boolean visit(final Component component) {
if (component instanceof JComponent) {
final JComponent eachComp = (JComponent)component;
@@ -895,6 +903,7 @@ public abstract class DialogWrapper {
}
}
@NotNull
protected Action[] createLeftSideActions() {
return new Action[0];
}
@@ -904,6 +913,7 @@ public abstract class DialogWrapper {
* <code>doOKAction()</code> method.
* @see #doOKAction
*/
@NotNull
protected Action getOKAction() {
return myOKAction;
}
@@ -913,6 +923,7 @@ public abstract class DialogWrapper {
* <code>doCancelAction()</code> method.
* @see #doCancelAction
*/
@NotNull
protected Action getCancelAction() {
return myCancelAction;
}
@@ -922,6 +933,7 @@ public abstract class DialogWrapper {
* <code>doHelpAction()</code> method.
* @see #doHelpAction
*/
@NotNull
protected Action getHelpAction() {
return myHelpAction;
}
@@ -1139,7 +1151,7 @@ public abstract class DialogWrapper {
@Override
public void update(AnActionEvent e) {
final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
e.getPresentation().setEnabled((owner instanceof JButton && owner.isEnabled()));
e.getPresentation().setEnabled(owner instanceof JButton && owner.isEnabled());
}
}.registerCustomShortcutSet(CustomShortcutSet.fromString("ENTER"), root);
}
@@ -1148,7 +1160,8 @@ public abstract class DialogWrapper {
if (myCurrentOptionsButtonIndex > 0) {
myOptionsButtons.get(myCurrentOptionsButtonIndex).closePopup();
myCurrentOptionsButtonIndex++;
} else if (myOptionsButtons.size() > 0) {
}
else if (!myOptionsButtons.isEmpty()) {
myCurrentOptionsButtonIndex = 0;
}
@@ -1160,6 +1173,7 @@ public abstract class DialogWrapper {
void startTrackingValidation() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (!myValidationStarted && !myDisposed) {
myValidationStarted = true;
@@ -1172,6 +1186,7 @@ public abstract class DialogWrapper {
protected final void initValidation() {
myValidationAlarm.cancelAllRequests();
final Runnable validateRequest = new Runnable() {
@Override
public void run() {
if (myDisposed) return;
final ValidationInfo result = doValidate();
@@ -1427,6 +1442,7 @@ public abstract class DialogWrapper {
* You need this method ONLY for NON-MODAL dialogs. Otherwise, use {@link #show()} or {@link #showAndGet()}.
* @return result callback
*/
@NotNull
public AsyncResult<Boolean> showAndGetOk() {
final AsyncResult<Boolean> result = new AsyncResult<Boolean>();
@@ -1440,6 +1456,7 @@ public abstract class DialogWrapper {
}
myPeer.show().doWhenProcessed(new Runnable() {
@Override
public void run() {
result.setDone(isOK());
}
@@ -1463,6 +1480,7 @@ public abstract class DialogWrapper {
private void registerKeyboardShortcuts() {
ActionListener cancelKeyboardAction = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
MenuSelectionManager menuSelectionManager = MenuSelectionManager.defaultManager();
MenuElement[] selectedPath = menuSelectionManager.getSelectedPath();
@@ -1471,7 +1489,7 @@ public abstract class DialogWrapper {
}
else {
final StackingPopupDispatcher popupDispatcher = StackingPopupDispatcher.getInstance();
if (ApplicationManager.getApplication() == null || (popupDispatcher != null && !popupDispatcher.isPopupFocused())) {
if (ApplicationManager.getApplication() == null || popupDispatcher != null && !popupDispatcher.isPopupFocused()) {
doCancelAction(e);
}
}
@@ -1487,6 +1505,7 @@ public abstract class DialogWrapper {
if (ApplicationInfo.contextHelpAvailable()) {
ActionListener helpAction = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
doHelpAction();
}
@@ -1498,11 +1517,13 @@ public abstract class DialogWrapper {
if (myButtons != null) {
rootPane.registerKeyboardAction(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
focusPreviousButton();
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
rootPane.registerKeyboardAction(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
focusNextButton();
}
@@ -1518,7 +1539,7 @@ public abstract class DialogWrapper {
}
}
private void registerForEveryKeyboardShortcut(ActionListener action, ShortcutSet shortcuts) {
private void registerForEveryKeyboardShortcut(ActionListener action, @NotNull ShortcutSet shortcuts) {
for (Shortcut shortcut : shortcuts.getShortcuts()){
if (shortcut instanceof KeyboardShortcut) {
KeyboardShortcut ks = (KeyboardShortcut)shortcut;
@@ -1591,6 +1612,7 @@ public abstract class DialogWrapper {
/**
* {@inheritDoc}
*/
@Override
public void actionPerformed(ActionEvent e) {
if (myClosed) return;
if (myPerformAction) return;
@@ -1678,6 +1700,7 @@ public abstract class DialogWrapper {
putValue(NAME, CommonBundle.getHelpButtonText());
}
@Override
public void actionPerformed(ActionEvent e) {
doHelpAction();
}
@@ -1697,6 +1720,7 @@ public abstract class DialogWrapper {
myErrorTextAlarm.cancelAllRequests();
myErrorTextAlarm.addRequest(new Runnable() {
@Override
public void run() {
final String text = myLastErrorText;
myErrorText.setError(text);
@@ -1820,6 +1844,7 @@ public abstract class DialogWrapper {
return StringUtil.equals(text, myText);
}
@Override
public Dimension getPreferredSize() {
return myPrefSize == null ? myLabel.getPreferredSize() : myPrefSize;
}
@@ -70,6 +70,7 @@ public abstract class NewVirtualFileSystem extends VirtualFileSystem implements
return false;
}
@NotNull
protected abstract String extractRootPath(@NotNull String path);
@Override
@@ -23,6 +23,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.FixedSizeButton;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.util.PlatformIcons;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -172,6 +173,7 @@ public abstract class AbstractFieldPanel extends JPanel {
init();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()};
}
@@ -17,6 +17,7 @@ package com.intellij.util.net;
import com.intellij.CommonBundle;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -58,6 +59,7 @@ public class HTTPProxySettingsDialog extends DialogWrapper {
return panel.createComponent();
}
@NotNull
protected Action[] createActions() {
return new Action[]{okAction, cancelAction};
}
@@ -17,6 +17,7 @@ package com.intellij.util.ui;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.MultiLineLabelUI;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -39,6 +40,7 @@ public abstract class OptionsMessageDialog extends OptionsDialog{
protected abstract String getOkActionName();
protected abstract String getCancelActionName();
@NotNull
protected Action[] createActions() {
final Action okAction = getOKAction();
final Action cancelAction = getCancelAction();
@@ -21,6 +21,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.TextComponentAccessor;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.ui.DocumentAdapter;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -90,6 +91,7 @@ public class PathMacroEditor extends DialogWrapper {
return myNameField;
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
}
@@ -191,6 +191,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
public void entryWasRead() {
}
@NotNull
@Override
protected Action[] createActions() {
if (SystemInfo.isMac) {
@@ -20,6 +20,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.ui.JBColor;
import com.intellij.ui.components.JBLabel;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -159,6 +160,7 @@ public class OutOfMemoryDialog extends DialogWrapper {
return myContentPane;
}
@NotNull
protected Action[] createActions() {
return new Action[]{myShutdownAction, myIgnoreAction};
}
@@ -4,6 +4,7 @@ import com.intellij.diagnostic.DiagnosticBundle;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -40,6 +41,7 @@ public class DisablePluginWarningDialog extends DialogWrapper {
return myContentPane;
}
@NotNull
@Override
protected Action[] createActions() {
if (SystemInfo.isMac) {
@@ -33,6 +33,7 @@ import com.intellij.util.text.DateFormatUtil;
import com.intellij.util.ui.ColumnInfo;
import com.intellij.util.ui.ListTableModel;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -123,6 +124,7 @@ public class ShowFeatureUsageStatisticsDialog extends DialogWrapper {
return "#com.intellij.featureStatistics.actions.ShowFeatureUsageStatisticsDialog";
}
@NotNull
protected Action[] createActions() {
return new Action[] {getCancelAction(), getHelpAction()};
}
@@ -25,6 +25,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -68,6 +69,7 @@ public class AdaptiveTipDialog extends DialogWrapper {
return panel;
}
@NotNull
protected Action[] createActions() {
if (myFeatures.length == 1) {
return new Action[] {getCancelAction()};
@@ -19,6 +19,7 @@ import com.intellij.ide.passwordSafe.MasterPasswordUnavailableException;
import com.intellij.ide.passwordSafe.PasswordSafeException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -86,6 +87,7 @@ public class MasterPasswordDialog extends DialogWrapper {
/**
* {@inheritDoc}
*/
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), new DialogWrapperExitAction("C&hange Password", CHANGE_USER_CODE),
@@ -386,6 +386,7 @@ public class InstalledPluginsManagerMain extends PluginManagerMain {
setOKButtonMnemonic('C');
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction()};
@@ -34,6 +34,7 @@ import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.ToolbarDecorator;
import com.intellij.ui.components.JBList;
import com.intellij.util.ArrayUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@@ -174,6 +175,7 @@ public class PluginHostsConfigurable extends BaseConfigurable {
super(parentComponent, message, title, icon, initialValue, validator);
}
@NotNull
protected Action[] createActions() {
final Action[] actions = super.createActions();
final AbstractAction checkNowAction = new AbstractAction("Check Now") {
@@ -37,6 +37,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.WindowManager;
import com.intellij.util.SystemProperties;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@@ -238,6 +239,7 @@ public class ExportToFileUtil {
return myTfFile.getText();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), new CopyToClipboardAction(), getCancelAction()};
}
@@ -19,6 +19,7 @@ package com.intellij.ide.util;
import com.intellij.CommonBundle;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -38,6 +39,7 @@ public class TipDialog extends DialogWrapper{
init();
}
@NotNull
protected Action[] createActions(){
return new Action[]{new PreviousTipAction(),new NextTipAction(),getCancelAction()};
}
@@ -22,6 +22,7 @@ import com.intellij.openapi.wm.impl.FocusRequestInfo;
import com.intellij.ui.JBColor;
import com.intellij.ui.table.JBTable;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -92,6 +93,7 @@ public class FocusTracesDialog extends DialogWrapper {
return myRequestsTable;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[] {getOKAction(), getCopyStackTraceAction()};
@@ -23,6 +23,7 @@ import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -59,6 +60,7 @@ public class CannotUndoReportDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction()};
}
@@ -64,6 +64,7 @@ public class BinaryDiffTool implements DiffTool {
return "BinaryDiffDialog";
}
@NotNull
@Override
protected Action[] createActions() {
final Action close = getCancelAction();
@@ -32,6 +32,7 @@ import com.intellij.ui.JBColor;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ArrayUtil;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
@@ -68,6 +69,7 @@ public class KeyboardShortcutDialog extends DialogWrapper {
init();
}
@NotNull
protected Action[] createActions(){
return new Action[]{getOKAction(),getCancelAction(),getHelpAction()};
}
@@ -31,6 +31,7 @@ import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy;
import com.intellij.util.Alarm;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -118,6 +119,7 @@ public class SingleConfigurableEditor extends DialogWrapper {
}
}
@NotNull
protected Action[] createActions() {
List<Action> actions = new ArrayList<Action>();
actions.add(getOKAction());
@@ -237,6 +237,7 @@ public class OptionsEditorDialog extends DialogWrapper implements DataProvider{
super.doCancelAction();
}
@NotNull
@Override
protected Action[] createActions() {
myApplyAction = new ApplyAction();
@@ -22,6 +22,7 @@ import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.ui.Table;
import gnu.trove.TObjectIntHashMap;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.table.AbstractTableModel;
@@ -71,6 +72,7 @@ public class DefineMacrosDialog extends DialogWrapper{
super.doOKAction();
}
@NotNull
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction()};
}
@@ -25,18 +25,22 @@ import org.jetbrains.annotations.Nullable;
import java.awt.*;
public class DialogWrapperPeerFactoryImpl extends DialogWrapperPeerFactory {
@Override
public DialogWrapperPeer createPeer(DialogWrapper wrapper, @Nullable Project project, boolean canBeParent) {
return new DialogWrapperPeerImpl(wrapper, project, canBeParent);
}
@Override
public DialogWrapperPeer createPeer(DialogWrapper wrapper, boolean canBeParent) {
return new DialogWrapperPeerImpl(wrapper, canBeParent);
}
@Override
public DialogWrapperPeer createPeer(final DialogWrapper wrapper, final boolean canBeParent, final boolean tryToolkitModal) {
return new DialogWrapperPeerImpl(wrapper, canBeParent, tryToolkitModal);
}
@Override
public DialogWrapperPeer createPeer(DialogWrapper wrapper, @NotNull Component parent, boolean canBeParent) {
return new DialogWrapperPeerImpl(wrapper, parent, canBeParent);
}
@@ -23,6 +23,7 @@ import com.intellij.ui.BrowserHyperlinkListener;
import com.intellij.ui.LicensingFacade;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -46,6 +47,7 @@ public class NewChannelDialog extends DialogWrapper {
setCancelButtonText("Ignore This Update");
}
@NotNull
@Override
protected Action[] createActions() {
Action remindLater = new AbstractAction("Remind Me Later") {
@@ -19,6 +19,7 @@ import com.intellij.CommonBundle;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.plugins.PluginManagerConfigurable;
import com.intellij.openapi.application.ApplicationInfo;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.util.List;
@@ -42,6 +43,7 @@ class NoUpdatesDialog extends AbstractUpdateDialog {
return myUploadedPlugins == null ? CommonBundle.getCloseButtonText() : IdeBundle.message("update.plugins.update.action");
}
@NotNull
protected Action[] createActions() {
final Action cancelAction = getCancelAction();
if (myUploadedPlugins != null) {
@@ -25,6 +25,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.BrowserHyperlinkListener;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -50,6 +51,7 @@ class UpdateInfoDialog extends AbstractUpdateDialog {
init();
}
@NotNull
@Override
protected Action[] createActions() {
List<Action> actions = new ArrayList<Action>();
@@ -52,6 +52,7 @@ public class TempFileSystem extends NewVirtualFileSystem {
return true;
}
@NotNull
@Override
protected String extractRootPath(@NotNull final String path) {
//return path.startsWith("/") ? "/" : "";
@@ -30,6 +30,7 @@ import com.intellij.util.ArrayUtil;
import com.intellij.util.SystemProperties;
import com.intellij.util.containers.ConcurrentHashSet;
import com.intellij.util.messages.MessageBus;
import gnu.trove.THashMap;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -38,7 +39,10 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class JarFileSystemImpl extends JarFileSystem implements ApplicationComponent {
private static final class JarFileSystemImplLock { }
@@ -47,7 +51,7 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo
private final Set<String> myNoCopyJarPaths =
SystemProperties.getBooleanProperty("idea.jars.nocopy", false) ? null : new ConcurrentHashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
private File myNoCopyJarDir;
private final Map<String, JarHandler> myHandlers = new HashMap<String, JarHandler>();
private final Map<String, JarHandler> myHandlers = new THashMap<String, JarHandler>(FileUtil.PATH_HASHING_STRATEGY);
private String[] jarPathsCache;
public JarFileSystemImpl(MessageBus bus) {
@@ -214,6 +218,7 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo
return super.extractPresentableUrl(StringUtil.trimEnd(path, JAR_SEPARATOR));
}
@NotNull
@Override
protected String extractRootPath(@NotNull final String path) {
final int jarSeparatorIndex = path.indexOf(JAR_SEPARATOR);
@@ -584,6 +584,7 @@ public abstract class LocalFileSystemBase extends LocalFileSystem {
}
}
@NotNull
@Override
protected String extractRootPath(@NotNull final String path) {
if (path.isEmpty()) {
@@ -164,6 +164,7 @@ public class MockLocalFileSystem extends LocalFileSystem {
return myDelegate.copyFile(requestor, virtualFile, newParent, copyName);
}
@NotNull
@Override
protected String extractRootPath(@NotNull final String path) {
return path;
@@ -19,6 +19,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Disposer;
import com.intellij.ui.table.JBTable;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -62,6 +63,7 @@ public class DirDiffDialog extends DialogWrapper {
return myDiffPanel.getTable();
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{};
@@ -39,6 +39,7 @@ import com.intellij.ui.ScrollPaneFactory;
import com.intellij.util.EditSourceOnDoubleClickHandler;
import com.intellij.util.EditSourceOnEnterKeyHandler;
import com.intellij.util.ui.tree.TreeUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.DefaultTreeModel;
@@ -89,6 +90,7 @@ public class UnversionedViewDialog extends DialogWrapper {
myView.setMinimumSize(new Dimension(100, 100));
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction()};
@@ -21,6 +21,7 @@ import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.vcs.VcsShowConfirmationOption;
import com.intellij.util.ui.OptionsDialog;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -72,6 +73,7 @@ public class VcsConfirmationDialog extends OptionsDialog {
return myDoNotShowMessage;
}
@NotNull
@Override
protected Action[] createActions() {
final AbstractAction okAction = new AbstractAction(CommonBundle.getYesButtonText()) {
@@ -25,6 +25,7 @@ import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
import com.intellij.util.AsynchConsumer;
import com.intellij.util.Consumer;
import com.intellij.util.ui.AdjustComponentWhenShown;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -138,6 +139,7 @@ public class ChangesBrowserDialog extends DialogWrapper {
}
}
@NotNull
@Override
protected Action[] createActions() {
if (myMode == Mode.Simple) {
@@ -25,6 +25,7 @@ import com.intellij.openapi.vcs.changes.ChangeListManagerImpl;
import com.intellij.openapi.vcs.readOnlyHandler.FileListRenderer;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.CollectionListModel;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.event.ActionEvent;
@@ -99,6 +100,7 @@ public class ChangelistConflictDialog extends DialogWrapper {
return ChangelistConflictResolution.IGNORE;
}
@NotNull
@Override
protected Action[] createLeftSideActions() {
return new Action[] { new AbstractAction("&Configure...") {
@@ -244,6 +244,7 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
};
}
@NotNull
@Override
protected Action[] createActions() {
if (myExecutors.isEmpty()) {
@@ -45,6 +45,7 @@ import com.intellij.ui.SeparatorFactory;
import com.intellij.util.NotNullFunction;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -208,6 +209,7 @@ public class ChangeListViewerDialog extends DialogWrapper implements DataProvide
super.dispose();
}
@NotNull
@Override
protected Action[] createActions() {
Action cancelAction = getCancelAction();
@@ -21,6 +21,7 @@ import com.intellij.openapi.ui.MultiLineLabelUI;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vcs.VcsConfiguration;
import com.intellij.util.ui.OptionsDialog;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
@@ -39,6 +40,7 @@ public class ChangelistMoveOfferDialog extends OptionsDialog {
init();
}
@NotNull
protected Action[] createActions() {
setOKButtonText(CommonBundle.getYesButtonText());
setCancelButtonText(CommonBundle.getNoButtonText());
@@ -598,11 +598,13 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj
}
}
@NotNull
@Override
protected Action getOKAction() {
return new CommitAction();
}
@NotNull
protected Action[] createActions() {
final List<Action> actions = new ArrayList<Action>();
@@ -30,6 +30,7 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.DocumentAdapter;
import com.intellij.util.ArrayUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -91,6 +92,7 @@ public class IgnoreUnversionedDialog extends DialogWrapper {
updateControls();
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -27,6 +27,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.vcs.VcsBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -47,6 +48,7 @@ public class IgnoredSettingsDialog extends DialogWrapper {
return myPanel.createComponent();
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getOKAction(), getCancelAction(), getHelpAction()};
@@ -137,6 +137,7 @@ public class VcsMappingConfigurationDialog extends DialogWrapper {
pack();
}
@NotNull
@Override
protected Action[] createLeftSideActions() {
return new Action[] { new ConfigureVcsAction() };
@@ -41,6 +41,7 @@ import com.intellij.util.ui.ColumnInfo;
import com.intellij.util.ui.ListTableModel;
import com.intellij.util.ui.SortableColumnModel;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -418,6 +419,7 @@ public class VcsHistoryDialog extends DialogWrapper implements DataProvider {
HelpManager.getInstance().invokeHelp(myHelpId);
}
@NotNull
protected Action[] createActions() {
Action okAction = getOKAction();
okAction.putValue(Action.NAME, VcsBundle.message("close.tab.action.name"));
@@ -191,11 +191,13 @@ public class MultipleFileMergeDialog extends DialogWrapper {
return myRootPanel;
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getCancelAction()};
}
@NotNull
@Override
protected Action getCancelAction() {
Action action = super.getCancelAction();

Some files were not shown because too many files have changed in this diff Show More