public class PbPsiCreator implements PbElementTypes {
public static PsiElement createElement(ASTNode node) {
final IElementType type = node.getElementType();
if (type == CUSTOM_TYPE_REF) {
return new PbRefImpl(node);
}
if (type == IMPORT_DECL) {
return new PbImportDefImpl(node);
}
if (type == IMPORT_REF) {
return new PbRefImpl(node);
}
if (type == PACKAGE_DECL) {
return new PbPackageDefImpl(node);
}
if (type == PACKAGE_REF) {
return new PbRefImpl(node);
}
if (type == OPTION_LIST) {
return new PbOptionListImpl(node);
}
if (type == OPTION_REF) {
return new PbRefImpl(node);
}
if (type == OPTION_REF_SEQ) {
return new PbOptionRefSeqImpl(node);
}
if (type == OPTION_ASSIGNMENT) {