当前位置: 首页>>代码示例>>Java>>正文


Java ASTWrapperPsiElement类代码示例

本文整理汇总了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);
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:19,代码来源:LuaDocPsiCreator.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:GroovyDocPsiCreator.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:GroovyDocPsiCreator.java

示例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;
	}
 
开发者ID:antlr,项目名称:intellij-plugin-v4,代码行数:17,代码来源:ANTLRv4StructureViewElement.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:22,代码来源:JavaScriptParsingDefinition.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:RestASTFactory.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:PythonParserDefinition.java

示例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);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:9,代码来源:ProjectViewParserDefinition.java

示例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);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:9,代码来源:BuildParserDefinition.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:8,代码来源:ShaderLabParserDefinition.java

示例11: createElement

import com.intellij.extapi.psi.ASTWrapperPsiElement; //导入依赖的package包/类
@RequiredReadAction
@NotNull
@Override
public PsiElement createElement(@NotNull ASTNode node)
{
	return new ASTWrapperPsiElement(node);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:CSharpDocParserDefinition.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-play,代码行数:11,代码来源:PlayRouteParserDefinition.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:10,代码来源:JqlParserDefinition.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:44,代码来源:RegExpParserDefinition.java

示例15: createElement

import com.intellij.extapi.psi.ASTWrapperPsiElement; //导入依赖的package包/类
@NotNull
@Override
public PsiElement createElement(ASTNode node) {
  return new ASTWrapperPsiElement(node);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:RenderscriptParserDefinition.java


注:本文中的com.intellij.extapi.psi.ASTWrapperPsiElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。