You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Code lenses for Run/Debug links on main methods don't show up immediately #438
When the user is editing the textDocument, there are two events happening in the Language Server Protocol level.
vscode will call provideCodeLenses interface registered by java-debug to update CodeLens.
vscode will send document/didChange to jdt.ls about the changed text.
The implementation of these two handlers both will operate the CompilationUnit object of the current file. java-debug will read CompilationUnit to resolve main method. On the other hand, vscode-java will update the CompilationUnit with the new changed text. It's a resource contention problem.
In the bug description, what java-debug got is an old CompilationUnit so that the user feels like a delay.
Activity
Eskibear commentedon Sep 20, 2018
Same behavior for the "main" snippet, it takes about 6 seconds to show up if you don't save or type any character.
testforstephen commentedon Sep 20, 2018
When the user is editing the textDocument, there are two events happening in the Language Server Protocol level.
provideCodeLensesinterface registered by java-debug to update CodeLens.document/didChangeto jdt.ls about the changed text.The implementation of these two handlers both will operate the CompilationUnit object of the current file. java-debug will read CompilationUnit to resolve main method. On the other hand, vscode-java will update the CompilationUnit with the new changed text. It's a resource contention problem.
In the bug description, what java-debug got is an old CompilationUnit so that the user feels like a delay.
testforstephen commentedon Oct 9, 2018
Add logic to wait the DocumentLifeCycleHandler to finish updating.