Skip to content

Commit 2d000e8

Browse files
chore: strings
1 parent b8548d6 commit 2d000e8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/upgrade/upgradeManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Commands } from "../commands";
1111
import notificationManager from "./display/notificationManager";
1212
import { Settings } from "../settings";
1313
import assessmentManager from "./assessmentManager";
14-
import { checkOrInstallAppModExtension, checkOrPromptToInstallAppModExtension } from "./utility";
14+
import { checkOrInstallAppModExtension, checkOrPopupToInstallAppModExtension } from "./utility";
1515

1616
const DEFAULT_UPGRADE_PROMPT = "Upgrade Java project dependency to latest version.";
1717

@@ -33,9 +33,9 @@ class UpgradeManager {
3333

3434
// Show modernization view
3535
context.subscriptions.push(instrumentOperationAsVsCodeCommand(Commands.VIEW_MODERNIZE_JAVA_PROJECT, async () => {
36-
await checkOrPromptToInstallAppModExtension(
36+
await checkOrPopupToInstallAppModExtension(
3737
ExtensionName.APP_MODERNIZATION_FOR_JAVA,
38-
"Install GitHub Copilot app modernization to modernize the Java project.",
38+
`${ExtensionName.APP_MODERNIZATION_EXTENSION_NAME} extension is required to modernize Java projects. Would you like to install it to modernize this project?`,
3939
"Install Extension and Modernize");
4040
await commands.executeCommand("workbench.view.extension.azureJavaMigrationExplorer");
4141
}));

src/upgrade/utility.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,27 @@ async function checkOrPromptToEnableAppModExtension() {
7979
return;
8080
}
8181

82-
// The extension is disabled if we cannot detect the extension after installing it.
82+
// The extension is in a disabled state since we cannot detect the extension after installing it.
8383
await commands.executeCommand("workbench.extensions.search", ExtensionName.APP_MODERNIZATION_FOR_JAVA);
8484
const BTN_TEXT = "Show extension in sidebar";
8585
const choice2 = await window.showInformationMessage(
86-
`${ExtensionName.APP_MODERNIZATION_EXTENSION_NAME} extension is needed for the feature to work but it seems disabled. Please enable it manually and try again.`,
86+
`${ExtensionName.APP_MODERNIZATION_EXTENSION_NAME} extension is required for the feature but seems disabled. Please enable it manually and try again.`,
8787
BTN_TEXT
8888
);
8989
if (choice2 === BTN_TEXT) {
9090
await commands.executeCommand("workbench.extensions.search", ExtensionName.APP_MODERNIZATION_FOR_JAVA);
9191
}
9292
}
9393

94-
export async function checkOrPromptToInstallAppModExtension(
94+
export async function checkOrPopupToInstallAppModExtension(
9595
extensionIdToCheck: string,
9696
notificationText: string,
9797
buttonText: string): Promise<void> {
9898
if (extensions.getExtension(extensionIdToCheck)) {
9999
return;
100100
}
101101

102-
const choice = await window.showInformationMessage(notificationText, buttonText);
102+
const choice = await window.showInformationMessage(notificationText, { modal: true }, buttonText);
103103
if (choice === buttonText) {
104104
await commands.executeCommand("workbench.extensions.installExtension", ExtensionName.APP_MODERNIZATION_FOR_JAVA);
105105
} else {

0 commit comments

Comments
 (0)