Search in sources :

Example 41 with ILanguageKit

use of org.whole.lang.reflect.ILanguageKit in project whole by wholeplatform.

the class DataTypesGrammarsDataTypeParser method deploy.

public static void deploy(String grammarURI) {
    Grammar grammar = GrammarsRegistry.instance().getGrammar(grammarURI);
    ILanguageKit lk = ReflectionFactory.getLanguageKit(GrammarsUtils.getLanguageURI(grammar), false, null);
    EntityDescriptor<?> ed = lk.getEntityDescriptorEnum().valueOf("DateLiteral");
    Map<EntityDescriptor<?>, IDataTypeParser> strategies = new HashMap<EntityDescriptor<?>, IDataTypeParser>();
    strategies.put(ed, new DataTypesGrammarsDataTypeParser());
    install(lk, strategies);
}
Also used : EntityDescriptor(org.whole.lang.reflect.EntityDescriptor) HashMap(java.util.HashMap) Grammar(org.whole.lang.grammars.model.Grammar) IDataTypeParser(org.whole.lang.parsers.IDataTypeParser) ILanguageKit(org.whole.lang.reflect.ILanguageKit)

Aggregations

ILanguageKit (org.whole.lang.reflect.ILanguageKit)41 IEntity (org.whole.lang.model.IEntity)12 EntityDescriptorEnum (org.whole.lang.reflect.EntityDescriptorEnum)8 Actions (org.whole.lang.actions.model.Actions)7 GroupAction (org.whole.lang.actions.model.GroupAction)7 EntityDescriptor (org.whole.lang.reflect.EntityDescriptor)7 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)6 ArrayList (java.util.ArrayList)5 ActionsUIEntityFactory (org.whole.lang.actions.ui.factories.ActionsUIEntityFactory)5 Test (org.junit.Test)4 QueriesEntityFactory (org.whole.lang.queries.factories.QueriesEntityFactory)4 IVisitor (org.whole.lang.visitors.IVisitor)4 HashMap (java.util.HashMap)3 IBindingManager (org.whole.lang.bindings.IBindingManager)3 Grammar (org.whole.lang.grammars.model.Grammar)3 IDataTypeParser (org.whole.lang.parsers.IDataTypeParser)3 HashSet (java.util.HashSet)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 SelectionListener (org.eclipse.swt.events.SelectionListener)2 IPersistenceKit (org.whole.lang.codebase.IPersistenceKit)2