@@ -6,7 +6,7 @@ import { commands, ExtensionContext, Position, QuickPickItem, TextDocument, Uri,
6
6
import { FormattingOptions , WorkspaceEdit , RenameFile , DeleteFile , TextDocumentEdit , CodeActionParams , SymbolInformation } from 'vscode-languageclient' ;
7
7
import { LanguageClient } from 'vscode-languageclient/node' ;
8
8
import { Commands as javaCommands } from './commands' ;
9
- import { GetRefactorEditRequest , MoveRequest , RefactorWorkspaceEdit , RenamePosition , GetMoveDestinationsRequest , SearchSymbols , SelectionInfo , InferSelectionRequest } from './protocol' ;
9
+ import { GetRefactorEditRequest , MoveRequest , RefactorWorkspaceEdit , RenamePosition , GetMoveDestinationsRequest , SearchSymbols , SelectionInfo , InferSelectionRequest , GetChangeSignatureInfoRequest , ChangeSignatureInfo } from './protocol' ;
10
10
import { ChangeSignaturePanel } from './refactoring/changeSignaturePanel' ;
11
11
import { getExtractInterfaceArguments , revealExtractedInterface } from './refactoring/extractInterface' ;
12
12
@@ -112,7 +112,12 @@ function registerApplyRefactorCommand(languageClient: LanguageClient, context: E
112
112
}
113
113
commandArguments . push ( ...args ) ;
114
114
} else if ( command === 'changeSignature' ) {
115
- ChangeSignaturePanel . render ( context . extensionUri , languageClient , command , params , formattingOptions , commandInfo ) ;
115
+ const changeSignatureInfo : ChangeSignatureInfo = await languageClient . sendRequest ( GetChangeSignatureInfoRequest . type , params ) ;
116
+ if ( changeSignatureInfo . errorMessage !== undefined ) {
117
+ window . showWarningMessage ( changeSignatureInfo . errorMessage ) ;
118
+ return ;
119
+ }
120
+ ChangeSignaturePanel . render ( context . extensionUri , languageClient , command , params , formattingOptions , changeSignatureInfo ) ;
116
121
return ;
117
122
}
118
123
0 commit comments