Search in sources :

Example 61 with FeatureDescriptor

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

the class JDTTransformerVisitor method setTypeArguments.

private void setTypeArguments(IEntity typeArguments, List<?> jdtTypeArguments) {
    IEntity parent = typeArguments.wGetParent();
    FeatureDescriptor fd = parent.wGetFeatureDescriptor(typeArguments);
    for (Iterator<?> i = jdtTypeArguments.iterator(); i.hasNext(); ) {
        org.eclipse.jdt.core.dom.Type type = (org.eclipse.jdt.core.dom.Type) i.next();
        acceptChild((org.eclipse.jdt.core.dom.Type) type);
        parent.wGet(fd).wAdd(this.type);
    }
}
Also used : UnionType(org.eclipse.jdt.core.dom.UnionType) ParameterizedType(org.eclipse.jdt.core.dom.ParameterizedType) IntersectionType(org.eclipse.jdt.core.dom.IntersectionType) WildcardType(org.eclipse.jdt.core.dom.WildcardType) Type(org.whole.lang.java.model.Type) PrimitiveType(org.eclipse.jdt.core.dom.PrimitiveType) NameQualifiedType(org.eclipse.jdt.core.dom.NameQualifiedType) ArrayType(org.eclipse.jdt.core.dom.ArrayType) SimpleType(org.eclipse.jdt.core.dom.SimpleType) IEntity(org.whole.lang.model.IEntity) FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor)

Example 62 with FeatureDescriptor

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

the class IteratorFactory method atFeatureIterator.

public static IEntityIterator<IEntity> atFeatureIterator(String fdUri) {
    return new AbstractSingleValuedRunnableIterator<IEntity>() {

        protected void run(IEntity selfEntity, IBindingManager bm) {
            FeatureDescriptor selfFd = selfEntity.wGetParent().wGetFeatureDescriptor(selfEntity);
            FeatureDescriptor fd = getFeatureDescriptor(fdUri, selfFd, bm);
            bm.setResult(BindingManagerFactory.instance.createValue(fd != null && fd.equals(selfFd)));
        }

        public void toString(StringBuilder sb) {
            sb.append("atFeature(\"");
            sb.append(fdUri);
            sb.append("\")");
        }
    };
}
Also used : IEntity(org.whole.lang.model.IEntity) FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor) IBindingManager(org.whole.lang.bindings.IBindingManager)

Example 63 with FeatureDescriptor

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

the class AbstractEntity method notifyRemoved.

protected final void notifyRemoved(int index, IEntity oldValue, boolean isContainment) {
    final InternalIEntity internalOldValue = (InternalIEntity) oldValue;
    if (isContainment)
        internalOldValue.wRemoveParent(this);
    else
        internalOldValue.wRemoveInverseAdjacent(this);
    FeatureDescriptor fd = CommonsFeatureDescriptorEnum.composite_element;
    IEntity oldValue0 = oldValue.wGetAdaptee(false);
    wGetEntityChangeEventHandler().notifyRemoved(this, fd, index, oldValue0);
    wGetCompoundChangeEventHandler().notifyRemoved(this, fd, index, oldValue0);
}
Also used : FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor)

Example 64 with FeatureDescriptor

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

the class AbstractEntity method notifyRequested.

protected final char notifyRequested(char value) {
    if (requestNotificationDisabled)
        return value;
    FeatureDescriptor fd = CommonsFeatureDescriptorEnum.data_value;
    char result = wGetEntityRequestEventHandler().notifyRequested(this, fd, value);
    return wGetCompoundRequestEventHandler().notifyRequested(this, fd, result);
}
Also used : FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor)

Example 65 with FeatureDescriptor

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

the class AbstractEntity method notifyChanged.

protected final void notifyChanged(char oldValue, char newValue) {
    if (newValue == oldValue)
        return;
    FeatureDescriptor fd = CommonsFeatureDescriptorEnum.data_value;
    wGetEntityChangeEventHandler().notifyChanged(this, fd, oldValue, newValue);
    wGetCompoundChangeEventHandler().notifyChanged(this, fd, oldValue, newValue);
}
Also used : FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor)

Aggregations

FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)100 IEntity (org.whole.lang.model.IEntity)43 InternalIEntity (org.whole.lang.model.InternalIEntity)6 ILanguageKit (org.whole.lang.reflect.ILanguageKit)6 HashSet (java.util.HashSet)5 IContributionItem (org.eclipse.jface.action.IContributionItem)5 ActionsVisibleWhen (org.whole.lang.e4.ui.expressions.ActionsVisibleWhen)5 VisibilityExpression (org.whole.lang.e4.ui.expressions.VisibilityExpression)5 ActionsCompositeContributionItem (org.whole.lang.e4.ui.menu.ActionsCompositeContributionItem)5 ArrayList (java.util.ArrayList)4 Map (java.util.Map)4 HashMap (java.util.HashMap)3 IBindingManager (org.whole.lang.bindings.IBindingManager)3 ITransactionScope (org.whole.lang.bindings.ITransactionScope)3 IdentityRequestEventHandler (org.whole.lang.events.IdentityRequestEventHandler)3 IMappingStrategy (org.whole.lang.xsd.codebase.IMappingStrategy)3 IEntityFactory (org.whole.lang.factories.IEntityFactory)2 ArrayType (org.whole.lang.pojo.model.ArrayType)2 CollectionType (org.whole.lang.pojo.model.CollectionType)2 MapType (org.whole.lang.pojo.model.MapType)2