File tree Expand file tree Collapse file tree 5 files changed +39
-0
lines changed
PowerShellEditorServices.Protocol
PowerShellEditorServices/Extensions
test/PowerShellEditorServices.Test/Extensions Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -127,5 +127,12 @@ public static readonly
127127 RequestType < string , EditorCommandResponse > Type =
128128 RequestType < string , EditorCommandResponse > . Create ( "editor/showErrorMessage" ) ;
129129 }
130+
131+ public class SetStatusBarMessageRequest
132+ {
133+ public static readonly
134+ RequestType < string , EditorCommandResponse > Type =
135+ RequestType < string , EditorCommandResponse > . Create ( "editor/setStatusBarMessage" ) ;
136+ }
130137}
131138
Original file line number Diff line number Diff line change 77using Microsoft . PowerShell . EditorServices . Protocol . LanguageServer ;
88using Microsoft . PowerShell . EditorServices . Protocol . MessageProtocol ;
99using System . Threading . Tasks ;
10+ using System ;
1011
1112namespace Microsoft . PowerShell . EditorServices . Protocol . Server
1213{
@@ -135,7 +136,15 @@ public Task ShowWarningMessage(string message)
135136 ShowWarningMessageRequest . Type ,
136137 message ,
137138 true ) ;
139+ }
138140
141+ public Task SetStatusBarMessage ( string message )
142+ {
143+ return
144+ this . messageSender . SendRequest (
145+ SetStatusBarMessageRequest . Type ,
146+ message ,
147+ true ) ;
139148 }
140149 }
141150}
Original file line number Diff line number Diff line change @@ -142,6 +142,17 @@ public void ShowWarningMessage(string message)
142142 . Wait ( ) ;
143143 }
144144
145+ /// <summary>
146+ ///
147+ /// </summary>
148+ /// <param name="message"></param>
149+ public void SetStatusBarMessage ( string message )
150+ {
151+ this . editorOperations
152+ . SetStatusBarMessage ( message )
153+ . Wait ( ) ;
154+ }
155+
145156 #endregion
146157 }
147158}
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ public interface IEditorOperations
6464 /// <param name="message"></param>
6565 /// <returns></returns>
6666 Task ShowWarningMessage ( string message ) ;
67+
68+ /// <summary>
69+ ///
70+ /// </summary>
71+ /// <param name="message"></param>
72+ /// <returns></returns>
73+ Task SetStatusBarMessage ( string message ) ;
6774 }
6875}
6976
Original file line number Diff line number Diff line change @@ -202,6 +202,11 @@ public Task ShowWarningMessage(string message)
202202 {
203203 throw new NotImplementedException ( ) ;
204204 }
205+
206+ public Task SetStatusBarMessage ( string message )
207+ {
208+ throw new NotImplementedException ( ) ;
209+ }
205210 }
206211}
207212
You can’t perform that action at this time.
0 commit comments