本文整理匯總了Java中com.intellij.extapi.psi.ASTWrapperPsiElement類的典型用法代碼示例。如果您正苦於以下問題:Java ASTWrapperPsiElement類的具體用法?Java ASTWrapperPsiElement怎麽用?Java ASTWrapperPsiElement使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ASTWrapperPsiElement類屬於com.intellij.extapi.psi包,在下文中一共展示了ASTWrapperPsiElement類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
public static PsiElement createElement(ASTNode node) {
IElementType type = node.getElementType();
if (type instanceof LuaDocTagValueTokenType) {
LuaDocTagValueTokenType value = (LuaDocTagValueTokenType) type;
LuaDocTagValueTokenType.TagValueTokenType valueType = value.getValueType(node);
if (valueType == REFERENCE_ELEMENT) return new LuaDocSymbolReferenceElementImpl(node);
return new LuaDocTagValueTokenImpl(node);
}
if (type == LDOC_TAG) return new LuaDocTagImpl(node);
if (type == LDOC_FIELD_REF) return new LuaDocFieldReferenceImpl(node);
if (type == LDOC_PARAM_REF) return new LuaDocParameterReferenceImpl(node);
if (type == LDOC_REFERENCE_ELEMENT) return new LuaDocSymbolReferenceElementImpl(node);
return new ASTWrapperPsiElement(node);
}
示例2: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
public static PsiElement createElement(ASTNode node) {
IElementType type = node.getElementType();
if (type instanceof GroovyDocTagValueTokenType) {
GroovyDocTagValueTokenType value = (GroovyDocTagValueTokenType) type;
GroovyDocTagValueTokenType.TagValueTokenType valueType = GroovyDocTagValueTokenType.getValueType(node);
if (valueType == GroovyDocTagValueTokenType.TagValueTokenType.REFERENCE_ELEMENT) return new GrDocReferenceElementImpl(node);
return new GrDocTagValueTokenImpl(node);
}
if (type == GroovyDocElementTypes.GDOC_TAG) return new GrDocTagImpl(node);
if (type == GroovyDocElementTypes.GDOC_INLINED_TAG) return new GrDocInlinedTagImpl(node);
if (type == GroovyDocElementTypes.GDOC_METHOD_REF) return new GrDocMethodReferenceImpl(node);
if (type == GroovyDocElementTypes.GDOC_FIELD_REF) return new GrDocFieldReferenceImpl(node);
if (type == GroovyDocElementTypes.GDOC_PARAM_REF) return new GrDocParameterReferenceImpl(node);
if (type == GroovyDocElementTypes.GDOC_METHOD_PARAMS) return new GrDocMethodParamsImpl(node);
if (type == GroovyDocElementTypes.GDOC_METHOD_PARAMETER) return new GrDocMethodParameterImpl(node);
return new ASTWrapperPsiElement(node);
}
示例3: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
public static PsiElement createElement(ASTNode node) {
IElementType type = node.getElementType();
if (type instanceof GroovyDocTagValueTokenType) {
GroovyDocTagValueTokenType value = (GroovyDocTagValueTokenType) type;
GroovyDocTagValueTokenType.TagValueTokenType valueType = value.getValueType(node);
if (valueType == REFERENCE_ELEMENT) return new GrDocReferenceElementImpl(node);
return new GrDocTagValueTokenImpl(node);
}
if (type == GDOC_TAG) return new GrDocTagImpl(node);
if (type == GDOC_INLINED_TAG) return new GrDocInlinedTagImpl(node);
if (type == GDOC_METHOD_REF) return new GrDocMethodReferenceImpl(node);
if (type == GDOC_FIELD_REF) return new GrDocFieldReferenceImpl(node);
if (type == GDOC_PARAM_REF) return new GrDocParameterReferenceImpl(node);
if (type == GDOC_METHOD_PARAMS) return new GrDocMethodParamsImpl(node);
if (type == GDOC_METHOD_PARAMETER) return new GrDocMethodParameterImpl(node);
return new ASTWrapperPsiElement(node);
}
示例4: getChildren
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@Override
public TreeElement[] getChildren() {
if (element instanceof ANTLRv4FileRoot) {
// now jump into grammar to look for rules
Collection<ASTWrapperPsiElement> rules =
PsiTreeUtil.collectElementsOfType(element, new Class[]{LexerRuleSpecNode.class, ParserRuleSpecNode.class});
// System.out.println("rules="+rules);
List<TreeElement> treeElements = new ArrayList<TreeElement>(rules.size());
for (ASTWrapperPsiElement el : rules) {
PsiElement rule = PsiTreeUtil.findChildOfAnyType(el, new Class[]{LexerRuleRefNode.class, ParserRuleRefNode.class});
treeElements.add(new ANTLRv4StructureViewElement(rule));
}
return treeElements.toArray(new TreeElement[treeElements.size()]);
}
return EMPTY_ARRAY;
}
示例5: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
@Override
public PsiElement createElement(ASTNode node)
{
final IElementType type = node.getElementType();
if(type == JSElementTypes.EMBEDDED_CONTENT)
{
return new JSEmbeddedContentImpl(node);
}
else if(type == JSTokenTypes.XML_JS_SCRIPT)
{
return new JSEmbeddedContentImpl(node);
}
else if(type == JSTokenTypes.DOC_COMMENT)
{
return new JSDocCommentImpl(node);
}
return new ASTWrapperPsiElement(node);
}
示例6: create
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
public PsiElement create(ASTNode node) {
IElementType type = node.getElementType();
if (type == DIRECTIVE_BLOCK) {
return new RestDirectiveBlock(node);
}
if (type == REFERENCE_NAME) {
return new RestReference(node);
}
if (type == REFERENCE_TARGET) {
return new RestReferenceTarget(node);
}
if (type == TITLE) {
return new RestTitle(node);
}
if (type == FIELD) {
return new RestRole(node);
}
if (type == FIELD_LIST) {
return new RestFieldList(node);
}
if (type == INLINE_BLOCK) {
return new RestInlineBlock(node);
}
if (type == LINE_TEXT) {
return new RestLine(node);
}
return new ASTWrapperPsiElement(node);
}
示例7: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
public PsiElement createElement(@NotNull ASTNode node) {
final IElementType type = node.getElementType();
if (type instanceof PyElementType) {
PyElementType pyElType = (PyElementType)type;
return pyElType.createElement(node);
}
else if (type instanceof PyStubElementType) {
return ((PyStubElementType)type).createElement(node);
}
return new ASTWrapperPsiElement(node);
}
示例8: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@Override
public PsiElement createElement(ASTNode node) {
IElementType type = node.getElementType();
if (type instanceof ProjectViewElementType) {
return ((ProjectViewElementType) type).createElement(node);
}
return new ASTWrapperPsiElement(node);
}
示例9: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@Override
public PsiElement createElement(ASTNode node) {
IElementType type = node.getElementType();
if (type instanceof BuildElementType) {
return ((BuildElementType) type).createElement(node);
}
return new ASTWrapperPsiElement(node);
}
示例10: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
@Override
public PsiElement createElement(ASTNode node)
{
System.out.println(node.getElementType());
return new ASTWrapperPsiElement(node);
}
示例11: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@RequiredReadAction
@NotNull
@Override
public PsiElement createElement(@NotNull ASTNode node)
{
return new ASTWrapperPsiElement(node);
}
示例12: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
@Override
public PsiElement createElement(ASTNode node)
{
if(node.getElementType() == PlayRouteNodes.ACTION_REF)
{
return new PlayRouteActionElement(node);
}
return new ASTWrapperPsiElement(node);
}
示例13: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
@Override
public PsiElement createElement(ASTNode node) {
final IElementType type = node.getElementType();
if (type instanceof JqlElementType) {
return ((JqlElementType)type).createElement(node);
}
return new ASTWrapperPsiElement(node);
}
示例14: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
public PsiElement createElement(ASTNode node) {
final IElementType type = node.getElementType();
if (type == RegExpElementTypes.PATTERN) {
return new RegExpPatternImpl(node);
} else if (type == RegExpElementTypes.BRANCH) {
return new RegExpBranchImpl(node);
} else if (type == RegExpElementTypes.SIMPLE_CLASS) {
return new RegExpSimpleClassImpl(node);
} else if (type == RegExpElementTypes.CLASS) {
return new RegExpClassImpl(node);
} else if (type == RegExpElementTypes.CHAR_RANGE) {
return new RegExpCharRangeImpl(node);
} else if (type == RegExpElementTypes.CHAR) {
return new RegExpCharImpl(node);
} else if (type == RegExpElementTypes.GROUP) {
return new RegExpGroupImpl(node);
} else if (type == RegExpElementTypes.PROPERTY) {
return new RegExpPropertyImpl(node);
} else if (type == RegExpElementTypes.SET_OPTIONS) {
return new RegExpSetOptionsImpl(node);
} else if (type == RegExpElementTypes.OPTIONS) {
return new RegExpOptionsImpl(node);
} else if (type == RegExpElementTypes.BACKREF) {
return new RegExpBackrefImpl(node);
} else if (type == RegExpElementTypes.CLOSURE) {
return new RegExpClosureImpl(node);
} else if (type == RegExpElementTypes.QUANTIFIER) {
return new RegExpQuantifierImpl(node);
} else if (type == RegExpElementTypes.BOUNDARY) {
return new RegExpBoundaryImpl(node);
} else if (type == RegExpElementTypes.INTERSECTION) {
return new RegExpIntersectionImpl(node);
} else if (type == RegExpElementTypes.NAMED_GROUP_REF) {
return new RegExpNamedGroupRefImpl(node);
} else if (type == RegExpElementTypes.PY_COND_REF) {
return new RegExpPyCondRefImpl(node);
} else if (type == RegExpElementTypes.POSIX_BRACKET_EXPRESSION) {
return new RegExpPosixBracketExpressionImpl(node);
}
return new ASTWrapperPsiElement(node);
}
示例15: createElement
import com.intellij.extapi.psi.ASTWrapperPsiElement; //導入依賴的package包/類
@NotNull
@Override
public PsiElement createElement(ASTNode node) {
return new ASTWrapperPsiElement(node);
}