contextValue property
String
get
contextValue
Context value of the tree item. This can be used to contribute item specific actions in the tree.
For example, a tree item is given a context value as folder. When contributing actions to view/item/context
using menus extension point, you can specify context value for key viewItem in when expression like viewItem == folder.
"contributes": {
"menus": {
"view/item/context": [
{
"command": "extension.deleteFolder",
"when": "viewItem == folder"
}
]
}
}
This will show action extension.deleteFolder only for items with contextValue is folder.
Implementation
_i2.String get contextValue => _i5.getProperty(
this,
'contextValue',
);
set
contextValue
(String value)
Implementation
set contextValue(_i2.String value) {
_i5.setProperty(
this,
'contextValue',
value,
);
}