mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
the old-style autopopup: don't unfocus, don't hide
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ class JavaAutoPopupTest extends CompletionAutoPopupTestCase {
|
||||
type('er')
|
||||
assertOrderedEquals myFixture.lookupElementStrings, "iter", "iterable"
|
||||
assertEquals 'iter', lookup.currentItem.lookupString
|
||||
assert !lookup.focused
|
||||
assert lookup.focused
|
||||
|
||||
type 'a'
|
||||
assert lookup.focused
|
||||
|
||||
+4
-2
@@ -469,13 +469,13 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
return false;
|
||||
}
|
||||
|
||||
if (showHintAutopopup()) {
|
||||
//if (showHintAutopopup()) {
|
||||
final LookupElementPresentation presentation = new LookupElementPresentation();
|
||||
item.renderElement(presentation);
|
||||
if (StringUtil.isNotEmpty(presentation.getTailText())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
myLookup.hideLookup(false);
|
||||
@@ -496,6 +496,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
if (!myLookup.isHintMode()) {
|
||||
for (LookupElement item : myLookup.getItems()) {
|
||||
if ((item.getPrefixMatcher().getPrefix() + myLookup.getAdditionalPrefix()).equals(item.getLookupString())) {
|
||||
@@ -504,6 +505,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
final CompletionPhase phase = CompletionServiceImpl.getCompletionPhase();
|
||||
myLookup.setFocused(phase instanceof CompletionPhase.ItemsCalculated && ((CompletionPhase.ItemsCalculated)phase).focusLookup);
|
||||
|
||||
Reference in New Issue
Block a user