Comparable (@NotNull LookupElement element, @NotNull CompletionLocation location) { final PsiElement position = location.getCompletionParameters().getPosition(); if (position.getLanguage() == GroovyLanguage.INSTANCE) return null; if (!(position.getParent() instanceof GrReferenceExpression)) return null; Object o = element.getObject(); if (!(o instanceof GroovyResolveResult)) return 0; final PsiElement resolveContext = ((GroovyResolveResult)o).getCurrentFileResolveContext(); if (resolveContext == null) return 0; if (GdkMethodUtil.isInWithContext(resolveContext)) { return 1; } return 0; }