collector.error(localize('optstring',"property `{0}` can be omitted or must be of type `string`",'precondition'));
returnfalse;
}
if(item.when&&typeofitem.when!=='string'){
collector.error(localize('optstring',"property `{0}` can be omitted or must be of type `string`",'when'));
returnfalse;
...
...
@@ -98,6 +103,10 @@ namespace schema {
description:localize('vscode.extension.contributes.menuItem.alt','Identifier of an alternative command to execute. The command must be declared in the \'commands\'-section'),
type:'string'
},
precondition:{
description:localize('vscode.extension.contributes.menuItem.precondition','Condition which must be true to enable this item'),
type:'string'
},
when:{
description:localize('vscode.extension.contributes.menuItem.when','Condition which must be true to show this item'),