Search in sources :

Example 1 with CfmlAttributeNameImpl

use of com.intellij.coldFusion.model.psi.impl.CfmlAttributeNameImpl in project intellij-plugins by JetBrains.

the class CfmlPsiUtil method createConstantString.

@NotNull
public static PsiElement createConstantString(final String text, final Project project) {
    final CfmlFile dummyFile = createDummyFile(project, "<cffunction name=\"" + text + "\"></cffunction>");
    final PsiElement tag = dummyFile.getFirstChild();
    assert tag != null;
    final CfmlAttributeNameImpl namedAttribute = PsiTreeUtil.getChildOfType(tag, CfmlAttributeNameImpl.class);
    assert namedAttribute != null;
    final PsiElement element = namedAttribute.getValueElement();
    assert element != null;
    return element;
}
Also used : CfmlFile(com.intellij.coldFusion.model.files.CfmlFile) CfmlAttributeNameImpl(com.intellij.coldFusion.model.psi.impl.CfmlAttributeNameImpl) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

CfmlFile (com.intellij.coldFusion.model.files.CfmlFile)1 CfmlAttributeNameImpl (com.intellij.coldFusion.model.psi.impl.CfmlAttributeNameImpl)1 NotNull (org.jetbrains.annotations.NotNull)1