naming of extension and command

This commit is contained in:
Johannes Rieken
2016-05-20 12:16:02 +02:00
parent fb589b1e5b
commit 28d7871c71
4 changed files with 8 additions and 8 deletions

View File

@ -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); });
});

View File

@ -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,oEAAoE;IACpE,6DAA6D;IAC7D,IAAM,mBAAmB,GAAG,iBAAQ,CAAC,yBAAyB,CAAC,uBAAuB,EAAE,UAAA,MAAM;QAC1F,IAAM,GAAG,GAAG,gCAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzE,MAAM,CAAC,kBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,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"}
{"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,oEAAoE;IACpE,6DAA6D;IAC7D,IAAM,mBAAmB,GAAG,iBAAQ,CAAC,yBAAyB,CAAC,wBAAwB,EAAE,UAAA,MAAM;QAC3F,IAAM,GAAG,GAAG,gCAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzE,MAAM,CAAC,kBAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,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"}

View File

@ -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"
}
],

View File

@ -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));
});