Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove walkthrough experiment and update the Help links to point to it #11191

Merged
merged 4 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"id": "cppWelcome",
"title": "%c_cpp.walkthrough.title%",
"description": "%c_cpp.walkthrough.description%",
"when": "false",
"steps": [
{
"id": "awaiting.activation.mac",
Expand Down
38 changes: 31 additions & 7 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ interface ConfigStateReceived {

let displayedSelectCompiler: boolean = false;
let secondPromptCounter: number = 0;
let scanForCompilersDone: boolean = false;

let workspaceDisposables: vscode.Disposable[] = [];
export let workspaceReferences: refs.ReferencesManager;
Expand Down Expand Up @@ -942,7 +943,7 @@ export class DefaultClient implements Client {
localize("select.compiler", "Select a compiler to configure for IntelliSense") :
(vscode.workspace.workspaceFolders.length > 1 ?
localize("configure.intelliSense.forFolder", "How would you like to configure IntelliSense for the '{0}' folder?", this.RootFolder.name) :
localize("configure.intelliSense.thisFolder", "How would you like to configure IntelliSense this folder?"));
localize("configure.intelliSense.thisFolder", "How would you like to configure IntelliSense for this folder?"));

const items: IndexableQuickPickItem[] = [];
let isCompilerSection: boolean = false;
Expand Down Expand Up @@ -1048,17 +1049,39 @@ export class DefaultClient implements Client {
}
if (index === paths.length - 2) {
action = "help";
// Because we need to conditionally enable/disable steps to alter their contents,
// we need to determine which step is actually visible. If the steps change, this
// logic will need to change to reflect them.
let step: string = "ms-vscode.cpptools#";
if (!scanForCompilersDone) {
step = step + "awaiting.activation.";
} else if (compilerDefaults?.knownCompilers === undefined || !compilerDefaults.knownCompilers.length) {
step = step + "no.compilers.found.";
} else {
step = step + "verify.compiler.";
}
switch (os.platform()) {
case 'win32':
void vscode.commands.executeCommand('vscode.open', "https://go.microsoft.com/fwlink/?linkid=2217614");
return;
step = step + "windows";
break;
case 'darwin':
void vscode.commands.executeCommand('vscode.open', "https://go.microsoft.com/fwlink/?linkid=2217706");
return;
step = step + "mac";
break;
default: // Linux
void vscode.commands.executeCommand('vscode.open', "https://go.microsoft.com/fwlink/?linkid=2217615");
return;
step = step + "linux";
break;
}
void vscode.commands.executeCommand(
bobbrow marked this conversation as resolved.
Show resolved Hide resolved
"workbench.action.openWalkthrough",
{ category: 'ms-vscode.cpptools#cppWelcome', step },
false)
// Run it twice for now because of VS Code bug #187958
.then(() => vscode.commands.executeCommand(
"workbench.action.openWalkthrough",
{ category: 'ms-vscode.cpptools#cppWelcome', step },
false)
);
return;
}
const showButtonSender: string = "quickPick";
if (index === paths.length - 3) {
Expand Down Expand Up @@ -2717,6 +2740,7 @@ export class DefaultClient implements Client {
newTrustedCompilerPath: newCompilerPath ?? ""
};
const results: configs.CompilerDefaults = await this.languageClient.sendRequest(QueryCompilerDefaultsRequest, params);
scanForCompilersDone = true;
void vscode.commands.executeCommand('setContext', 'cpptools.scanForCompilersDone', true);
void vscode.commands.executeCommand('setContext', 'cpptools.scanForCompilersEmpty', results.knownCompilers === undefined || !results.knownCompilers.length);
void vscode.commands.executeCommand('setContext', 'cpptools.trustedCompilerFound', results.trustedCompilerFound);
Expand Down
Loading