diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionOrderingTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionOrderingTest.groovy index dcb13ac55001..348ceb177809 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionOrderingTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionOrderingTest.groovy @@ -21,7 +21,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase { } public void testJComponentAdd() throws Throwable { - checkPreferredItems(0, "name", "b", "foo", "fooBean239", "this"); + checkPreferredItems(0, "name", "b", "fooBean239", "this", "getName"); } public void testJComponentAddNew() throws Throwable { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java index e138d9922eef..337a2d3cfef4 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java @@ -279,6 +279,10 @@ public class CompletionServiceImpl extends CompletionService{ } + if (parameters.getCompletionType() == CompletionType.SMART) { + return sorter; + } + return sorter.withClassifier("priority", true, new ClassifierFactory("liftShorter") { @Override public Classifier createClassifier(final Classifier next) {