Repository navigation
CodeMinings: Add support for rendering placeholder while resolving #3723 - #4508
Open
flori-schwa wants to merge 1 commit into
Open
flori-schwa wants to merge 1 commit into
flori-schwa wants to merge 1 commit into
Conversation
flori-schwa
force-pushed
the
fschwabe/codemining-placeholders
branch
from
October 16, 2026 15:09
bd845cb to
0113326
Compare
Author
|
Here is a screen recording where I added a placeholder to the "Java References" and "Java Implementations" Code minings. I also added a random delay in the resolve method to simulate work. Placeholders.mp4 |
…lipse-platform#3723 Codemining implementations can now opt-in to rendering placeholder text while the resolve() Task is still running. The IPlaceholderCodeMining marker interface must be implemented and getLabel() must return a non-empty string, which will be used as the placeholder while the future is not done. Fixes eclipse-platform#3723
flori-schwa
force-pushed
the
fschwabe/codemining-placeholders
branch
from
October 16, 2026 17:36
0113326 to
05782b5
Compare
Contributor
Test Results 867 files ± 0 867 suites ±0 49m 27s ⏱️ - 10m 41s Results for commit 05782b5. ± Comparison against base commit 3faf11c. This pull request removes 2 and adds 7 tests. Note that renamed tests count towards both. |
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.
Codemining implementations can now opt-in to rendering placeholder text while the resolve() Task is still running. The IPlaceholderCodeMining marker interface must be implemented and getLabel() must return a non-empty string, which will be used as the placeholder while the future is not done.
Fixes #3723
Example Usage:
In
JavaImplementationCodeMining(JDT):IPlaceholderCodeMininginterface:setLabel()Call in the constructor:public JavaImplementationCodeMining(IJavaElement element, JavaEditor editor, IDocument document, ICodeMiningProvider provider, boolean showImplementationsAtLeastOne) throws JavaModelException, BadLocationException { super(element, document, provider, null); this.editor= editor; this.showImplementationsAtLeastOne= showImplementationsAtLeastOne; + if (!showImplementationsAtLeastOne) { + setLabel("?? implementations"); //$NON-NLS-1$ + } }