@NotNull public static LazyParseableElement lazy(@NotNull final ILazyParseableElementType type, CharSequence text) { final ASTNode node = type.createNode(text); if (node != null) return (LazyParseableElement)node; if (type == TokenType.CODE_FRAGMENT) { return new CodeFragmentElement(null); } else if (type == TokenType.DUMMY_HOLDER) { return new DummyHolderElement(text); } final LazyParseableElement customLazy = factory(type).createLazy(type, text); return customLazy != null ? customLazy : DefaultFactoryHolder.DEFAULT.createLazy(type, text); }
@NotNull public static LazyParseableElement lazy(@NotNull final ILazyParseableElementType type, final CharSequence text) { final ASTNode node = type.createNode(text); if (node != null) return (LazyParseableElement)node; if (type == TokenType.CODE_FRAGMENT) { return new CodeFragmentElement(null); } else if (type == TokenType.DUMMY_HOLDER) { return new DummyHolderElement(text); } final LazyParseableElement customLazy = factory(type).createLazy(type, text); return customLazy != null ? customLazy : DefaultFactoryHolder.DEFAULT.createLazy(type, text); }