Skip to content
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

Hack to prevent OperationCanceledException from being propagated to logs #1052

Open
wants to merge 1 commit into
base: dom-with-javac
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,14 @@ private void completeMethodModifiers(MethodDeclaration methodDeclaration) {
}

private void checkCancelled() {
if (this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
// FIXME:
// JDT expects completion to never throw in this case since its normally very fast.
// To fix this we need to:
// - making completion faster by skipping most steps when not really completing anything
// - consider catching the OperationCanceledException() in the cases where it's expected to be thrown upstream (jdt.ui)
return;
}
if (this.monitor != null && this.monitor.isCanceled()) {
throw new OperationCanceledException();
}
Expand Down
Loading