Refactor AbortCompilation to allow non compiler code see the root cause#4807
Closed
iloveeclipse wants to merge 1 commit intoeclipse-jdt:masterfrom
Closed
Refactor AbortCompilation to allow non compiler code see the root cause#4807iloveeclipse wants to merge 1 commit intoeclipse-jdt:masterfrom
iloveeclipse wants to merge 1 commit intoeclipse-jdt:masterfrom
Conversation
After 0dbe296 & 15c8bfb JDT UI may report errors where none should be reported because it is supposed to be "silent cancellation". This change uses standard Java "cause" in the `AbortCompilation` and removes two different public fields used to keep exceptions before. An extra change will be needed in at least one place in the UI, where `org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(ITypeRoot, IProgressMonitor)` should be able to inspect the provided "cause" of the `RuntimeException` and handle it in same way as `OperationCanceledException`. Note: `AbortCompilation` itself is not visible outside compiler code, so this type can't be used in UI for any checks. Fixes eclipse-jdt/eclipse.jdt.ui#2769
iloveeclipse
added a commit
to iloveeclipse/eclipse.jdt.ui
that referenced
this pull request
Jan 29, 2026
Regression from eclipse-jdt/eclipse.jdt.core#4451 & eclipse-jdt/eclipse.jdt.core#4302. If Java Editor interrupts hover computation, nothing should be reported, as it is expected. After changes above two errors are reported into the log (with same stack). This change depends on the PR from JDT core below: eclipse-jdt/eclipse.jdt.core#4807 See eclipse-jdt#2769
Member
Author
|
@stephan-herrmann : since you were involved in #4302 change, could you please check this one? The UI part needed for the fix is eclipse-jdt/eclipse.jdt.ui#2770. |
Contributor
Connecting the dots for posterity:
In the end, this current PR will probably be closed without merging. |
Member
Author
|
Let close this PR for now, however I highly dislike code that exposes public instance fields... eclipse-jdt/eclipse.jdt.ui#2769 should be fixed by #4808. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After 0dbe296 &
15c8bfb JDT UI may report errors where none should be reported because it is supposed to be "silent cancellation".
This change uses standard Java "cause" in the
AbortCompilationand removes two different public fields used to keep exceptions before.An extra change will be needed in at least one place in the UI, where
org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(ITypeRoot, IProgressMonitor)should be able to inspect the provided "cause" of theRuntimeExceptionand handle it in same way asOperationCanceledException.Note:
AbortCompilationitself is not visible outside compiler code, so this type can't be used in UI for any checks.Fixes eclipse-jdt/eclipse.jdt.ui#2769