@Nullable
  public PsiElement getElementFromLookup(Editor editor, @Nullable PsiFile file) {
    Lookup activeLookup = LookupManager.getInstance(myProject).getActiveLookup();

    if (activeLookup != null) {
      LookupElement item = activeLookup.getCurrentItem();
      if (item != null) {
        return getElementFromLookup(myProject, editor, file, item);
      }
    }
    return null;
  }
@Nullable
  public PsiElement getElementFromLookup(Editor editor, @Nullable PsiFile file)