Search in sources :

Example 1 with Binding

use of org.whole.lang.environment.model.Binding in project whole by wholeplatform.

the class BindingPart method refreshVisuals.

protected void refreshVisuals() {
    Binding binding = getModelEntity();
    Value valueEntity = binding.getValue();
    IEntity value = Matcher.matchImpl(EnvironmentEntityDescriptorEnum.Value, valueEntity) ? valueEntity.getValue() : valueEntity.wGetAdaptee(true);
    BidingFigure fig = (BidingFigure) getFigure();
    if (fig.getFoldingToggle(0).getModel().isSelected() == isShowValue(value))
        fig.clickFoldingToggle(0);
}
Also used : Binding(org.whole.lang.environment.model.Binding) BidingFigure(org.whole.lang.environment.ui.figures.BidingFigure) IEntity(org.whole.lang.model.IEntity) Value(org.whole.lang.environment.model.Value)

Example 2 with Binding

use of org.whole.lang.environment.model.Binding in project whole by wholeplatform.

the class EnvironmentInterpreterVisitor method visit.

@Override
public void visit(Bindings entity) {
    IBindingManager bm = getBindings();
    IEntity selfEntity = bm.wGet("self");
    for (int i = 0; i < entity.wSize(); i++) {
        Binding binding = entity.get(i);
        binding.accept(this);
        // if (!binding.getName().getValue().equals("self")) {
        if (bm.wGet("self") != selfEntity)
            if (bm.wIsSet("self"))
                bm.wSet("self", selfEntity);
            else
                bm.wDef("self", selfEntity);
    // }
    }
}
Also used : Binding(org.whole.lang.environment.model.Binding) IEntity(org.whole.lang.model.IEntity) IBindingManager(org.whole.lang.bindings.IBindingManager)

Example 3 with Binding

use of org.whole.lang.environment.model.Binding in project whole by wholeplatform.

the class BindingPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Binding binding = getModelEntity();
    Value valueEntity = binding.getValue();
    IEntity value = Matcher.matchImpl(EnvironmentEntityDescriptorEnum.Value, valueEntity) ? valueEntity.getValue() : valueEntity.wGetAdaptee(true);
    List<IEntity> children = new ArrayList<IEntity>(4);
    children.add(EnvironmentEntityFactory.instance.createId(Integer.toHexString(System.identityHashCode(value))));
    children.add(ModelsEntityFactory.instance.createEntityType(value.wGetEntityDescriptor().getURI()));
    children.add(binding.getName());
    children.add(value);
    return children;
}
Also used : Binding(org.whole.lang.environment.model.Binding) IEntity(org.whole.lang.model.IEntity) Value(org.whole.lang.environment.model.Value) ArrayList(java.util.ArrayList)

Aggregations

Binding (org.whole.lang.environment.model.Binding)3 IEntity (org.whole.lang.model.IEntity)3 Value (org.whole.lang.environment.model.Value)2 ArrayList (java.util.ArrayList)1 IBindingManager (org.whole.lang.bindings.IBindingManager)1 BidingFigure (org.whole.lang.environment.ui.figures.BidingFigure)1