the old-style autopopup: don't unfocus, don't hide

This commit is contained in:
peter
2011-03-03 17:49:53 +01:00
parent 781b60e4ab
commit a2cc33f6c2
2 changed files with 5 additions and 3 deletions
@@ -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
@@ -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);