package com.cedricziel.idea.fluid.lang.psi.impl;

import com.cedricziel.idea.fluid.lang.psi.FluidElement;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;

public class FluidElementImpl extends ASTWrapperPsiElement implements FluidElement {

  public FluidElementImpl(@NotNull ASTNode node) {
    super(node);
  }

  @Override
  public String toString() {
    final String className = getClass().getSimpleName();
    return StringUtil.trimEnd(className, "Impl");
  }
}

@@ -236,16 +236,136 @@
 ngUtil;%0A
+import com.intellij.psi.PsiReference;%0Aimport com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry;%0A
 import o
@@ -709,11 +709,343 @@
 l%22);%0A  %7D
+%0A%0A    @NotNull%0A    @Override%0A    public PsiReference%5B%5D getReferences() %7B%0A        return ReferenceProvidersRegistry.getReferencesFromProviders(this);%0A    %7D%0A%0A    @Override%0A    public PsiReference getReference() %7B%0A        PsiReference%5B%5D references = getReferences();%0A%0A        return references.length == 0 ? null : references%5B0%5D;%0A    %7D
 %0A%7D%0A

Allow placing PsiReferences on FluidElements