Skip to content

Commit 6a85614

Browse files
datho7561rgrunber
authored andcommitted
Hack to prevent OperationCanceledException from being propagated to logs
Signed-off-by: David Thompson <[email protected]>
1 parent 2dfd51f commit 6a85614

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/codeassist/DOMCompletionEngine.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,6 +2993,14 @@ private void completeMethodModifiers(MethodDeclaration methodDeclaration) {
29932993
}
29942994

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

0 commit comments

Comments
 (0)