@@ -25,7 +25,6 @@ export async function registerClientServerCommands(context: ExtensionContext, la
2525
2626 registerCodeLensReferencesCommands ( context , languageClient ) ;
2727 registerValidationCommands ( context ) ;
28- registerCodeLensAssociationCommands ( context , languageClient ) ;
2928 registerAssociationCommands ( context , languageClient ) ;
3029
3130 // Register client command to execute custom XML Language Server command
@@ -186,30 +185,14 @@ async function grammarAssociationCommand (uriString: string, languageClient: Lan
186185}
187186
188187/**
189- * Register commands used for associating grammar file (XSD,DTD) to a given XML file with CodeLens
190- *
191- * @param context the extension context
192- * @param languageClient the language server client
193- */
194- function registerCodeLensAssociationCommands ( context : ExtensionContext , languageClient : LanguageClient ) {
195- context . subscriptions . push ( commands . registerCommand ( ClientCommandConstants . OPEN_BINDING_WIZARD , async ( uriString : string ) => {
196- grammarAssociationCommand ( uriString , languageClient )
197- } ) ) ;
198- }
199-
200- /**
201- * Register commands used for associating grammar file (XSD,DTD) to a given XML file
188+ * Register commands used for associating grammar file (XSD,DTD) to a given XML file for command menu and CodeLens.
202189 *
203190 * @param context the extension context
204191 * @param languageClient the language server client
205192 */
206193 function registerAssociationCommands ( context : ExtensionContext , languageClient : LanguageClient ) {
207- context . subscriptions . push ( commands . registerCommand ( ClientCommandConstants . COMMAND_PALETTE_BINDING_WIZARD , async ( ) => {
208- // const uriFolder = workspace.workspaceFolders[0].uri.path;
209- // const uriFile = workspace.workspaceFolders[0].uri.fsPath;
194+ context . subscriptions . push ( commands . registerCommand ( ClientCommandConstants . OPEN_BINDING_WIZARD , async ( ) => {
210195 const uriString = window . activeTextEditor . document . fileName ;
211- // const uriString = uriFolder + uriFile;
212- // const uriString = workspace.workspaceFile.toString();
213196 grammarAssociationCommand ( uriString , languageClient )
214197 } ) ) ;
215198 }
0 commit comments