Merge branch 'main' into seanmcm/addQuotesToEnabled
This commit is contained in:
Коммит
b20ae62319
|
@ -961,6 +961,14 @@ export class DefaultClient implements Client {
|
|||
return selection ? selection.index : -1;
|
||||
}
|
||||
|
||||
public async showPrompt(sender?: any): Promise<void> {
|
||||
const buttonMessage: string = localize("selectIntelliSenseConfiguration.string", "Select IntelliSense Configuration...");
|
||||
const value: string | undefined = await vscode.window.showInformationMessage(localize("setCompiler.message", "You do not have IntelliSense configured. Unless you set your own configurations, IntelliSense may not be functional."), buttonMessage);
|
||||
if (value === buttonMessage) {
|
||||
return this.handleIntelliSenseConfigurationQuickPick(sender);
|
||||
}
|
||||
}
|
||||
|
||||
public async handleIntelliSenseConfigurationQuickPick(sender?: any, showCompilersOnly?: boolean): Promise<void> {
|
||||
const settings: CppSettings = new CppSettings(showCompilersOnly ? undefined : this.RootUri);
|
||||
const paths: string[] = [];
|
||||
|
@ -1025,6 +1033,7 @@ export class DefaultClient implements Client {
|
|||
settings.defaultCompilerPath = "";
|
||||
await this.configuration.updateCompilerPathIfSet(settings.defaultCompilerPath);
|
||||
configurationSelected = true;
|
||||
await this.showPrompt(sender);
|
||||
return ui.ShowConfigureIntelliSenseButton(false, this, ConfigurationType.CompilerPath, "disablePrompt");
|
||||
}
|
||||
if (installShown && index === paths.length - 2) {
|
||||
|
|
|
@ -237,13 +237,16 @@ suite("resolveVariables", () => {
|
|||
"-DTEST6=TEST6\\ TEST6 Test6", // "-DTEST6=TEST6 TEST6 Test6"
|
||||
]
|
||||
*/
|
||||
testQuoteArgumentScenario("-DTEST1=TEST1 TEST1", "\"-DTEST1=TEST1 TEST1\"");
|
||||
testQuoteArgumentScenario("-DTEST2=\"TEST2 TEST2\"", "\"-DTEST2=\\\"TEST2 TEST2\\\"\"");
|
||||
testQuoteArgumentScenario("-DTEST3=\\\"TEST3 TEST3\\\"", "\"-DTEST3=\\\"TEST3 TEST3\\\"\"");
|
||||
testQuoteArgumentScenario("-DTEST4=TEST4\\ TEST4", "\"-DTEST4=TEST4 TEST4\"");
|
||||
testQuoteArgumentScenario("-DTEST5=\'TEST5 TEST5\'", "-DTEST5=\'TEST5 TEST5\'");
|
||||
testQuoteArgumentScenario("-DTEST4=TEST4\\ TEST4", "-DTEST4=TEST4\\ TEST4");
|
||||
testQuoteArgumentScenario("-DTEST5='TEST5 TEST5'", "-DTEST5='TEST5 TEST5'");
|
||||
testQuoteArgumentScenario(`-DTEST1=TEST1 TEST1`, `"-DTEST1=TEST1 TEST1"`);
|
||||
testQuoteArgumentScenario(`-DTEST2="TEST2 TEST2"`, `"-DTEST2=\\"TEST2 TEST2\\""`);
|
||||
testQuoteArgumentScenario(`-DTEST3=\\"TEST3 TEST3\\"`, `"-DTEST3=\\\\\\"TEST3 TEST3\\\\\\""`);
|
||||
if (process.platform.includes("win")) {
|
||||
testQuoteArgumentScenario("-DTEST4=TEST4\\ TEST4", "\"-DTEST4=TEST4 TEST4\"");
|
||||
testQuoteArgumentScenario("-DTEST5=\'TEST5 TEST5\'", "-DTEST5=\'TEST5 TEST5\'");
|
||||
} else {
|
||||
testQuoteArgumentScenario("-DTEST4=TEST4\\ TEST4", "-DTEST4=TEST4\\\\ TEST4");
|
||||
testQuoteArgumentScenario("-DTEST5='TEST5 TEST5'", "-DTEST5='TEST5 TEST5'");
|
||||
}
|
||||
testQuoteArgumentScenario("-DTEST6=TEST6\\ TEST6 Test6", "\"-DTEST6=TEST6 TEST6 Test6\"");
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче