@@ -8,8 +8,12 @@ namespace Rubberduck.VBEditor.SafeComWrappers.VB6
8
8
{
9
9
public class AddIn : SafeComWrapper < VB . AddIn > , IAddIn
10
10
{
11
- // this one is an index, not an ID:
11
+
12
12
private const int MenuBar = 1 ;
13
+ private const int CodeWindow = 15 ;
14
+ private const int ProjectExplorer = 22 ;
15
+ private const int MsForm = 20 ;
16
+ private const int MsFormControl = 21 ;
13
17
14
18
private const int WindowMenu = 30009 ;
15
19
private const int ListProperties = 2529 ;
@@ -18,16 +22,16 @@ public class AddIn : SafeComWrapper<VB.AddIn>, IAddIn
18
22
private const int ViewCode = 2558 ;
19
23
20
24
21
- public AddIn ( VB . AddIn target , bool rewrapping = false )
25
+ public AddIn ( VB . AddIn target , bool rewrapping = false )
22
26
: base ( target , rewrapping )
23
- {
27
+ {
24
28
CommandBarLocations = new ReadOnlyDictionary < CommandBarSite , CommandBarLocation > ( new Dictionary < CommandBarSite , CommandBarLocation >
25
29
{
26
30
{ CommandBarSite . MenuBar , new CommandBarLocation ( MenuBar , WindowMenu ) } ,
27
- { CommandBarSite . CodePaneContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . CodePaneContext , ListProperties ) } ,
28
- { CommandBarSite . ProjectExplorerContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . ProjectExplorerContext , ProjectProperties ) } ,
29
- //{CommandBarSite.FormDesignerContextMenu , new CommandBarLocation(VbeCommandBarMenuNames.FormDesignerContext, ViewCode )}, // FIXME - see #4280
30
- { CommandBarSite . FormDesignerControlContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . FormDesignerControlContext , ViewCode ) } ,
31
+ { CommandBarSite . CodePaneContextMenu , new CommandBarLocation ( CodeWindow , ListProperties ) } ,
32
+ { CommandBarSite . ProjectExplorerContextMenu , new CommandBarLocation ( ProjectExplorer , ProjectProperties ) } ,
33
+ // {CommandBarSite.MsForm , new CommandBarLocation(MsForm, UpdateUserControls )}, // FIXME - quick hack for #4280
34
+ { CommandBarSite . FormDesignerContextMenu , new CommandBarLocation ( MsFormControl , ViewCode ) }
31
35
} ) ;
32
36
}
33
37
0 commit comments