Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCode lenses for Run/Debug links on main methods don't show up immediately #438
Comments
|
Same behavior for the "main" snippet, it takes about 6 seconds to show up if you don't save or type any character. |
|
When the user is editing the textDocument, there are two events happening in the Language Server Protocol level.
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. |
|
Add logic to wait the DocumentLifeCycleHandler to finish updating. |
Code lenses for Run/Debug links on main methods don't show up immediately
Environment
Steps To Reproduce
Current Result
Run/Debug code lenses don't show up immediately
Expected Result
Run/Debug code lenses should show up immediately after the public static
mainmethod is added