@Override @NotNull public PsiElement createElement(final ASTNode node) { final IElementType type = node.getElementType(); if (type instanceof JavaStubElementType) { return ((JavaStubElementType)type).createPsi(node); } throw new IllegalStateException("Incorrect node for JavaParserDefinition: " + node + " (" + type + ")"); }
@RequiredReadAction @Override @NotNull public PsiElement createElement(@NotNull final ASTNode node) { final IElementType type = node.getElementType(); if(type instanceof JavaStubElementType) { return ((JavaStubElementType) type).createPsi(node); } throw new IllegalStateException("Incorrect node for JavaParserDefinition: " + node + " (" + type + ")"); }