From d263e30396a7b477bf11f91dcd9bd5ed07d64b41 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Mon, 8 Jul 2024 11:58:56 +0200 Subject: [PATCH] Remove raw types in PopupStep#onChosen inheritors GitOrigin-RevId: df36f1a249ab4d87c2d10e3d39c27f0351298921 --- .../compiler/actions/BuildArtifactAction.java | 2 +- .../memory/ui/ExpressionEditorWithHistory.java | 2 +- .../actions/AbstractAddToTestsPatternAction.java | 2 +- .../artifacts/ArtifactErrorPanel.java | 2 +- .../actions/SurroundElementWithAction.java | 2 +- .../classpath/ClasspathPanelImpl.java | 2 +- .../libraries/LibraryEditingUtil.java | 2 +- .../FindUsagesInProjectStructureActionBase.java | 2 +- .../daemon/ProjectConfigurationProblem.java | 2 +- .../ExternalAnnotationsManagerImpl.java | 2 +- .../intention/impl/AnnotateIntentionAction.java | 2 +- .../mappings/JsonSchemaMappingsView.java | 4 ++-- .../widget/JsonSchemaInfoPopupStep.java | 2 +- .../actions/ChooseRunConfigurationPopup.java | 6 +++--- .../compound/ConfigurationSelectionUtil.java | 2 +- .../update/UpdateRunningApplicationAction.java | 2 +- .../task/ui/ConfigureTasksActivationDialog.java | 8 ++++---- .../lookup/impl/LookupActionsStep.java | 2 +- .../find/impl/ShowRecentFindUsagesAction.java | 2 +- .../exclude/DetectionExcludesConfigurable.java | 6 +++--- .../ide/actions/ExternalJavaDocAction.java | 2 +- .../com/intellij/ide/actions/SelectInAction.java | 4 ++-- .../openapi/ui/popup/util/BaseTreePopupStep.java | 2 +- .../ui/popup/MultiSelectionListPopupStep.java | 2 +- .../com/intellij/ui/popup/PopupFactoryImpl.java | 2 +- .../intellij/ui/popup/list/ComboBoxPopup.java | 3 +-- .../patch/ApplyPatchDifferentiatedDialog.java | 6 +++--- .../xdebugger/impl/XDebuggerUtilImpl.java | 2 +- .../impl/actions/AttachToProcessActionBase.java | 16 +++++++--------- .../handlers/XDebuggerSmartStepIntoHandler.java | 4 ++-- .../quickfix/PluginDescriptorChooser.java | 2 +- .../quickfix/RegisterExtensionFix.java | 2 +- .../src/git4idea/push/GitPushTargetPanel.java | 2 +- .../AnnotateCapitalizationIntention.java | 2 +- .../idea/svn/branchConfig/SelectBranchPopup.java | 2 +- .../intellij/tasks/config/TaskConfigurable.java | 2 +- .../inspection/AbstractQuickFixManager.java | 4 ++-- .../uiDesigner/actions/PaletteListPopupStep.java | 2 +- .../inspections/FormSpellCheckingInspection.java | 2 +- .../uiDesigner/quickFixes/QuickFixManager.java | 10 +++++----- .../python/run/PythonRunConfigurationForm.java | 2 +- .../python/sdk/PythonSdkDetailsStep.java | 2 +- .../highlighting/ResolvingElementQuickFix.java | 2 +- 43 files changed, 66 insertions(+), 69 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/actions/BuildArtifactAction.java b/java/compiler/impl/src/com/intellij/compiler/actions/BuildArtifactAction.java index 74a8f332999c..9fe9e0775d58 100644 --- a/java/compiler/impl/src/com/intellij/compiler/actions/BuildArtifactAction.java +++ b/java/compiler/impl/src/com/intellij/compiler/actions/BuildArtifactAction.java @@ -358,7 +358,7 @@ public final class BuildArtifactAction extends DumbAwareAction { } @Override - public PopupStep onChosen(ArtifactActionItem selectedValue, boolean finalChoice) { + public PopupStep onChosen(ArtifactActionItem selectedValue, boolean finalChoice) { return doFinalStep(selectedValue); } }; diff --git a/java/debugger/impl/src/com/intellij/debugger/memory/ui/ExpressionEditorWithHistory.java b/java/debugger/impl/src/com/intellij/debugger/memory/ui/ExpressionEditorWithHistory.java index 168eb1a4e9f0..4a62d6853fdc 100644 --- a/java/debugger/impl/src/com/intellij/debugger/memory/ui/ExpressionEditorWithHistory.java +++ b/java/debugger/impl/src/com/intellij/debugger/memory/ui/ExpressionEditorWithHistory.java @@ -70,7 +70,7 @@ class ExpressionEditorWithHistory extends XDebuggerExpressionEditor { if (!expressions.isEmpty()) { ListPopupImpl historyPopup = new ListPopupImpl(getProject(), new BaseListPopupStep<>(null, expressions) { @Override - public PopupStep onChosen(XExpression selectedValue, boolean finalChoice) { + public PopupStep onChosen(XExpression selectedValue, boolean finalChoice) { setExpression(selectedValue); requestFocusInEditor(); return FINAL_CHOICE; diff --git a/java/execution/impl/src/com/intellij/execution/actions/AbstractAddToTestsPatternAction.java b/java/execution/impl/src/com/intellij/execution/actions/AbstractAddToTestsPatternAction.java index 98657debc38c..37e01efba722 100644 --- a/java/execution/impl/src/com/intellij/execution/actions/AbstractAddToTestsPatternAction.java +++ b/java/execution/impl/src/com/intellij/execution/actions/AbstractAddToTestsPatternAction.java @@ -59,7 +59,7 @@ public abstract class AbstractAddToTestsPatternAction(JavaCompilerBundle.message("popup.title.choose.suite.to.add"), patternConfigurations) { @Override - public PopupStep onChosen(T configuration, boolean finalChoice) { + public PopupStep onChosen(T configuration, boolean finalChoice) { for (PsiElement aClass : classes) { String qName = getPatternBasedProducer().getQName(aClass); if (qName != null) { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactErrorPanel.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactErrorPanel.java index 2e3fcb2a1d48..c171a46fd25e 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactErrorPanel.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactErrorPanel.java @@ -59,7 +59,7 @@ public final class ArtifactErrorPanel { } @Override - public PopupStep onChosen(ConfigurationErrorQuickFix selectedValue, boolean finalChoice) { + public PopupStep onChosen(ConfigurationErrorQuickFix selectedValue, boolean finalChoice) { performFix(selectedValue, artifactEditor); return FINAL_CHOICE; } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/actions/SurroundElementWithAction.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/actions/SurroundElementWithAction.java index dda7d830e0d5..c05197657f4a 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/actions/SurroundElementWithAction.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/actions/SurroundElementWithAction.java @@ -83,7 +83,7 @@ public class SurroundElementWithAction extends LayoutTreeActionBase { } @Override - public PopupStep onChosen(final CompositePackagingElementType selectedValue, boolean finalChoice) { + public PopupStep onChosen(final CompositePackagingElementType selectedValue, boolean finalChoice) { return doFinalStep(() -> surroundWith(selectedValue, parent, selected, treeComponent)); } }).showInBestPositionFor(e.getDataContext()); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/ClasspathPanelImpl.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/ClasspathPanelImpl.java index 589b7ab107e2..f6f719a27782 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/ClasspathPanelImpl.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/classpath/ClasspathPanelImpl.java @@ -373,7 +373,7 @@ public final class ClasspathPanelImpl extends JPanel implements ClasspathPanel { } @Override - public PopupStep onChosen(final AddItemPopupAction selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final AddItemPopupAction selectedValue, final boolean finalChoice) { if (selectedValue.hasSubStep()) { return selectedValue.createSubStep(); } diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/LibraryEditingUtil.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/LibraryEditingUtil.java index 49c2f6626e4c..47f983a90e3c 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/LibraryEditingUtil.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/LibraryEditingUtil.java @@ -169,7 +169,7 @@ public final class LibraryEditingUtil { } @Override - public PopupStep onChosen(final TypeForNewLibrary selectedValue, boolean finalChoice) { + public PopupStep onChosen(final TypeForNewLibrary selectedValue, boolean finalChoice) { return doFinalStep(() -> action.run(selectedValue.getType())); } }; diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FindUsagesInProjectStructureActionBase.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FindUsagesInProjectStructureActionBase.java index f875df96c6ec..090e200049af 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FindUsagesInProjectStructureActionBase.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/FindUsagesInProjectStructureActionBase.java @@ -78,7 +78,7 @@ public abstract class FindUsagesInProjectStructureActionBase extends AnAction im BaseListPopupStep step = new BaseListPopupStep<>(JavaUiBundle.message("dependencies.used.in.popup.title"), usagesArray) { @Override - public PopupStep onChosen(final ProjectStructureElementUsage selected, final boolean finalChoice) { + public PopupStep onChosen(final ProjectStructureElementUsage selected, final boolean finalChoice) { PlaceInProjectStructure place = selected.getPlace(); if (place.canNavigate()) { place.navigate(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectConfigurationProblem.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectConfigurationProblem.java index e3c55ead8b96..1542d52d70d4 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectConfigurationProblem.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectConfigurationProblem.java @@ -83,7 +83,7 @@ public class ProjectConfigurationProblem extends ConfigurationError { } @Override - public PopupStep onChosen(final ConfigurationErrorQuickFix selectedValue, boolean finalChoice) { + public PopupStep onChosen(final ConfigurationErrorQuickFix selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.performFix()); } }).show(relativePoint); diff --git a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java index 1703ef1f36d2..a88bb850f12e 100644 --- a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java +++ b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java @@ -556,7 +556,7 @@ public final class ExternalAnnotationsManagerImpl extends ModCommandAwareExterna } @Override - public PopupStep onChosen(@NotNull VirtualFile file, final boolean finalChoice) { + public PopupStep onChosen(@NotNull VirtualFile file, final boolean finalChoice) { annotateExternally(file, annotation); return FINAL_CHOICE; } diff --git a/java/java-impl/src/com/intellij/codeInsight/intention/impl/AnnotateIntentionAction.java b/java/java-impl/src/com/intellij/codeInsight/intention/impl/AnnotateIntentionAction.java index 068b38e14f25..8c0802763a50 100644 --- a/java/java-impl/src/com/intellij/codeInsight/intention/impl/AnnotateIntentionAction.java +++ b/java/java-impl/src/com/intellij/codeInsight/intention/impl/AnnotateIntentionAction.java @@ -119,7 +119,7 @@ public final class AnnotateIntentionAction extends BaseIntentionAction implement JBPopupFactory.getInstance().createListPopup( new BaseListPopupStep<>(JavaBundle.message("annotate.intention.chooser.title"), annotations) { @Override - public PopupStep onChosen(final AnnotationProvider selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final AnnotationProvider selectedValue, final boolean finalChoice) { return doFinalStep(() -> ReadAction.nonBlocking(() -> selectedValue.createFix(owner, place)) .finishOnUiThread(ModalityState.current(), fix -> fix.invoke(project, editor, file)) .submit(AppExecutorUtil.getAppExecutorService())); diff --git a/json/src/com/jetbrains/jsonSchema/settings/mappings/JsonSchemaMappingsView.java b/json/src/com/jetbrains/jsonSchema/settings/mappings/JsonSchemaMappingsView.java index 0c79bddc496f..6e035b57bf1a 100644 --- a/json/src/com/jetbrains/jsonSchema/settings/mappings/JsonSchemaMappingsView.java +++ b/json/src/com/jetbrains/jsonSchema/settings/mappings/JsonSchemaMappingsView.java @@ -301,11 +301,11 @@ public final class JsonSchemaMappingsView implements Disposable { } @Override - public PopupStep onChosen(JsonMappingKind selectedValue, boolean finalChoice) { + public PopupStep onChosen(JsonMappingKind selectedValue, boolean finalChoice) { if (finalChoice) { return doFinalStep(() -> doRun(selectedValue)); } - return PopupStep.FINAL_CHOICE; + return FINAL_CHOICE; } }).show(point); } diff --git a/json/src/com/jetbrains/jsonSchema/widget/JsonSchemaInfoPopupStep.java b/json/src/com/jetbrains/jsonSchema/widget/JsonSchemaInfoPopupStep.java index 5fe0d7c3858c..075cbec2decf 100644 --- a/json/src/com/jetbrains/jsonSchema/widget/JsonSchemaInfoPopupStep.java +++ b/json/src/com/jetbrains/jsonSchema/widget/JsonSchemaInfoPopupStep.java @@ -95,7 +95,7 @@ public class JsonSchemaInfoPopupStep extends BaseListPopupStep i } @Override - public PopupStep onChosen(JsonSchemaInfo selectedValue, boolean finalChoice) { + public PopupStep onChosen(JsonSchemaInfo selectedValue, boolean finalChoice) { if (finalChoice) { if (selectedValue == EDIT_MAPPINGS || selectedValue == ADD_MAPPING) { return doFinalStep(() -> runSchemaEditorForCurrentFile()); diff --git a/platform/execution-impl/src/com/intellij/execution/actions/ChooseRunConfigurationPopup.java b/platform/execution-impl/src/com/intellij/execution/actions/ChooseRunConfigurationPopup.java index 5a346ef17e34..c458aa1fe87d 100644 --- a/platform/execution-impl/src/com/intellij/execution/actions/ChooseRunConfigurationPopup.java +++ b/platform/execution-impl/src/com/intellij/execution/actions/ChooseRunConfigurationPopup.java @@ -504,7 +504,7 @@ public final class ChooseRunConfigurationPopup implements ExecutorProvider { } @Override - public PopupStep onChosen(final ItemWrapper wrapper, boolean finalChoice) { + public PopupStep onChosen(final ItemWrapper wrapper, boolean finalChoice) { if (myAction.myEditConfiguration) { final Object o = wrapper.getValue(); if (o instanceof RunnerAndConfigurationSettingsImpl) { @@ -667,7 +667,7 @@ public final class ChooseRunConfigurationPopup implements ExecutorProvider { } @Override - public PopupStep onChosen(final ActionWrapper selectedValue, boolean finalChoice) { + public PopupStep onChosen(final ActionWrapper selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.perform()); } @@ -896,7 +896,7 @@ public final class ChooseRunConfigurationPopup implements ExecutorProvider { } @Override - public PopupStep onChosen(final ConfigurationActionsStep selectedValue, boolean finalChoice) { + public PopupStep onChosen(final ConfigurationActionsStep selectedValue, boolean finalChoice) { if (finalChoice) { if (myPopup.myEditConfiguration) { final RunnerAndConfigurationSettings settings = selectedValue.getSettings(); diff --git a/platform/execution-impl/src/com/intellij/execution/compound/ConfigurationSelectionUtil.java b/platform/execution-impl/src/com/intellij/execution/compound/ConfigurationSelectionUtil.java index e46a9f7cb5ae..d918bdf0ae2d 100644 --- a/platform/execution-impl/src/com/intellij/execution/compound/ConfigurationSelectionUtil.java +++ b/platform/execution-impl/src/com/intellij/execution/compound/ConfigurationSelectionUtil.java @@ -81,7 +81,7 @@ public final class ConfigurationSelectionUtil { } @Override - public PopupStep onChosen(ExecutionTarget selectedTarget, boolean finalChoice) { + public PopupStep onChosen(ExecutionTarget selectedTarget, boolean finalChoice) { onSelected.accept(selectedConfigs, selectedTarget); return FINAL_CHOICE; } diff --git a/platform/execution-impl/src/com/intellij/execution/update/UpdateRunningApplicationAction.java b/platform/execution-impl/src/com/intellij/execution/update/UpdateRunningApplicationAction.java index da45dfd817df..ede162dcc754 100644 --- a/platform/execution-impl/src/com/intellij/execution/update/UpdateRunningApplicationAction.java +++ b/platform/execution-impl/src/com/intellij/execution/update/UpdateRunningApplicationAction.java @@ -124,7 +124,7 @@ final class UpdateRunningApplicationAction extends AnAction { } @Override - public PopupStep onChosen(final RunningApplicationUpdater selectedValue, boolean finalChoice) { + public PopupStep onChosen(final RunningApplicationUpdater selectedValue, boolean finalChoice) { return doFinalStep(() -> selectedValue.performUpdate(e)); } }); diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ConfigureTasksActivationDialog.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ConfigureTasksActivationDialog.java index 6da6a4cdfcdf..2f24c5a6d8ce 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ConfigureTasksActivationDialog.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ConfigureTasksActivationDialog.java @@ -139,7 +139,7 @@ public final class ConfigureTasksActivationDialog extends DialogWrapper { final ChooseProjectStep projectStep = new ChooseProjectStep(popupItems); final List projectItems = projectStep.getValues(); - ListPopupStep step = projectItems.size() == 1 ? (ListPopupStep)projectStep.onChosen(projectItems.get(0), false) : projectStep; + ListPopupStep step = projectItems.size() == 1 ? (ListPopupStep)projectStep.onChosen(projectItems.get(0), false) : projectStep; assert step != null; JBPopupFactory.getInstance().createListPopup(step).show( ObjectUtils.notNull(button.getPreferredPopupPoint(), RelativePoint.getSouthEastOf(projectCombobox))); @@ -368,10 +368,10 @@ public final class ConfigureTasksActivationDialog extends DialogWrapper { } @Override - public PopupStep onChosen(final ProjectPopupItem projectPopupItem, final boolean finalChoice) { + public PopupStep onChosen(final ProjectPopupItem projectPopupItem, final boolean finalChoice) { return new BaseListPopupStep<>(ExternalSystemBundle.message("popup.title.choose.activation.phase"), Phase.values()) { @Override - public PopupStep onChosen(final Phase selectedPhase, boolean finalChoice) { + public PopupStep onChosen(final Phase selectedPhase, boolean finalChoice) { final Map activationMap = ExternalProjectsManagerImpl.getInstance(myProject).getStateProvider().getProjectsTasksActivationMap(myProjectSystemId); final String projectPath = projectPopupItem.myModuleData.getLinkedExternalProjectPath(); @@ -381,7 +381,7 @@ public final class ConfigureTasksActivationDialog extends DialogWrapper { tasksToSuggest.removeAll(tasks); return new BaseListPopupStep<>(ExternalSystemBundle.message("popup.title.choose.task"), tasksToSuggest) { @Override - public PopupStep onChosen(final String taskName, boolean finalChoice) { + public PopupStep onChosen(final String taskName, boolean finalChoice) { return doFinalStep(() -> { myTaskActivator.addTask(new TaskActivationEntry(myProjectSystemId, selectedPhase, projectPath, taskName)); updateTree(myRootNode); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionsStep.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionsStep.java index 01ed3c88a9a0..baeb47cb756b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionsStep.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupActionsStep.java @@ -38,7 +38,7 @@ public final class LookupActionsStep extends BaseListPopupStep onChosen(LookupElementAction selectedValue, boolean finalChoice) { UIEventLogger.LookupExecuteElementAction.log(myLookup.getProject()); final LookupElementAction.Result result = selectedValue.performLookupAction(); diff --git a/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesAction.java b/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesAction.java index ef28bd8e748f..2ecfcce3166a 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesAction.java +++ b/platform/lang-impl/src/com/intellij/find/impl/ShowRecentFindUsagesAction.java @@ -70,7 +70,7 @@ public final class ShowRecentFindUsagesAction extends AnAction implements Action } @Override - public PopupStep onChosen(final ConfigurableUsageTarget selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final ConfigurableUsageTarget selectedValue, final boolean finalChoice) { return doFinalStep(() -> { if (selectedValue != null) { findUsagesManager.rerunAndRecallFromHistory(selectedValue); diff --git a/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java b/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java index e0ace9da3aee..3875c635dc3b 100644 --- a/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java +++ b/platform/lang-impl/src/com/intellij/framework/detection/impl/exclude/DetectionExcludesConfigurable.java @@ -146,7 +146,7 @@ public final class DetectionExcludesConfigurable implements Configurable { } @Override - public PopupStep onChosen(final FrameworkType frameworkType, boolean finalChoice) { + public PopupStep onChosen(final FrameworkType frameworkType, boolean finalChoice) { if (frameworkType == null) { return doFinalStep(() -> chooseDirectoryAndAdd(null)); } @@ -168,11 +168,11 @@ public final class DetectionExcludesConfigurable implements Configurable { return false; } - private PopupStep addExcludedFramework(final @NotNull FrameworkType frameworkType) { + private PopupStep addExcludedFramework(final @NotNull FrameworkType frameworkType) { String projectItem = LangBundle.message("list.item.disable.framework.detection.in.whole.project"); return new BaseListPopupStep<>(null, projectItem, LangBundle.message("list.item.disable.framework.detection.in.directory")) { @Override - public PopupStep onChosen(String selectedValue, boolean finalChoice) { + public PopupStep onChosen(String selectedValue, boolean finalChoice) { if (selectedValue.equals(projectItem)) { addAndRemoveDuplicates(frameworkType, null); return FINAL_CHOICE; diff --git a/platform/lang-impl/src/com/intellij/ide/actions/ExternalJavaDocAction.java b/platform/lang-impl/src/com/intellij/ide/actions/ExternalJavaDocAction.java index 4e7c40bf52a8..5ee488a3eba8 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/ExternalJavaDocAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/ExternalJavaDocAction.java @@ -111,7 +111,7 @@ public final class ExternalJavaDocAction extends AnAction { LangBundle.message("popup.title.choose.external.documentation.root"), ArrayUtilRt.toStringArray(finalUrls)) { @Override - public PopupStep onChosen(final String selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final String selectedValue, final boolean finalChoice) { BrowserUtil.browse(selectedValue); return FINAL_CHOICE; } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SelectInAction.java b/platform/lang-impl/src/com/intellij/ide/actions/SelectInAction.java index e4104da951d8..7e0db3720e9d 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SelectInAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SelectInAction.java @@ -138,7 +138,7 @@ public final class SelectInAction extends DumbAwareAction implements PerformWith @DirtyUI @Override - public PopupStep onChosen(final SelectInTarget target, final boolean finalChoice) { + public PopupStep onChosen(final SelectInTarget target, final boolean finalChoice) { if (finalChoice) { PsiDocumentManager.getInstance(mySelectInContext.getProject()).commitAllDocuments(); target.selectIn(mySelectInContext, true); @@ -146,7 +146,7 @@ public final class SelectInAction extends DumbAwareAction implements PerformWith } if (target instanceof CompositeSelectInTarget) { final ArrayList subTargets = new ArrayList<>(((CompositeSelectInTarget)target).getSubTargets(mySelectInContext)); - if (subTargets.size() > 0) { + if (!subTargets.isEmpty()) { subTargets.sort(new SelectInManager.SelectInTargetComparator()); return new SelectInActionsStep(subTargets, mySelectInContext); } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/util/BaseTreePopupStep.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/util/BaseTreePopupStep.java index 063e268f10e3..6b3a2e52f056 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/util/BaseTreePopupStep.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/util/BaseTreePopupStep.java @@ -54,7 +54,7 @@ public class BaseTreePopupStep extends BaseStep implements TreePopupStep onChosen(T selectedValue, final boolean finalChoice) { return FINAL_CHOICE; } diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/popup/MultiSelectionListPopupStep.java b/platform/platform-impl/src/com/intellij/openapi/ui/popup/MultiSelectionListPopupStep.java index 0c4f07f35b42..2c5ef0b6eb51 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/popup/MultiSelectionListPopupStep.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/popup/MultiSelectionListPopupStep.java @@ -23,7 +23,7 @@ public abstract class MultiSelectionListPopupStep extends BaseListPopupStep onChosen(T selectedValue, boolean finalChoice) { return onChosen(Collections.singletonList(selectedValue), finalChoice); } diff --git a/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java b/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java index 2461bbceebfb..0ccf0bab6348 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/PopupFactoryImpl.java @@ -145,7 +145,7 @@ public class PopupFactoryImpl extends JBPopupFactory { BaseListPopupStep step = new BaseListPopupStep<>(title, yesText, noText) { boolean myRunYes; @Override - public PopupStep onChosen(String selectedValue, final boolean finalChoice) { + public PopupStep onChosen(String selectedValue, final boolean finalChoice) { myRunYes = selectedValue.equals(yesText); return FINAL_CHOICE; } diff --git a/platform/platform-impl/src/com/intellij/ui/popup/list/ComboBoxPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/list/ComboBoxPopup.java index d10236388fcc..5483117d2eee 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/list/ComboBoxPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/list/ComboBoxPopup.java @@ -215,8 +215,7 @@ public class ComboBoxPopup extends ListPopupImpl { } @Override - @SuppressWarnings("rawtypes") - public @Nullable PopupStep onChosen(T selectedValue, boolean finalChoice) { + public @Nullable PopupStep onChosen(T selectedValue, boolean finalChoice) { ListModel model = myGetComboboxModel.get(); if (model instanceof ComboBoxPopupState) { //noinspection unchecked diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java index 4956b4d7986b..c4efa429393a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java @@ -876,9 +876,9 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper { return null; } final List selectedChanges = myChangesTreeList.getSelectedChanges(); - if (selectedChanges.size() >= 1) { + if (!selectedChanges.isEmpty()) { for (AbstractFilePatchInProgress.PatchChange patchChange : selectedChanges) { - final AbstractFilePatchInProgress patch = patchChange.getPatchInProgress(); + final AbstractFilePatchInProgress patch = patchChange.getPatchInProgress(); patch.setNewBase(selectedValue); } updateTree(false); @@ -1006,7 +1006,7 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper { @Override public void decorate(@NotNull Change change, @NotNull SimpleColoredComponent component, boolean isShowFlatten) { if (change instanceof AbstractFilePatchInProgress.PatchChange patchChange) { - final AbstractFilePatchInProgress patchInProgress = patchChange.getPatchInProgress(); + final AbstractFilePatchInProgress patchInProgress = patchChange.getPatchInProgress(); if (patchInProgress.getCurrentStrip() > 0) { component.append(VcsBundle.message("patch.apply.stripped.description", patchInProgress.getCurrentStrip()), SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES); diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java index 854c9adf8ded..e378b69c572b 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java @@ -431,7 +431,7 @@ public class XDebuggerUtilImpl extends XDebuggerUtil { } @Override - public PopupStep onChosen(final XLineBreakpointType.XLineBreakpointVariant selectedValue, boolean finalChoice) { + public PopupStep onChosen(final XLineBreakpointType.XLineBreakpointVariant selectedValue, boolean finalChoice) { selectionListener.clearHighlighter(); addLineBreakpoint(res, breakpointManager, selectedValue, file, line, temporary); return FINAL_CHOICE; diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/AttachToProcessActionBase.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/AttachToProcessActionBase.java index d62fd13774a9..0c20dd3f071f 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/AttachToProcessActionBase.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/AttachToProcessActionBase.java @@ -45,7 +45,6 @@ import javax.swing.event.ListSelectionListener; import java.time.Instant; import java.util.*; import java.util.function.Supplier; -import java.util.stream.Collectors; public abstract class AttachToProcessActionBase extends AnAction implements DumbAware { private static final Key>> RECENT_ITEMS_KEY = @@ -106,7 +105,7 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb AttachListStep step = new AttachListStep(allItems, XDebuggerBundle.message("xdebugger.attach.popup.title.default"), project); final ListPopup popup = JBPopupFactory.getInstance().createListPopup(step); - final JList mainList = ((ListPopupImpl) ListPopupWrapper.getRootPopup(popup)).getList(); + final JList mainList = ((ListPopupImpl) ListPopupWrapper.getRootPopup(popup)).getList(); ListSelectionListener listener = event -> { if (event.getValueIsAdjusting()) return; @@ -141,8 +140,7 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb } protected List> getAvailableHosts() { - return XAttachHostProvider.EP.getExtensionList().stream().map(provider -> (XAttachHostProvider) provider).collect( - Collectors.toList()); + return ContainerUtil.map(XAttachHostProvider.EP.getExtensionList(), provider -> (XAttachHostProvider)provider); } @NotNull @@ -634,7 +632,7 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb } @Override - public PopupStep onChosen(T selectedValue, boolean finalChoice) { + public PopupStep onChosen(T selectedValue, boolean finalChoice) { return null; } } @@ -679,7 +677,7 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb } @Override - public PopupStep onChosen(AttachItem selectedValue, boolean finalChoice) { + public PopupStep onChosen(AttachItem selectedValue, boolean finalChoice) { if (selectedValue instanceof AttachToProcessItem attachToProcessItem) { if (finalChoice) { addToRecent(myProject, attachToProcessItem); @@ -691,12 +689,12 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb } if (selectedValue instanceof AttachHostItem attachHostItem) { - AsyncPromise promise = new AsyncPromise<>(); + AsyncPromise> promise = new AsyncPromise<>(); ApplicationManager.getApplication().executeOnPooledThread(() -> { List attachItems = new ArrayList<>(attachHostItem.getSubItems()); ApplicationManager.getApplication().invokeLater(() -> promise.setResult(new AttachListStep(attachItems, null, myProject))); }); - return new AsyncPopupStep(promise); + return new AsyncPopupStep<>(promise); } return null; } @@ -719,7 +717,7 @@ public abstract class AttachToProcessActionBase extends AnAction implements Dumb } @Override - public PopupStep onChosen(AttachToProcessItem selectedValue, boolean finalChoice) { + public PopupStep onChosen(AttachToProcessItem selectedValue, boolean finalChoice) { addToRecent(myProject, selectedValue); return doFinalStep(() -> selectedValue.startDebugSession(myProject)); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerSmartStepIntoHandler.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerSmartStepIntoHandler.java index 51fe77f2de68..e700b1fa9eca 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerSmartStepIntoHandler.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerSmartStepIntoHandler.java @@ -169,7 +169,7 @@ public class XDebuggerSmartStepIntoHandler extends XDebuggerSuspendedActionHandl } @Override - public PopupStep onChosen(V selectedValue, boolean finalChoice) { + public PopupStep onChosen(V selectedValue, boolean finalChoice) { session.smartStepInto(handler, selectedValue); highlighter.dropHighlight(); return FINAL_CHOICE; @@ -216,7 +216,7 @@ public class XDebuggerSmartStepIntoHandler extends XDebuggerSuspendedActionHandl SmartStepData data = new SmartStepData<>(handler, variants, session, editor); EditorHyperlinkSupport hyperlinkSupport = EditorHyperlinkSupport.get(editor); - for (SmartStepData.VariantInfo info : data.myVariants) { + for (SmartStepData.VariantInfo info : data.myVariants) { TextRange range = info.myVariant.getHighlightRange(); if (range != null) { List highlighters = new SmartList<>(); diff --git a/plugins/devkit/devkit-core/src/inspections/quickfix/PluginDescriptorChooser.java b/plugins/devkit/devkit-core/src/inspections/quickfix/PluginDescriptorChooser.java index ab5131dbb887..fef25932cd4d 100644 --- a/plugins/devkit/devkit-core/src/inspections/quickfix/PluginDescriptorChooser.java +++ b/plugins/devkit/devkit-core/src/inspections/quickfix/PluginDescriptorChooser.java @@ -108,7 +108,7 @@ public final class PluginDescriptorChooser { } @Override - public PopupStep onChosen(PluginDescriptorCandidate selectedValue, boolean finalChoice) { + public PopupStep onChosen(PluginDescriptorCandidate selectedValue, boolean finalChoice) { consumer.consume(selectedValue.myDomFileElement); return FINAL_CHOICE; } diff --git a/plugins/devkit/devkit-core/src/inspections/quickfix/RegisterExtensionFix.java b/plugins/devkit/devkit-core/src/inspections/quickfix/RegisterExtensionFix.java index 0704c9e0dab7..882bf66a82f4 100644 --- a/plugins/devkit/devkit-core/src/inspections/quickfix/RegisterExtensionFix.java +++ b/plugins/devkit/devkit-core/src/inspections/quickfix/RegisterExtensionFix.java @@ -83,7 +83,7 @@ public class RegisterExtensionFix extends IntentionAndQuickFixAction { final BaseListPopupStep popupStep = new BaseListPopupStep<>(DevKitBundle.message("register.extension.fix.popup.title"), new ArrayList<>(myEPCandidates)) { @Override - public PopupStep onChosen(ExtensionPointCandidate selectedValue, boolean finalChoice) { + public PopupStep onChosen(ExtensionPointCandidate selectedValue, boolean finalChoice) { registerExtension(element, selectedValue, extensionClass); return FINAL_CHOICE; } diff --git a/plugins/git4idea/src/git4idea/push/GitPushTargetPanel.java b/plugins/git4idea/src/git4idea/push/GitPushTargetPanel.java index e2b7c32150cf..49661640bc40 100644 --- a/plugins/git4idea/src/git4idea/push/GitPushTargetPanel.java +++ b/plugins/git4idea/src/git4idea/push/GitPushTargetPanel.java @@ -212,7 +212,7 @@ public class GitPushTargetPanel extends PushTargetPanel { } ListPopup popup = new ListPopupImpl(myProject, new BaseListPopupStep<>(null, remotes) { @Override - public PopupStep onChosen(@NotNull PopupItem selectedValue, boolean finalChoice) { + public PopupStep onChosen(@NotNull PopupItem selectedValue, boolean finalChoice) { return doFinalStep(() -> { if (selectedValue.isDefineRemote()) { showDefineRemoteDialog(); diff --git a/plugins/java-i18n/src/com/intellij/codeInspection/capitalization/AnnotateCapitalizationIntention.java b/plugins/java-i18n/src/com/intellij/codeInspection/capitalization/AnnotateCapitalizationIntention.java index 82a8fb7d5ac6..5b0371de838b 100644 --- a/plugins/java-i18n/src/com/intellij/codeInspection/capitalization/AnnotateCapitalizationIntention.java +++ b/plugins/java-i18n/src/com/intellij/codeInspection/capitalization/AnnotateCapitalizationIntention.java @@ -58,7 +58,7 @@ public final class AnnotateCapitalizationIntention implements IntentionAction { BaseListPopupStep step = new BaseListPopupStep<>(null, Nls.Capitalization.Title, Nls.Capitalization.Sentence) { @Override - public PopupStep onChosen(final Nls.Capitalization selectedValue, boolean finalChoice) { + public PopupStep onChosen(final Nls.Capitalization selectedValue, boolean finalChoice) { WriteCommandAction.writeCommandAction(project).run(() -> { String nls = Nls.class.getName(); PsiAnnotation annotation = JavaPsiFacade.getInstance(project).getElementFactory() diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SelectBranchPopup.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SelectBranchPopup.java index ae6415d35ffd..228829f245e7 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SelectBranchPopup.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SelectBranchPopup.java @@ -133,7 +133,7 @@ public final class SelectBranchPopup { } @Override - public PopupStep onChosen(Object selectedValue, boolean finalChoice) { + public PopupStep onChosen(Object selectedValue, boolean finalChoice) { if (getConfigureMessage().equals(selectedValue)) { return doFinalStep(() -> BranchConfigurationDialog.configureBranches(myProject, myVcsRoot)); } diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskConfigurable.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskConfigurable.java index 9fa7307acf50..250e6eba7767 100644 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskConfigurable.java +++ b/plugins/tasks/tasks-core/src/com/intellij/tasks/config/TaskConfigurable.java @@ -213,7 +213,7 @@ public class TaskConfigurable extends BindableConfigurable implements Searchable JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep<>(TaskBundle.message("settings.placeholders"), ArrayUtilRt.toStringArray(placeholders)) { @Override - public PopupStep onChosen(String selectedValue, boolean finalChoice) { + public PopupStep onChosen(String selectedValue, boolean finalChoice) { WriteCommandAction.runWriteCommandAction(myProject, () -> editor.getDocument() .insertString(editor.getCaretModel().getOffset(), "${" + selectedValue + "}")); return FINAL_CHOICE; diff --git a/plugins/ui-designer-core/src/com/intellij/designer/inspection/AbstractQuickFixManager.java b/plugins/ui-designer-core/src/com/intellij/designer/inspection/AbstractQuickFixManager.java index 778a9360cdf2..ce5840b56b7d 100644 --- a/plugins/ui-designer-core/src/com/intellij/designer/inspection/AbstractQuickFixManager.java +++ b/plugins/ui-designer-core/src/com/intellij/designer/inspection/AbstractQuickFixManager.java @@ -258,7 +258,7 @@ public abstract class AbstractQuickFixManager { } @Override - public PopupStep onChosen(ErrorInfo value, boolean finalChoice) { + public PopupStep onChosen(ErrorInfo value, boolean finalChoice) { List quickFixes = value.getQuickFixes(); if (finalChoice) { return doFinalStep(getQuickFixRunnable(quickFixes.get(0))); @@ -294,7 +294,7 @@ public abstract class AbstractQuickFixManager { } @Override - public PopupStep onChosen(QuickFix value, boolean finalChoice) { + public PopupStep onChosen(QuickFix value, boolean finalChoice) { return doFinalStep(getQuickFixRunnable(value)); } } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/actions/PaletteListPopupStep.java b/plugins/ui-designer/src/com/intellij/uiDesigner/actions/PaletteListPopupStep.java index abf5e6183b7d..6c625dc269c3 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/actions/PaletteListPopupStep.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/actions/PaletteListPopupStep.java @@ -87,7 +87,7 @@ class PaletteListPopupStep implements ListPopupStep, SpeedSearchF } @Override - public PopupStep onChosen(final ComponentItem selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final ComponentItem selectedValue, final boolean finalChoice) { myFinalRunnable = () -> myRunnable.process(selectedValue); return PopupStep.FINAL_CHOICE; } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/inspections/FormSpellCheckingInspection.java b/plugins/ui-designer/src/com/intellij/uiDesigner/inspections/FormSpellCheckingInspection.java index b3be643b2d69..e76200e9ed30 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/inspections/FormSpellCheckingInspection.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/inspections/FormSpellCheckingInspection.java @@ -61,7 +61,7 @@ public final class FormSpellCheckingInspection extends StringDescriptorInspectio public ListPopupStep getPopupStep() { return new BaseListPopupStep<>(UIDesignerBundle.message("popup.title.select.replacement"), suggestions) { @Override - public PopupStep onChosen(String selectedValue, boolean finalChoice) { + public PopupStep onChosen(String selectedValue, boolean finalChoice) { FormInspectionUtil.updateStringPropertyValue(editor, component1, (IntroStringProperty)prop, descriptor, selectedValue); return FINAL_CHOICE; } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/quickFixes/QuickFixManager.java b/plugins/ui-designer/src/com/intellij/uiDesigner/quickFixes/QuickFixManager.java index 48d08835d63c..e6da1b9bd6e6 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/quickFixes/QuickFixManager.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/quickFixes/QuickFixManager.java @@ -255,9 +255,9 @@ public abstract class QuickFixManager { } @Override - public PopupStep onChosen(final ErrorWithFix selectedValue, final boolean finalChoice) { - if (selectedValue.second instanceof PopupQuickFix) { - return ((PopupQuickFix) selectedValue.second).getPopupStep(); + public PopupStep onChosen(final ErrorWithFix selectedValue, final boolean finalChoice) { + if (selectedValue.second instanceof PopupQuickFix fix) { + return fix.getPopupStep(); } if (finalChoice || !myShowSuppresses) { return doFinalStep( @@ -301,9 +301,9 @@ public abstract class QuickFixManager { } private static final class MyShowHintRequest implements Runnable{ - private final QuickFixManager myManager; + private final QuickFixManager myManager; - MyShowHintRequest(final @NotNull QuickFixManager manager) { + MyShowHintRequest(final @NotNull QuickFixManager manager) { myManager = manager; } diff --git a/python/src/com/jetbrains/python/run/PythonRunConfigurationForm.java b/python/src/com/jetbrains/python/run/PythonRunConfigurationForm.java index 0e72588d06f6..d9d3ec0413c0 100644 --- a/python/src/com/jetbrains/python/run/PythonRunConfigurationForm.java +++ b/python/src/com/jetbrains/python/run/PythonRunConfigurationForm.java @@ -225,7 +225,7 @@ public class PythonRunConfigurationForm implements PythonRunConfigurationParams, JBPopupFactory.getInstance().createListPopup( new BaseListPopupStep<@Nls String>(PyBundle.message("python.configuration.choose.target.to.run"), Lists.newArrayList(getScriptPathText(), getModuleNameText())) { @Override - public PopupStep onChosen(@Nls String selectedValue, boolean finalChoice) { + public PopupStep onChosen(@Nls String selectedValue, boolean finalChoice) { setTargetComboBoxValue(selectedValue); updateRunModuleMode(); return FINAL_CHOICE; diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java b/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java index ec70edb4450d..1a6facc220d5 100644 --- a/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java +++ b/python/src/com/jetbrains/python/sdk/PythonSdkDetailsStep.java @@ -87,7 +87,7 @@ public class PythonSdkDetailsStep extends BaseListPopupStep { } @Override - public PopupStep onChosen(final String selectedValue, boolean finalChoice) { + public PopupStep onChosen(final String selectedValue, boolean finalChoice) { return doFinalStep(() -> optionSelected(selectedValue)); } diff --git a/xml/dom-openapi/src/com/intellij/util/xml/highlighting/ResolvingElementQuickFix.java b/xml/dom-openapi/src/com/intellij/util/xml/highlighting/ResolvingElementQuickFix.java index 491e27203c72..c54b34acc1e7 100644 --- a/xml/dom-openapi/src/com/intellij/util/xml/highlighting/ResolvingElementQuickFix.java +++ b/xml/dom-openapi/src/com/intellij/util/xml/highlighting/ResolvingElementQuickFix.java @@ -104,7 +104,7 @@ public class ResolvingElementQuickFix implements LocalQuickFix, IntentionAction default -> JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep(XmlDomBundle.message( "dom.quickfix.create.new.element.choose.file.title"), files) { @Override - public PopupStep onChosen(final DomElement selectedValue, final boolean finalChoice) { + public PopupStep onChosen(final DomElement selectedValue, final boolean finalChoice) { onChoose.consume(selectedValue); return super.onChosen(selectedValue, finalChoice); }