Examples of ElementTypeDefinitionException


Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException

        elementType.loadDefinition(def);
        if (elementType.is(ElementTypeAttribute.ROOT)) {
            if (rootElementType == null) {
                rootElementType = elementType;
            } else {
                throw new ElementTypeDefinitionException("Duplicate root definition");
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException


    public static String determineMandatoryAttribute(Element def, String attribute, String message) throws ElementTypeDefinitionException {
        String value = def.getAttributeValue(attribute);
        if (value == null) {
            throw new ElementTypeDefinitionException(message + "Missing '" + attribute + "' attribute.");
        }
        return value;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException

                ElementTypeDefinition.VARIABLE_REF.is(type)) {
            result = new IdentifierElementTypeImpl(this, parent, createId(), def);
        } else if (ElementTypeDefinition.EXEC_VARIABLE.is(type)) {
            result = new ExecVariableElementTypeImpl(this, parent, createId(), def);           
        else {
            throw new ElementTypeDefinitionException("Could not resolve element definition '" + type + "'");
        }
        if (result instanceof LeafElementType)
            leafElementTypes.add((LeafElementType) result); else
            complexElementTypes.add(result);
View Full Code Here

Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException


    public static DBObjectType resolveObjectType(String name) throws ElementTypeDefinitionException {
        DBObjectType objectType = DBObjectType.getObjectType(name);
        if (objectType == null)
            throw new ElementTypeDefinitionException("Invalid object type '" + name + "'");
        return objectType;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException

            separatorTokens = separators.toArray(new TokenElementType[separators.size()]);
        }

        List children = def.getChildren();
        if (children.size() != 1) {
            throw new ElementTypeDefinitionException("[" + getLanguageDialect().getID() + "] Invalid iteration definition (id=" + getId() + "). Element should contain exactly one child.");
        }
        Element child = (Element) children.get(0);
        String type = child.getName();
        iteratedElementType = bundle.resolveElementDefinition(child, type, this);
View Full Code Here

Examples of com.dci.intellij.dbn.language.common.element.util.ElementTypeDefinitionException

        wrappingDefinition = new WrappingDefinition(beginTokenElement, endTokenElement);


        List children = def.getChildren();
        if (children.size() != 1) {
            throw new ElementTypeDefinitionException(
                    "Invalid wrapper definition. " +
                    "Element should contain exact one child of type 'one-of', 'sequence', 'element', 'token'");
        }
        Element child = (Element) children.get(0);
        String type = child.getName();
View Full Code Here
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.