-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocompletion overwrites following characters #416
Conversation
@@ -475,6 +476,13 @@ public void didOpen(DidOpenTextDocumentParams params) { | |||
@Override | |||
public void didChange(DidChangeTextDocumentParams params) { | |||
logInfo(">> document/didChange"); | |||
try { | |||
Job.getJobManager().join(DocumentLifeCycleHandler.DOCUMENT_LIFE_CYCLE_JOBS, new NullProgressMonitor()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the fix works as expected, I'm a bit worried about joining on a job without possibilities to cancel. Are there any other alternatives?
6193c05
to
43a6afa
Compare
jobs = Job.getJobManager().find(DocumentLifeCycleHandler.DOCUMENT_LIFE_CYCLE_JOBS); | ||
wait = (System.currentTimeMillis() - start) < 5000 && jobs.length > 0; | ||
if (wait) { | ||
Thread.sleep(400); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sleep 100ms
And we should probably move that piece of code to the JobHelper, which itself needs to move from tests to core.
This change completely kills autocompletion, we need to find something else. |
24e9c2c
to
932e948
Compare
Signed-off-by: Snjezana Peco <[email protected]>
} catch (OperationCanceledException ignorable) { | ||
// No need to pollute logs when query is cancelled | ||
} catch (InterruptedException e) { | ||
JavaLanguageServerPlugin.logException(e.getMessage(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget the Thread.currentThread().interrupt();
Fixes redhat-developer/vscode-java#352
Signed-off-by: Snjezana Peco [email protected]