Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.jetbrains.lang.dart.ide.actions;

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

@Override
protected String @Nullable [] calculatePubParameters(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
final int choice = Messages.showOkCancelDialog(project, DartBundle.message("dart.pub.cache.repair.message"),
DartBundle.message("dart.pub.cache.repair.title"), Messages.getWarningIcon());
return choice == Messages.OK ? new String[]{"cache", "repair"} : null;
}
@Override
protected String @Nullable [] calculatePubParameters(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
final int choice = Messages.showOkCancelDialog(project, DartBundle.message("dart.pub.cache.repair.message"),
DartBundle.message("dart.pub.cache.repair.title"), CommonBundle.getYesButtonText(),
CommonBundle.getNoButtonText(), Messages.getWarningIcon());
return choice == Messages.OK ? new String[]{"cache", "repair"} : null;
}
}
Loading