@@ -9,29 +9,16 @@ import { JAVA_LANGID } from "./constants";
99import { logger , Type } from "./logger" ;
1010import * as utility from "./utility" ;
1111
12- const onDidChange : vscode . EventEmitter < void > = new vscode . EventEmitter < void > ( ) ;
1312const JAVA_RUN_COMMAND = "vscode.java.run" ;
1413const JAVA_DEBUG_COMMAND = "vscode.java.debug" ;
1514
1615export function initializeCodeLensProvider ( context : vscode . ExtensionContext ) : void {
17- const watcher = vscode . workspace . createFileSystemWatcher ( "**/*.{[jJ][aA][vV][aA]}" ) ;
18- context . subscriptions . push ( watcher ) ;
19- watcher . onDidChange ( ( uri ) => {
20- onDidChange . fire ( ) ;
21- } ) ;
22-
23- context . subscriptions . push ( vscode . languages . registerCodeLensProvider ( JAVA_LANGID , new DebugCodeLensProvider ( onDidChange ) ) ) ;
16+ context . subscriptions . push ( vscode . languages . registerCodeLensProvider ( JAVA_LANGID , new DebugCodeLensProvider ( ) ) ) ;
2417 context . subscriptions . push ( vscode . commands . registerCommand ( JAVA_RUN_COMMAND , runJavaProgram ) ) ;
2518 context . subscriptions . push ( vscode . commands . registerCommand ( JAVA_DEBUG_COMMAND , debugJavaProgram ) ) ;
2619}
2720
2821class DebugCodeLensProvider implements vscode . CodeLensProvider {
29- constructor ( private _onDidChange : vscode . EventEmitter < void > ) {
30- }
31-
32- get onDidChangeCodeLenses ( ) : vscode . Event < void > {
33- return this . _onDidChange . event ;
34- }
3522
3623 public async provideCodeLenses ( document : vscode . TextDocument , token : vscode . CancellationToken ) : Promise < vscode . CodeLens [ ] > {
3724 const mainMethods : IMainMethod [ ] = await resolveMainMethod ( document ) ;
0 commit comments