From 33d5dda337307472b6c2df4f68764003dc4ca360 Mon Sep 17 00:00:00 2001 From: RMacfarlane Date: Wed, 29 May 2019 09:51:23 -0700 Subject: [PATCH] Rename precondition to enablement in comments sample, fixes https://github.com/microsoft/vscode/issues/74541 --- comment-sample/package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/comment-sample/package.json b/comment-sample/package.json index 7c92920c..4b3ca74b 100644 --- a/comment-sample/package.json +++ b/comment-sample/package.json @@ -1,7 +1,7 @@ { - "name": "vscode-terminal-api-example", - "displayName": "vscode-terminal-api-example", - "description": "abc", + "name": "vscode-comment-api-example", + "displayName": "Comment API Sample", + "description": "Comment API Sample", "version": "0.0.1", "publisher": "vscode-samples", "engines": { @@ -19,11 +19,13 @@ "commands": [ { "command": "mywiki.createNote", - "title": "Create Note" + "title": "Create Note", + "enablement": "!commentIsEmpty" }, { "command": "mywiki.replyNote", - "title": "Reply" + "title": "Reply", + "enablement": "!commentIsEmpty" }, { "command": "mywiki.editNote", @@ -59,7 +61,8 @@ }, { "command": "mywiki.startDraft", - "title": "Start draft" + "title": "Start draft", + "enablement": "!commentIsEmpty" }, { "command": "mywiki.finishDraft", @@ -96,19 +99,16 @@ { "command": "mywiki.createNote", "group": "inline", - "precondition": "!commentIsEmpty", "when": "commentThreadIsEmpty" }, { "command": "mywiki.replyNote", "group": "inline", - "precondition": "!commentIsEmpty", "when": "!commentThreadIsEmpty" }, { "command": "mywiki.startDraft", "group": "inline", - "precondition": "!commentIsEmpty", "when": "commentThread != draft" }, {