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
127
127
RequestType < string , EditorCommandResponse > Type =
128
128
RequestType < string , EditorCommandResponse > . Create ( "editor/showErrorMessage" ) ;
129
129
}
130
+
131
+ public class SetStatusBarMessageRequest
132
+ {
133
+ public static readonly
134
+ RequestType < string , EditorCommandResponse > Type =
135
+ RequestType < string , EditorCommandResponse > . Create ( "editor/setStatusBarMessage" ) ;
136
+ }
130
137
}
131
138
Original file line number Diff line number Diff line change 7
7
using Microsoft . PowerShell . EditorServices . Protocol . LanguageServer ;
8
8
using Microsoft . PowerShell . EditorServices . Protocol . MessageProtocol ;
9
9
using System . Threading . Tasks ;
10
+ using System ;
10
11
11
12
namespace Microsoft . PowerShell . EditorServices . Protocol . Server
12
13
{
@@ -135,7 +136,15 @@ public Task ShowWarningMessage(string message)
135
136
ShowWarningMessageRequest . Type ,
136
137
message ,
137
138
true ) ;
139
+ }
138
140
141
+ public Task SetStatusBarMessage ( string message )
142
+ {
143
+ return
144
+ this . messageSender . SendRequest (
145
+ SetStatusBarMessageRequest . Type ,
146
+ message ,
147
+ true ) ;
139
148
}
140
149
}
141
150
}
Original file line number Diff line number Diff line change @@ -142,6 +142,17 @@ public void ShowWarningMessage(string message)
142
142
. Wait ( ) ;
143
143
}
144
144
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
+
145
156
#endregion
146
157
}
147
158
}
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ public interface IEditorOperations
64
64
/// <param name="message"></param>
65
65
/// <returns></returns>
66
66
Task ShowWarningMessage ( string message ) ;
67
+
68
+ /// <summary>
69
+ ///
70
+ /// </summary>
71
+ /// <param name="message"></param>
72
+ /// <returns></returns>
73
+ Task SetStatusBarMessage ( string message ) ;
67
74
}
68
75
}
69
76
Original file line number Diff line number Diff line change @@ -202,6 +202,11 @@ public Task ShowWarningMessage(string message)
202
202
{
203
203
throw new NotImplementedException ( ) ;
204
204
}
205
+
206
+ public Task SetStatusBarMessage ( string message )
207
+ {
208
+ throw new NotImplementedException ( ) ;
209
+ }
205
210
}
206
211
}
207
212
You can’t perform that action at this time.
0 commit comments