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

[WIP] Keep content assist popup open even if user input has no matches #2261

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trancexpress
Copy link
Contributor

WIP, DONT MERGE

Fixes: #2260

WIP, DONT MERGE

Fixes: eclipse-platform#2260
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
@trancexpress
Copy link
Contributor Author

trancexpress commented Sep 11, 2024

There are artifacts with the current change, will have to look into those when I find time:

gh2260_content_assist_artifacts.webm

Opened eclipse-jdt/eclipse.jdt.ui#1643 for this.

Copy link
Contributor

Test Results

0 files   -  1 815  0 suites   - 1 815   0s ⏱️ - 1h 34m 29s
0 tests  -  7 697  0 ✅  -  7 468  0 💤  - 228  0 ❌  - 1 
0 runs   - 24 252  0 ✅  - 23 502  0 💤  - 749  0 ❌  - 1 

Results for commit 6600fb8. ± Comparison against base commit adbbaa6.

@mickaelistria
Copy link
Contributor

The proposal seems like a clear enhancement to me. I would enjoy the IDE providing this. One thing I believe is important is that if user closes the popup (hits Escape), the popup doesn't show again except if it has actual proposals.

@trancexpress
Copy link
Contributor Author

One thing I believe is important is that if user closes the popup (hits Escape), the popup doesn't show again except if it has actual proposals.

To be clear, #2260 is for keeping the content assist popup once opened with the usual invocation. We don't aim for #888, i.e. open the content assist popup automatically as soon as there is a proposal.

So we don't change how the popup is shown, we only keep it open once shown.

Though maybe I misunderstand your concern? Is there some preference that lets content assist show up automatically on typing, that I must test with?

private static boolean shouldHideOnNoProposals(DocumentEvent event, int offset) {
try {
char c= event.getDocument().getChar(offset - 1);
return c == ' ';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep content assist popup open even if user input has no matches
3 participants