Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98612

Add an option to context menu in vscode (only to workspace folders)

$
0
0

I read the vscode API documentation here https://code.visualstudio.com/api/references/contribution-points#contributes.menus and found that I can identify the folder in the "when" clause, but I am not able to find any API which allows me to identify if this is a folder present in the workspace.

To identify if it's a folder, I use "explorerResourceIsFolder" context name from https://code.visualstudio.com/docs/getstarted/keybindings.

I would like to know a way in which I can identify that the folder is a workspace folder and then I will be able to add an option to the context menu.

Example: In this link https://code.visualstudio.com/docs/editor/multi-root-workspaces, I want to add an option to the context menu when you click on the folder "vscode", "vscode-docs", etc.


Viewing all articles
Browse latest Browse all 98612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>