PsiElement (ASTNode node) { IElementType type = node.getElementType(); if (type == ARGUMENT) { return new CommandLineArgumentImpl(node); } else if (type == COMMAND) { return new CommandLineCommandImpl(node); } else if (type == OPTION) { return new CommandLineOptionImpl(node); } throw new AssertionError("Unknown element type: " + type); }