I'm searching for a method to expose VSCode active 'when Clause Contexts' e.g 'explorerResourceIsFolder'. To give you a better understanding of my use case, here's some background on the project to which a VSCode extension is being developed. My extension will facilitate programming in and controlling VSCode by voice.
Caster is a Dragonfly-Based Voice Programming Toolkit. Dragonfly is a speech recognition framework. It is a Python package which offers a high-level object model and allows its users to easily write scripts, macros, and programs which use speech recognition. The goal behind these projects is to enable those who limited interaction with keyboard or mouse to program or for Devs to boost productivity.
Some current outstanding limitations with Caster and Dragonfly both interact by emulating keystrokes. This is just to name a few issues.
Some examples via Adom editor
Caster framework IDE integration
Caster would contain IDE functions to pass to IDEs plug-ins/extensions for execution. For example "Find ": find R(SendFunction("actions.find"), rdescript="VisualStudioCode: Find")
Caster would listen for contexts or focus announced from IDEs .
Caster would store commands and functions based on IDE context or focus. Then activate the only relevant commands containing shortcuts or IDEs functions based the focus announced from the IDE.
IDEs plug-ins/extensions framework
Listen for and execute IDEs specific functions from Caster
Announce current contexts or focus to Caster
As a long-term goal extend functionality of IDE ( e.g. in Visual Studio Code adding numbers to IntelliSense list) The user would speak the number and the appropriate line would be selected and executed.
There will be three parts to the Studio Code Extension.
Any suggestions would be welcome. If you think this is worth opening a github ticket on the VSCode repository let me know.
There is a non public api for getting the when context in effect. You can use getValue(key: string). It is available from the work on this issue ticket:
Lift setContext
from a command to proper API Microsoft/vscode#10471
and the source can be viewed here:
by using getValue(key: string)
It is still work in progress as of May 2017. Thank you. Good day.