Skip to content

Commit 04e1e00

Browse files
committed
Rewire add remove references in context menu.
1 parent eeb3083 commit 04e1e00

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ public double FontSize
561561
public ExportAllCommand ExportAllCommand { get; set; }
562562
public CommandBase RemoveCommand { get; }
563563
public PrintCommand PrintCommand { get; set; }
564+
public AddRemoveReferencesCommand AddRemoveReferencesCommand { get; set; }
564565

565566
private readonly RemoveCommand _externalRemoveCommand;
566567

Rubberduck.Core/UI/CodeExplorer/CodeExplorerControl.xaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<BitmapImage x:Key="SortImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/edit-list-order.png" />
4343
<BitmapImage x:Key="ShowSignaturesImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Custom/PNG/DisplayFullSignature.png" />
4444
<BitmapImage x:Key="CopyResultsImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/document-copy.png" />
45-
45+
<BitmapImage x:Key="AddRemoveReferencesImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/node-select-all.png" />
46+
4647
<BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
4748
<converters:BoolToHiddenVisibilityConverter x:Key="BoolToHiddenVisibility" />
4849
<converters:StringHasValueToVisibilityConverter x:Key="StringHasValueToVisibility" />
@@ -284,6 +285,14 @@
284285
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Rename}"
285286
Command="{Binding RenameCommand}"
286287
CommandParameter="{Binding SelectedItem}" />
288+
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=References_Caption}"
289+
Command="{Binding AddRemoveReferencesCommand}"
290+
CommandParameter="{Binding SelectedItem}">
291+
<MenuItem.Icon>
292+
<Image Source="{StaticResource AddRemoveReferencesImage}" />
293+
</MenuItem.Icon>
294+
</MenuItem>
295+
<Separator />
287296
<Separator />
288297
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_SetAsStartupProject}"
289298
Command="{Binding SetAsStartupProjectCommand}"

0 commit comments

Comments
 (0)