mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove raw types in PopupStep#onChosen inheritors
GitOrigin-RevId: df36f1a249ab4d87c2d10e3d39c27f0351298921
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d2a812b793
commit
d263e30396
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public abstract class AbstractAddToTestsPatternAction<T extends JavaTestConfigur
|
||||
JBPopupFactory.getInstance().createListPopup(
|
||||
new BaseListPopupStep<>(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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()));
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public abstract class FindUsagesInProjectStructureActionBase extends AnAction im
|
||||
BaseListPopupStep<ProjectStructureElementUsage> 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();
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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()));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class JsonSchemaInfoPopupStep extends BaseListPopupStep<JsonSchemaInfo> 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());
|
||||
|
||||
+3
-3
@@ -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();
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
+4
-4
@@ -139,7 +139,7 @@ public final class ConfigureTasksActivationDialog extends DialogWrapper {
|
||||
|
||||
final ChooseProjectStep projectStep = new ChooseProjectStep(popupItems);
|
||||
final List<ProjectPopupItem> 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<String, TaskActivationState> 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);
|
||||
|
||||
@@ -38,7 +38,7 @@ public final class LookupActionsStep extends BaseListPopupStep<LookupElementActi
|
||||
}
|
||||
|
||||
@Override
|
||||
public PopupStep onChosen(LookupElementAction selectedValue, boolean finalChoice) {
|
||||
public PopupStep<?> onChosen(LookupElementAction selectedValue, boolean finalChoice) {
|
||||
UIEventLogger.LookupExecuteElementAction.log(myLookup.getProject());
|
||||
|
||||
final LookupElementAction.Result result = selectedValue.performLookupAction();
|
||||
|
||||
@@ -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);
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<SelectInTarget> subTargets = new ArrayList<>(((CompositeSelectInTarget)target).getSubTargets(mySelectInContext));
|
||||
if (subTargets.size() > 0) {
|
||||
if (!subTargets.isEmpty()) {
|
||||
subTargets.sort(new SelectInManager.SelectInTargetComparator());
|
||||
return new SelectInActionsStep(subTargets, mySelectInContext);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BaseTreePopupStep<T> extends BaseStep<T> implements TreePopupStep<T
|
||||
}
|
||||
|
||||
@Override
|
||||
public PopupStep onChosen(T selectedValue, final boolean finalChoice) {
|
||||
public PopupStep<?> onChosen(T selectedValue, final boolean finalChoice) {
|
||||
return FINAL_CHOICE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public abstract class MultiSelectionListPopupStep<T> extends BaseListPopupStep<T
|
||||
}
|
||||
|
||||
@Override
|
||||
public final PopupStep onChosen(T selectedValue, boolean finalChoice) {
|
||||
public final PopupStep<?> onChosen(T selectedValue, boolean finalChoice) {
|
||||
return onChosen(Collections.singletonList(selectedValue), finalChoice);
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
BaseListPopupStep<String> 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;
|
||||
}
|
||||
|
||||
@@ -215,8 +215,7 @@ public class ComboBoxPopup<T> extends ListPopupImpl {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public @Nullable PopupStep onChosen(T selectedValue, boolean finalChoice) {
|
||||
public @Nullable PopupStep<?> onChosen(T selectedValue, boolean finalChoice) {
|
||||
ListModel<T> model = myGetComboboxModel.get();
|
||||
if (model instanceof ComboBoxPopupState) {
|
||||
//noinspection unchecked
|
||||
|
||||
+3
-3
@@ -876,9 +876,9 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
|
||||
return null;
|
||||
}
|
||||
final List<AbstractFilePatchInProgress.PatchChange> 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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
+7
-9
@@ -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<Map<XAttachHost, LinkedHashSet<RecentItem>>> 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<XAttachHostProvider<XAttachHost>> getAvailableHosts() {
|
||||
return XAttachHostProvider.EP.getExtensionList().stream().map(provider -> (XAttachHostProvider<XAttachHost>) provider).collect(
|
||||
Collectors.toList());
|
||||
return ContainerUtil.map(XAttachHostProvider.EP.getExtensionList(), provider -> (XAttachHostProvider<XAttachHost>)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<PopupStep> promise = new AsyncPromise<>();
|
||||
AsyncPromise<PopupStep<AttachItem>> promise = new AsyncPromise<>();
|
||||
ApplicationManager.getApplication().executeOnPooledThread(() -> {
|
||||
List<AttachItem> 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));
|
||||
}
|
||||
|
||||
+2
-2
@@ -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<V> data = new SmartStepData<>(handler, variants, session, editor);
|
||||
|
||||
EditorHyperlinkSupport hyperlinkSupport = EditorHyperlinkSupport.get(editor);
|
||||
for (SmartStepData.VariantInfo info : data.myVariants) {
|
||||
for (SmartStepData<V>.VariantInfo info : data.myVariants) {
|
||||
TextRange range = info.myVariant.getHighlightRange();
|
||||
if (range != null) {
|
||||
List<RangeHighlighter> highlighters = new SmartList<>();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class RegisterExtensionFix extends IntentionAndQuickFixAction {
|
||||
final BaseListPopupStep<ExtensionPointCandidate> 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;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class GitPushTargetPanel extends PushTargetPanel<GitPushTarget> {
|
||||
}
|
||||
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();
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public final class AnnotateCapitalizationIntention implements IntentionAction {
|
||||
BaseListPopupStep<Nls.Capitalization> 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()
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -258,7 +258,7 @@ public abstract class AbstractQuickFixManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PopupStep onChosen(ErrorInfo value, boolean finalChoice) {
|
||||
public PopupStep<?> onChosen(ErrorInfo value, boolean finalChoice) {
|
||||
List<QuickFix> 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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class PaletteListPopupStep implements ListPopupStep<ComponentItem>, 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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public final class FormSpellCheckingInspection extends StringDescriptorInspectio
|
||||
public ListPopupStep<String> 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;
|
||||
}
|
||||
|
||||
@@ -255,9 +255,9 @@ public abstract class QuickFixManager <T extends JComponent>{
|
||||
}
|
||||
|
||||
@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 <T extends JComponent>{
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class PythonSdkDetailsStep extends BaseListPopupStep<String> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PopupStep onChosen(final String selectedValue, boolean finalChoice) {
|
||||
public PopupStep<?> onChosen(final String selectedValue, boolean finalChoice) {
|
||||
return doFinalStep(() -> optionSelected(selectedValue));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ public class ResolvingElementQuickFix implements LocalQuickFix, IntentionAction
|
||||
default -> JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep<DomElement>(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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user