From 28d7871c711bdca0bf1a4ad380b31a1fbd571db8 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 20 May 2016 12:16:02 +0200 Subject: [PATCH] naming of extension and command --- contentprovider-sample/out/extension.js | 2 +- contentprovider-sample/out/extension.js.map | 2 +- contentprovider-sample/package.json | 10 +++++----- contentprovider-sample/src/extension.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contentprovider-sample/out/extension.js b/contentprovider-sample/out/extension.js index 33f4ebef..2998cc55 100644 --- a/contentprovider-sample/out/extension.js +++ b/contentprovider-sample/out/extension.js @@ -10,7 +10,7 @@ function activate(context) { var providerRegistration = vscode_1.workspace.registerTextDocumentContentProvider(contentProvider_1.default.scheme, contentProvider); // register command that crafts an uri with the `references` scheme, // open the dynamic document, and shows it in the next editor - var commandRegistration = vscode_1.commands.registerTextEditorCommand('references/showAsText', function (editor) { + var commandRegistration = vscode_1.commands.registerTextEditorCommand('editor.printReferences', function (editor) { var uri = contentProvider_1.encodeLocation(editor.document.uri, editor.selection.active); return vscode_1.workspace.openTextDocument(uri).then(function (doc) { return vscode_1.window.showTextDocument(doc, editor.viewColumn + 1); }); }); diff --git a/contentprovider-sample/out/extension.js.map b/contentprovider-sample/out/extension.js.map index 57ec78b7..b76a3a8c 100644 --- a/contentprovider-sample/out/extension.js.map +++ b/contentprovider-sample/out/extension.js.map @@ -1 +1 @@ -{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA;;4DAE4D;AAC5D,YAAY,CAAC;AAEb,uBAA4D,QAAQ,CAAC,CAAA;AACrE,gCAA8C,mBAAmB,CAAC,CAAA;AAElE,kBAAyB,OAAyB;IAE9C,IAAM,eAAe,GAAG,IAAI,yBAAe,EAAE,CAAC;IAE9C,oDAAoD;IACpD,IAAM,oBAAoB,GAAG,kBAAS,CAAC,mCAAmC,CAAC,yBAAe,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEpH,oEAAo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I,CAAC,UAAA,GAAG,IAAI,OAAA,eAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,EAAnD,CAAmD,CAAC,CAAC;IAC5G,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,aAAa,CAAC,IAAI,CACtB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,CACvB,CAAC;AACN,CAAC;AAnBe,gBAAQ,WAmBvB,CAAA"} \ No newline at end of file diff --git a/contentprovider-sample/package.json b/contentprovider-sample/package.json index 7d476bd0..fea6b114 100644 --- a/contentprovider-sample/package.json +++ b/contentprovider-sample/package.json @@ -1,7 +1,7 @@ { - "name": "references-editor", - "displayName": "references-editor", - "description": "", + "name": "print-references", + "displayName": "(Sample) Print references", + "description": "Show the results of the Find References feature as formatted text in an editor", "version": "0.0.1", "publisher": "jrieken", "engines": { @@ -11,13 +11,13 @@ "Other" ], "activationEvents": [ - "onCommand:references/showAsText" + "onCommand:editor.printReferences" ], "main": "./out/extension", "contributes": { "commands": [ { - "command": "references/showAsText", + "command": "editor.printReferences", "title": "Print References" } ], diff --git a/contentprovider-sample/src/extension.ts b/contentprovider-sample/src/extension.ts index 4f8d0465..077f7640 100644 --- a/contentprovider-sample/src/extension.ts +++ b/contentprovider-sample/src/extension.ts @@ -15,7 +15,7 @@ export function activate(context: ExtensionContext) { // register command that crafts an uri with the `references` scheme, // open the dynamic document, and shows it in the next editor - const commandRegistration = commands.registerTextEditorCommand('references/showAsText', editor => { + const commandRegistration = commands.registerTextEditorCommand('editor.printReferences', editor => { const uri = encodeLocation(editor.document.uri, editor.selection.active); return workspace.openTextDocument(uri).then(doc => window.showTextDocument(doc, editor.viewColumn + 1)); });