@@ -161,8 +161,26 @@ async function getExpression(command: string, params: any, languageClient: Langu
161
161
if ( options . length === 1 ) {
162
162
resultItem = options [ 0 ] ;
163
163
} else if ( options . length > 1 ) {
164
+ let commandMessage : string ;
165
+ switch ( command ) {
166
+ case 'extractMethod' :
167
+ commandMessage = 'extract to method' ;
168
+ break ;
169
+ case 'extractVariableAllOccurrence' :
170
+ case 'extractVariable' :
171
+ commandMessage = 'extract to variable' ;
172
+ break ;
173
+ case 'extractConstant' :
174
+ commandMessage = 'extract to constant' ;
175
+ break ;
176
+ case 'extractField' :
177
+ commandMessage = 'extract to field' ;
178
+ break ;
179
+ default :
180
+ return undefined ;
181
+ }
164
182
resultItem = await window . showQuickPick < IExpressionItem > ( options , {
165
- placeHolder : "Choose the expression to extract" ,
183
+ placeHolder : `Select an expression you want to ${ commandMessage } ` ,
166
184
} ) ;
167
185
}
168
186
if ( ! resultItem ) {
@@ -391,7 +409,7 @@ async function moveStaticMember(languageClient: LanguageClient, params: CodeActi
391
409
if ( commandInfo . enclosingTypeName ) {
392
410
exclude . add ( commandInfo . enclosingTypeName ) ;
393
411
// 55: Type, 71: Enum, 81: AnnotationType
394
- if ( commandInfo . memberType === 55 || commandInfo . memeberType === 71
412
+ if ( commandInfo . memberType === 55 || commandInfo . memberType === 71
395
413
|| commandInfo . memberType === 81 ) {
396
414
exclude . add ( `${ commandInfo . enclosingTypeName } .${ commandInfo . displayName } ` ) ;
397
415
}
0 commit comments