@@ -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,19 @@ 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
188+ * Register commands used for associating grammar file (XSD,DTD) to a given XML file for command menu and CodeLens
190189 *
191190 * @param context the extension context
192191 * @param languageClient the language server client
193192 */
194- function registerCodeLensAssociationCommands ( context : ExtensionContext , languageClient : LanguageClient ) {
193+ function registerAssociationCommands ( context : ExtensionContext , languageClient : LanguageClient ) {
194+ // For CodeLens
195195 context . subscriptions . push ( commands . registerCommand ( ClientCommandConstants . OPEN_BINDING_WIZARD , async ( uriString : string ) => {
196196 grammarAssociationCommand ( uriString , languageClient )
197197 } ) ) ;
198- }
199-
200- /**
201- * Register commands used for associating grammar file (XSD,DTD) to a given XML file
202- *
203- * @param context the extension context
204- * @param languageClient the language server client
205- */
206- function registerAssociationCommands ( context : ExtensionContext , languageClient : LanguageClient ) {
198+ // For command menu
207199 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;
210200 const uriString = window . activeTextEditor . document . fileName ;
211- // const uriString = uriFolder + uriFile;
212- // const uriString = workspace.workspaceFile.toString();
213201 grammarAssociationCommand ( uriString , languageClient )
214202 } ) ) ;
215203 }
0 commit comments