[add] icon
This commit is contained in:
parent
581b22aa76
commit
dd624939a8
15
package.json
15
package.json
@ -1,18 +1,29 @@
|
|||||||
{
|
{
|
||||||
"name": "ext1",
|
"name": "ext1",
|
||||||
"displayName": "Ext1",
|
"displayName": "Ext1",
|
||||||
"description": "a test",
|
"description": "a test extension",
|
||||||
"version": "0.0.8",
|
"version": "0.0.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"publisher": "quodatum",
|
"publisher": "quodatum",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.63.0"
|
"vscode": "^1.63.0"
|
||||||
},
|
},
|
||||||
|
"icon": "resources/ext1.png",
|
||||||
|
"homepage": "https://git.quodatum.duckdns.org/apb/ext1",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.quodatum.duckdns.org/apb/ext1.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://git.quodatum.duckdns.org/apb/ext1/issues"
|
||||||
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
],
|
],
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"onCommand:ext1.helloWorld",
|
"onCommand:ext1.helloWorld",
|
||||||
|
"onCommand:ext1.pick",
|
||||||
|
"onCommand:ext1.debug",
|
||||||
"onCommand:ext1.newDoc"
|
"onCommand:ext1.newDoc"
|
||||||
],
|
],
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
|
BIN
resources/ext1.png
Normal file
BIN
resources/ext1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -1,7 +1,7 @@
|
|||||||
// The module 'vscode' contains the VS Code extensibility API
|
// The module 'vscode' contains the VS Code extensibility API
|
||||||
// Import the module and reference it with the alias vscode in your code below
|
// Import the module and reference it with the alias vscode in your code below
|
||||||
import {
|
import {
|
||||||
commands, languages, window, workspace, ExtensionContext, Memento,
|
commands, languages, window, workspace,WorkspaceFolder, ExtensionContext, Memento,
|
||||||
TextEditor, TextEditorSelectionChangeEvent, TextEditorSelectionChangeKind, DiagnosticCollection, Uri
|
TextEditor, TextEditorSelectionChangeEvent, TextEditorSelectionChangeKind, DiagnosticCollection, Uri
|
||||||
} from "vscode";
|
} from "vscode";
|
||||||
|
|
||||||
@ -14,7 +14,21 @@ export function activate(context: ExtensionContext) {
|
|||||||
console.log('Congratulations, your extension "ext1" is now active!');
|
console.log('Congratulations, your extension "ext1" is now active!');
|
||||||
|
|
||||||
function helloHandler() {
|
function helloHandler() {
|
||||||
window.showInformationMessage('Hello World!');
|
let path: string;
|
||||||
|
if (!workspace.workspaceFolders) {
|
||||||
|
path = "none";
|
||||||
|
} else {
|
||||||
|
let root: WorkspaceFolder;
|
||||||
|
if (workspace.workspaceFolders.length === 1) {
|
||||||
|
root = workspace.workspaceFolders[0];
|
||||||
|
path = root.uri.fsPath;
|
||||||
|
} else {
|
||||||
|
path="count?";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
window.showInformationMessage('Hello World!' + path);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pickHandler(name: string = 'world') {
|
function pickHandler(name: string = 'world') {
|
||||||
|
Loading…
Reference in New Issue
Block a user