Skip to content

Commit

Permalink
Hack to prevent OperationCanceledException from being propagated to logs
Browse files Browse the repository at this point in the history
Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Dec 10, 2024
1 parent 930853e commit 4beec1c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,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

0 comments on commit 4beec1c

Please sign in to comment.