Visual Studio Extension Error List ContextMenu - mef

We are using a Visual Studio extension to do some checks on a custom XML file. Errors that are detected are displayed in the Error List.
Is it possible to extend the context menu of an errortask item in the Error List of Visual studio? We want to add automatic correction functionality to our extension.

There was an example of adding custom menu items for FxCop:
http://vsxexperience.net/2011/06/28/extending-fxcop-rules-with-fixing-ability/
You can follow the sample code in:
http://stylecopfixer.codeplex.com/

Related

Visual Studio Code Extension Development: How can I display code inside my extension view?

I am developing a visual studio code extension. In my extension view, I need the ability to show code in an editor view from the local disk. If this is not possible then I would like the ability to open local code in a side panel along side my extension view.
Is this possible because when I browse their documentation there's no mention of displaying local code from extension view.
You are looking for this workspace API:
workspace.openTextDocument(fileName).then((document) => {
window.showTextDocument(document, 0, false));
}

How to add a list of custom bad/forbidden words to Visual Studio Code

There is a list of words/phrases that I would like Visual Studio Code to underline when they occur in the project. The list is custom. How to accomplish it?
You can use the extension Highlight to give particular text a different color.
I like the extension Highlight mentioned by #rioV8, but what it misses is:
1) You can not provide a message when code part triggers RegEx
2) It highlights with different colors (it's nice). But it does not use Lenses in Visual Studio Code.
So i wrote an extension that does that. Shows message when code triggers RegEx in realtime. You can think of it like as an Uber Linter.
https://marketplace.visualstudio.com/items?itemName=tomasz-smykowski.assistant
You can find it above and install. Also there is source code available on GitHub

VSCode Extension API - Can we add conditional context menus in Visual Studio code?

I am developing an extension that contains a context menu on the explorer. I need to show these items based on a condition which involves complex logic. Is there a way I can achieve this?

Which Visual Studio Code extensions add these options/icons to the sidebar?

I saw on a video presentation about TypeScript this icon in Visual Studio Code:
It looks like a git extension, but which extension is that? I would like to try it...
What about this other one?
It looks like they are useful extensions...
The first view / icon is from the GitLens extension.
The second view is actually built into VSCode. It shows "Find References" results, and consequently it only appears when Find References that has been executed in the current VSCode session.

Can I do this with a custom Visual Studio Code Extension?

I would like to have an additional feature in Visual Studio Code - essentially the "Scope to This" from the full Visual Studio Solution Explorer.
It is basically a context menu (right click) entry in the File Explorer of Visual Studio Code - which then should limit which files and folders are displayed.
Is such a thing possible with a Visual Studio Code Extension?
I never built an extension for VS Code before and would like to know if this is even possible or if I would just waste my time.
According to the API docs, there is no way to filter visible files in the Explorer like it can usually be done with the files.exclude setting. However, it is possible to open another folder with the workspace.openFolder complex command. This will probably also close all opened editors, and forget about the original workspace root path.
Your extension would need to remember the initial root path and opened editors to undo this "Scope to This" menu, and reopening everything every time could cause quite some lag.
You can't customize the normal explorer view.
However, you can do something like this with custom views. It allows you to create a new explorer view that can list what you want and behave as you want.
For an example implementation, check the vscode-code-outline.
If you can add a context menu entry separately too.