-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathClaudeCodeExtensionPackage.vsct
More file actions
80 lines (70 loc) · 4.1 KB
/
Copy pathClaudeCodeExtensionPackage.vsct
File metadata and controls
80 lines (70 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Commands package="guidClaudeCodeExtensionPackage">
<Groups>
<!-- Standard code editor context menu (C#, VB, C++, F#, JSON, CSS, JS standalone, XML, etc.).
The modern HTML / Razor / WebForms editors in VS 17+/18 build their context menu via
the Editor Commanding framework and do NOT expose a VSCT-targetable group, so the
Send Selection command cannot appear there from a third-party extension. A prior attempt
to reach it via "IDM_VS_CTXT_HTMLCODE" broke the build (v10.65/10.66, see CommandPlacements
below for the other pitfall it likely also hit) — any future context menu group needs a
real, VS-registered GUID+ID pair, the way guidVSXamlWindowContextMenu below does for XAML. -->
<Group guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorContextMenuGroup" priority="0x0600">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
</Group>
<!-- The XAML editor (WPF/UWP/Xamarin.Forms) builds its own context menu under a private,
package-owned GUID instead of IDM_VS_CTXT_CODEWIN, so it needs its own group. Value taken
from the VS shell's registered XAML editor context menu (also used by third-party
extensions such as XAML Styler to add commands there). -->
<Group guid="guidVSXamlWindowContextMenu" id="XamlContextMenuGroup" priority="0x0600">
<Parent guid="guidVSXamlWindowContextMenu" id="IDVSXamlWindowContextMenu"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidClaudeCodeExtensionPackageCmdSet" id="ClaudeCodeToolWindowCommandId" priority="0x0100" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_WNDO_OTRWNDWS1"/>
<Icon guid="guidImages" id="bmpIcon" />
<Strings>
<ButtonText>Claude Code Extension</ButtonText>
</Strings>
</Button>
<Button guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorSendSelectionCommandId" priority="0x0100" type="Button">
<Parent guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorContextMenuGroup"/>
<CommandFlag>DynamicVisibility</CommandFlag>
<Strings>
<ButtonText>Send Selection to Claude Code</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
<Bitmap guid="guidImages" href="app.ico" usedList="bmpIcon"/>
</Bitmaps>
</Commands>
<!-- CommandPlacements is a sibling of Commands, not a subsection of it — nesting it inside
Commands is VSCT1102 (this is what actually broke the HTML editor attempt in v10.65/10.66,
not the guidSHLMainMenu symbol noted above; both mistakes are worth avoiding here). -->
<CommandPlacements>
<CommandPlacement guid="guidClaudeCodeExtensionPackageCmdSet" id="EditorSendSelectionCommandId" priority="0x0100">
<Parent guid="guidVSXamlWindowContextMenu" id="XamlContextMenuGroup"/>
</CommandPlacement>
</CommandPlacements>
<Symbols>
<GuidSymbol name="guidClaudeCodeExtensionPackage" value="{3fa29425-3add-418f-82f6-0c9b7419b2ca}" />
<GuidSymbol name="guidClaudeCodeExtensionPackageCmdSet" value="{11111111-2222-3333-4444-555555555555}">
<IDSymbol name="ClaudeCodeToolWindowCommandId" value="0x0100" />
<IDSymbol name="EditorContextMenuGroup" value="0x1020" />
<IDSymbol name="EditorSendSelectionCommandId" value="0x0201" />
</GuidSymbol>
<!-- The XAML editor's own context menu, owned by Microsoft's XAML editor package (not part of
guidSHLMainMenu / vsshlids.h). -->
<GuidSymbol name="guidVSXamlWindowContextMenu" value="{4C87B692-1202-46AA-B64C-EF01FAEC53DA}">
<IDSymbol name="IDVSXamlWindowContextMenu" value="0x0103" />
<IDSymbol name="XamlContextMenuGroup" value="0x1030" />
</GuidSymbol>
<GuidSymbol name="guidImages" value="{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}">
<IDSymbol name="bmpIcon" value="1" />
</GuidSymbol>
</Symbols>
</CommandTable>