This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ public InlineCommentPeekViewModel(
7575 {
7676 FromLine = peekService . GetLineNumber ( peekSession , triggerPoint ) . Item1 ,
7777 } ) ) ;
78+
79+ NavigateToEditor = ReactiveCommand . CreateAsyncTask (
80+ Observable . Return ( true ) ,
81+ async _ =>
82+ {
83+ // TODO: Execute the `openFileInSolutionCommand`.
84+ await Task . Delay ( 1000 ) ;
85+ } ) ;
7886 }
7987
8088 /// <summary>
@@ -96,6 +104,11 @@ public ICommentThreadViewModel Thread
96104 /// </summary>
97105 public ReactiveCommand < Unit > PreviousComment { get ; }
98106
107+ /// <summary>
108+ /// Gets a command which navigates to the position of this comment in the live editor.
109+ /// </summary>
110+ public ReactiveCommand < Unit > NavigateToEditor { get ; }
111+
99112 public void Dispose ( )
100113 {
101114 threadSubscription ? . Dispose ( ) ;
Original file line number Diff line number Diff line change 9696 <Rectangle Canvas.Left=" 9" Canvas.Top=" 6" Width =" 6" Height =" 1" Fill =" {DynamicResource VsBrush.CommandBarOptionsGlyph}" StrokeThickness =" 1" />
9797 </Canvas >
9898 </Button >
99+
99100 <Separator Background =" {DynamicResource GitHubButtonBorderBrush}" Style =" {StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
101+
102+ <Button Margin =" 2 0" Padding =" 2" Command =" {Binding NavigateToEditor}"
103+ Style =" {StaticResource GitHubToolbarButton}" >
104+ <Button .ToolTip>
105+ <TextBlock FontSize =" 11" >Open Solution File at Caret (Enter)</TextBlock >
106+ </Button .ToolTip>
107+
108+ <Canvas Width =" 16" Height =" 16" >
109+ <!-- TODO: Double check these brushes since they don't seem like the right fill colors -->
110+ <Polygon Points =" 8 8 8 4 4 4 4 8 1 8 6 14 11 8" Fill =" {DynamicResource VsBrush.CommandBarOptionsGlyph}" StrokeThickness =" 1" />
111+ </Canvas >
112+ </Button >
100113 </StackPanel >
101114 </Border >
102115
You can’t perform that action at this time.
0 commit comments