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

[pull] main from microsoft:main #1

Merged
merged 1 commit into from
Jan 5, 2022
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
18 changes: 14 additions & 4 deletions getting-started-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"onCommand:getting-started-sample.runCommand",
"onCommand:getting-started-sample.changeSetting",
"onCommand:getting-started-sample.setContext",
"onCommand:getting-started-sample.sayHello"
"onCommand:getting-started-sample.sayHello",
"onCommand:getting-started-sample.viewSources"
],
"main": "./out/extension.js",
"contributes": {
Expand All @@ -26,10 +27,10 @@
}
]
},
"commands":[
"commands": [
{
"category": "file",
"title": "Say Hello",
"title": "Getting Started Sample: Say Hello",
"shortTitle": "Say Hello (This is the name used in the New File quick pick)",
"command": "getting-started-sample.sayHello"
}
],
Expand Down Expand Up @@ -170,6 +171,15 @@
"media": {
"markdown": "media/linux.md"
}
},
{
"id": "showSources",
"title": "View Sources",
"description": "Open a folder containg the sources of this extension.\n[View Sources](command:getting-started-sample.viewSources)",
"media": {
"image": "media/image.png",
"altText": "Empty image"
}
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions getting-started-sample/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ export function activate(context: vscode.ExtensionContext): void {
context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.sayHello', () => {
vscode.window.showInformationMessage('Hello');
}));

context.subscriptions.push(vscode.commands.registerCommand('getting-started-sample.viewSources', () => {
return { openFolder: vscode.Uri.joinPath(context.extensionUri, 'src') };
}));
}