开发者

How to add your own extension in Visual Studio 2010 to the context menu of the html/aspx code editor?

开发者 https://www.devze.com 2023-01-12 12:23 出处:网络
I made my own extension for Microsoft Visual Studio 2010. Within my VSCT-file I defined a group for my command to add it to the context menu of the code-editor:

I made my own extension for Microsoft Visual Studio 2010. Within my VSCT-file I defined a group for my command to add it to the context menu of the code-editor:

<Groups>
    <Group guid="guidUCCmdSet" id="UCMenuGroup" priority="0x0600">
        <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
    </Group>
</Groups>

Thats working like clockwork but the new menu entry isn't visible in the HTM开发者_如何学PythonL/ASPX and XML sourcecode editor. Unfortunately it's the place were the extension will be most commonly used.

So my question: How to enable my command also for the html/aspx sourcecode editor and - at the best - in the xml editor?

Thanks in advance!


OK, I found a solution after a lot experimenting. You have to use CMDSETID_HtmEdGrp as the GUID and IDMX_HTM_SOURCE_HTML or IDMX_HTM_SOURCE_ASPX as the ID for your parent node within the CommandPlacements.

0

精彩评论

暂无评论...
验证码 换一张
取 消