Skip to content

Commit 24cecc7

Browse files
authored
[cq] Migrate off of deprecated instance of showOkCancelDialog (#56)
1 parent 73ce02b commit 24cecc7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubCacheRepairAction.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
22
package com.jetbrains.lang.dart.ide.actions;
33

4+
import com.intellij.CommonBundle;
45
import com.intellij.openapi.project.Project;
56
import com.intellij.openapi.ui.Messages;
67
import com.intellij.openapi.util.NlsContexts;
@@ -15,10 +16,11 @@ public class DartPubCacheRepairAction extends DartPubActionBase {
1516
return DartBundle.message("dart.pub.cache.repair.title");
1617
}
1718

18-
@Override
19-
protected String @Nullable [] calculatePubParameters(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
20-
final int choice = Messages.showOkCancelDialog(project, DartBundle.message("dart.pub.cache.repair.message"),
21-
DartBundle.message("dart.pub.cache.repair.title"), Messages.getWarningIcon());
22-
return choice == Messages.OK ? new String[]{"cache", "repair"} : null;
23-
}
19+
@Override
20+
protected String @Nullable [] calculatePubParameters(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
21+
final int choice = Messages.showOkCancelDialog(project, DartBundle.message("dart.pub.cache.repair.message"),
22+
DartBundle.message("dart.pub.cache.repair.title"), CommonBundle.getYesButtonText(),
23+
CommonBundle.getNoButtonText(), Messages.getWarningIcon());
24+
return choice == Messages.OK ? new String[]{"cache", "repair"} : null;
25+
}
2426
}

0 commit comments

Comments
 (0)