开发者

How to add your own extension in Visual Studio 2010 to the context menu of the html/aspx 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜