Skip to content

Commit

Permalink
fix: Register code action provider after server mode change (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Jun 28, 2021
1 parent f13ac5c commit 50119b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async function doActivate(_operationId: string, context: ExtensionContext): Prom
await testSourceProvider.initialize();
await testFileWatcher.registerListeners();
await testCodeLensController.registerCodeLensProvider();
await registerTestCodeActionProvider();
}
}));
}
Expand Down
5 changes: 2 additions & 3 deletions src/provider/codeActionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ export class TestCodeActionProvider implements CodeActionProvider {
}

export async function registerTestCodeActionProvider(): Promise<Disposable> {
if (provider) {
provider.dispose();
}
disposeCodeActionProvider();

provider = languages.registerCodeActionsProvider(
{language: 'java', scheme: 'file', pattern: '**/*.java'},
new TestCodeActionProvider(),
Expand Down

0 comments on commit 50119b3

Please sign in to comment.