當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。