Package com.dci.intellij.dbn.language.common.element.impl

Source Code of com.dci.intellij.dbn.language.common.element.impl.BasicElementTypeImpl

package com.dci.intellij.dbn.language.common.element.impl;

import com.dci.intellij.dbn.language.common.element.BasicElementType;
import com.dci.intellij.dbn.language.common.element.ElementTypeBundle;
import com.dci.intellij.dbn.language.common.element.lookup.BasicElementTypeLookupCache;
import com.dci.intellij.dbn.language.common.element.parser.impl.BasicElementTypeParser;
import com.dci.intellij.dbn.language.common.psi.UnknownPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;

public class BasicElementTypeImpl extends AbstractElementType implements BasicElementType {

    public BasicElementTypeImpl(ElementTypeBundle bundle, String id, String description) {
        super(bundle, null, id, description);
    }
    public BasicElementTypeImpl(ElementTypeBundle bundle) {
        this(bundle, "UNKNOWN", "Unidentified element type.");
    }

    @Override
    public BasicElementTypeLookupCache createLookupCache() {
        return new BasicElementTypeLookupCache(this);
    }

    @Override
    public BasicElementTypeParser createParser() {
        return new BasicElementTypeParser(this);
    }

    public boolean isLeaf() {
        return true;
    }

    public String getDebugName() {
        return getId();
    }

    public PsiElement createPsiElement(ASTNode astNode) {
        return new UnknownPsiElement(astNode, this);
    }

}
TOP

Related Classes of com.dci.intellij.dbn.language.common.element.impl.BasicElementTypeImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.