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);
}
}
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("\")");
}
};
}
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);
}
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);
}
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);
}
Aggregations