GDKMethod completion on first basic completion comes back
authorMaxim Medvedev <maxim.medvedev@jetbrains.com>
Wed, 3 Mar 2010 12:58:01 +0000 (15:58 +0300)
committerMaxim Medvedev <maxim.medvedev@jetbrains.com>
Wed, 3 Mar 2010 12:58:01 +0000 (15:58 +0300)
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionContributor.java
plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyCompletionTest.java

index 475a4f6a4b3aeb0f542a1bc39f5afc314977711f..e3b0a9ca70dc828f01f22faed8d74a6be7c33927 100644 (file)
@@ -49,7 +49,6 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrNewExp
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameter;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameterList;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrGdkMethod;
 import org.jetbrains.plugins.groovy.lang.psi.api.types.GrCodeReferenceElement;
 
 import java.util.ArrayList;
@@ -112,11 +111,11 @@ public class GroovyCompletionContributor extends CompletionContributor {
 
         }
         else if (reference instanceof GrReferenceElement) {
-          final boolean addGDKMethods = parameters.getInvocationCount() > 1;
+//          final boolean addGDKMethods = parameters.getInvocationCount() > 1;
           ((GrReferenceElement)reference).processVariants(new Consumer<Object>() {
             public void consume(Object element) {
               LookupElement lookupElement = LookupItemUtil.objectToLookupItem(element);
-              if (lookupElement.getObject() instanceof GrGdkMethod && !addGDKMethods) return;
+//              if (lookupElement.getObject() instanceof GrGdkMethod && !addGDKMethods) return;
               if (lookupElement instanceof LookupItem) {
                 lookupElement = ((LookupItem)lookupElement).setInsertHandler(new GroovyInsertHandlerAdapter());
               }
index e333b651c0b188fbc33581eabcb6597a8653b449..dda8d5055d00ff336f9d49b63ec178d9db9a9809 100644 (file)
@@ -293,8 +293,4 @@ public class GroovyCompletionTest extends LightCodeInsightFixtureTestCase {
   public void testIncSmartCompletion() throws Exception {
     doSmartCompletion("a", "b");
   }
-
-  public void testFirstCompletionDontShowGDKMethods() throws Exception {
-    doBasicTest();
-  }
 }