insert common prefix by default, but only for explicit completion (for now)

This commit is contained in:
peter
2011-08-29 19:25:05 +02:00
parent 3045ade68d
commit d2435d6019
4 changed files with 6 additions and 4 deletions
@@ -749,7 +749,7 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
checkResultByFile(getTestName(false) + "_after.java")
}
public void _testSecondInvocationToFillCommonPrefix() throws Throwable {
public void testSecondInvocationToFillCommonPrefix() throws Throwable {
configure()
type('a');
complete();
@@ -92,7 +92,7 @@ public class CodeInsightSettings implements PersistentStateComponent<Element>, C
public boolean AUTOCOMPLETE_ON_CODE_COMPLETION = true;
public boolean AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION = true;
public boolean AUTOCOMPLETE_ON_CLASS_NAME_COMPLETION = false;
public boolean AUTOCOMPLETE_COMMON_PREFIX = false;
public boolean AUTOCOMPLETE_COMMON_PREFIX = true;
public boolean SHOW_STATIC_AFTER_INSTANCE = false;
public boolean SHOW_FULL_SIGNATURES_IN_PARAMETER_INFO = false;
@@ -138,11 +138,9 @@ public class CodeCompletionHandlerBase implements CodeInsightActionHandler {
CompletionPhase phase = CompletionServiceImpl.getCompletionPhase();
boolean repeated = phase.indicator != null && phase.indicator.isRepeatedInvocation(myCompletionType, editor);
/*
if (repeated && isAutocompleteCommonPrefixOnInvocation() && phase.fillInCommonPrefix()) {
return;
}
*/
if (invokedExplicitly) {
time = phase.newCompletionStarted(time, repeated);
@@ -185,6 +185,10 @@ public abstract class CompletionPhase implements Disposable {
@Override
public boolean fillInCommonPrefix() {
if (indicator.isAutopopupCompletion()) {
return false;
}
return indicator.fillInCommonPrefix(true);
}
}