mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
@Nullable return type of UnnamedConfigurable#getPreferredFocusedComponent
GitOrigin-RevId: e7bab0c92655e8b0eb0ed11fe22d5d6e4f6d48e8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
726f21a3ae
commit
7499ddf2cd
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.compiler.server.BuildManager;
|
||||
@@ -665,7 +665,7 @@ public class ProjectStructureConfigurable implements SearchableConfigurable, Pla
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myToFocus;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.jsonSchema;
|
||||
|
||||
import com.intellij.json.JsonBundle;
|
||||
@@ -64,7 +64,7 @@ public class JsonSchemaCatalogConfigurable implements Configurable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myCatalogCheckBox;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.intention.impl.config;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightBundle;
|
||||
@@ -9,6 +9,7 @@ import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -51,7 +52,7 @@ public final class IntentionSettingsConfigurable implements SearchableConfigurab
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myPanel == null ? null : myPanel.getIntentionTree();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.packageDependencies.ui;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightBundle;
|
||||
@@ -17,6 +17,7 @@ import com.intellij.psi.search.scope.packageSet.PackageSet;
|
||||
import com.intellij.ui.ToolbarDecorator;
|
||||
import com.intellij.ui.table.TableView;
|
||||
import com.intellij.util.ui.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
@@ -85,7 +86,7 @@ public class DependencyConfigurable implements Configurable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myDenyTable;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.profile.codeInspection.ui.header;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightBundle;
|
||||
@@ -21,6 +21,7 @@ import com.intellij.util.Alarm;
|
||||
import com.intellij.util.ui.JBInsets;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -233,7 +234,7 @@ public abstract class InspectionToolsConfigurable implements ErrorsConfigurable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
final SingleInspectionProfilePanel panel = getSelectedPanel();
|
||||
return panel == null ? null : panel.getPreferredFocusedComponent();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.options;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public abstract class BaseConfigurable implements Configurable {
|
||||
@@ -17,7 +19,7 @@ public abstract class BaseConfigurable implements Configurable {
|
||||
|
||||
// defined here for backward-compatibility
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.openapi.options;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
@@ -79,7 +79,7 @@ public abstract class ConfigurableBase<UI extends ConfigurableUi<S>, S> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return ui != null ? ui.getPreferredFocusedComponent() : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public interface UnnamedConfigurable {
|
||||
/**
|
||||
* @return component which should be focused when the dialog appears on the screen.
|
||||
*/
|
||||
default JComponent getPreferredFocusedComponent() {
|
||||
default @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.tasks.config;
|
||||
|
||||
import com.intellij.ide.DataManager;
|
||||
@@ -202,7 +202,7 @@ public class TaskRepositoriesConfigurable implements Configurable.NoScroll, Sear
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myRepositoriesList;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.javaee;
|
||||
|
||||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||||
@@ -8,6 +8,7 @@ import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.xml.XmlBundle;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -40,7 +41,7 @@ public class XMLCatalogConfigurable implements Configurable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
public @Nullable JComponent getPreferredFocusedComponent() {
|
||||
return myPropertyFile.getTextField();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user