private static void doAdd(CompletionParameters parameters, final CompletionResultSet result) {
    PsiElement position = parameters.getPosition();
    PsiElement parent = position.getParent();
    PsiElement gParent = parent != null ? parent.getParent() : null;
    PsiReference[] references = parent == null ? position.getReferences() : ArrayUtil.mergeArrays(position.getReferences(), parent.getReferences());
    if (gParent instanceof PsiLanguageInjectionHost && references.length == 0) {
      //kotlin
      PsiReference[] gParentReferences = gParent.getReferences();
      if (gParentReferences.length > 0) {
        references = ArrayUtil.mergeArrays(references, gParentReferences);
      }
    }
    PropertyReference propertyReference = ContainerUtil.findInstance(references, PropertyReference.class);
    if (propertyReference != null && !hasMoreImportantReference(references, propertyReference)) {
      final int startOffset = parameters.getOffset();
      PsiElement element = propertyReference.getElement();
      final int offsetInElement = startOffset - element.getTextRange().getStartOffset();
      TextRange range = propertyReference.getRangeInElement();
      if (offsetInElement >= range.getStartOffset()) {
        final String prefix = element.getText().substring(range.getStartOffset(), offsetInElement);

        LookupElement[] variants = getVariants(propertyReference);
        result.withPrefixMatcher(prefix).addAllElements(Arrays.asList(variants));
      }
    }
  }
private static void doAdd(CompletionParameters parameters, final CompletionResultSet result)