Search in sources :

Example 61 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class OrPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Or entity = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(2);
    list.add(entity.getPredicate1());
    list.add(entity.getPredicate2());
    return list;
}
Also used : Or(org.whole.lang.grammars.model.Or) IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList)

Example 62 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class ProductionPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Production production = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(3);
    list.add(production.getName());
    list.add(production.getRule());
    list.add(production.getTemplate());
    return list;
}
Also used : IEntity(org.whole.lang.model.IEntity) Production(org.whole.lang.grammars.model.Production) ArrayList(java.util.ArrayList)

Example 63 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class RepeatPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Repeat entity = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(4);
    list.add(entity.getLowerBound());
    list.add(entity.getUpperBound());
    list.add(entity.getSeparator());
    list.add(entity.getRule());
    return list;
}
Also used : IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList) Repeat(org.whole.lang.grammars.model.Repeat)

Example 64 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class GrammarsUIInterpreterVisitor method createConfigurations.

public static Map<String, IEntity> createConfigurations(IEntity grammarBased) {
    FeatureDescriptorEnum fdEnum = grammarBased.wGetLanguageKit().getFeatureDescriptorEnum();
    Map<String, IEntity> configurations = new HashMap<String, IEntity>();
    ScannerIterator<IEntity> i = IteratorFactory.childScannerIterator();
    i.reset(grammarBased);
    for (IEntity configuration : i) {
        IEntity name = configuration.wGet(fdEnum.valueOf("name"));
        configurations.put(name.wStringValue(), configuration);
    }
    return configurations;
}
Also used : FeatureDescriptorEnum(org.whole.lang.reflect.FeatureDescriptorEnum) IEntity(org.whole.lang.model.IEntity) HashMap(java.util.HashMap)

Example 65 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class SplitPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Split entity = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(2);
    list.add(entity.getSplitter());
    list.add(entity.getRule());
    return list;
}
Also used : IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList) Split(org.whole.lang.grammars.model.Split)

Aggregations

IEntity (org.whole.lang.model.IEntity)1407 ArrayList (java.util.ArrayList)604 Test (org.junit.Test)241 IBindingManager (org.whole.lang.bindings.IBindingManager)141 PathExpression (org.whole.lang.queries.model.PathExpression)68 ITemplateManager (org.whole.lang.templates.ITemplateManager)61 Grammar (org.whole.lang.grammars.model.Grammar)50 TestXmlGrammar (org.whole.lang.grammars.util.TestXmlGrammar)46 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)43 Model (org.whole.lang.models.model.Model)40 InternalIEntity (org.whole.lang.model.InternalIEntity)38 VisitException (org.whole.lang.visitors.VisitException)35 IEntityPartViewer (org.whole.lang.ui.viewers.IEntityPartViewer)30 ModelsModel (org.whole.lang.models.codebase.ModelsModel)27 WholeIllegalArgumentException (org.whole.lang.exceptions.WholeIllegalArgumentException)26 StreamPersistenceProvider (org.whole.lang.codebase.StreamPersistenceProvider)24 ModelBuilderOperation (org.whole.lang.builders.ModelBuilderOperation)22 XmlModel (org.whole.lang.models.codebase.XmlModel)22 MissingVariableException (org.whole.lang.visitors.MissingVariableException)22 IEntityPart (org.whole.lang.ui.editparts.IEntityPart)21