use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class ChoicePropertySection method bindChoiceKind.
protected void bindChoiceKind(EMFDataBindingContext context) {
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), SGraphPackage.Literals.CHOICE__KIND);
context.bindValue(ViewerProperties.singleSelection().observe(choiceKindViewer), property.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class StatePropertySection method bindSpecificationControl.
protected void bindSpecificationControl(EMFDataBindingContext context) {
IEMFValueProperty specificationProperty = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), SGraphPackage.Literals.SPECIFICATION_ELEMENT__SPECIFICATION);
ISWTObservableValue specificationTextProperty = WidgetProperties.text(SWT.FocusOut).observe(txtSpecification);
context.bindValue(specificationTextProperty, specificationProperty.observe(eObject), null, new UpdateValueStrategy() {
@Override
protected IStatus doSet(IObservableValue observableValue, Object value) {
if (getCompletionProposalAdapter() == null) {
return super.doSet(observableValue, value);
} else if (!getCompletionProposalAdapter().isProposalPopupOpen())
return super.doSet(observableValue, value);
return Status.OK_STATUS;
}
});
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class StatePropertySection method bindDocumentationControl.
protected void bindDocumentationControl(EMFDataBindingContext context) {
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION);
ISWTObservableValue observe = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(documentation);
context.bindValue(observe, property.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class TransitionPropertySection method bindModel.
@Override
public void bindModel(EMFDataBindingContext context) {
IEMFValueProperty modelProperty = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), SGraphPackage.Literals.SPECIFICATION_ELEMENT__SPECIFICATION);
ISWTObservableValue uiProperty = WidgetProperties.text(SWT.FocusOut).observe(textControl);
context.bindValue(uiProperty, modelProperty.observe(eObject), null, new UpdateValueStrategy() {
@Override
protected IStatus doSet(IObservableValue observableValue, Object value) {
if (getCompletionProposalAdapter() != null && !getCompletionProposalAdapter().isProposalPopupOpen())
return super.doSet(observableValue, value);
return Status.OK_STATUS;
}
});
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION);
ISWTObservableValue observe = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(documentation);
context.bindValue(observe, property.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class StatechartPropertySection method bindDocumentationControl.
protected void bindDocumentationControl(EMFDataBindingContext context) {
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION);
ISWTObservableValue observe = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(documentation);
context.bindValue(observe, property.observe(eObject));
}
Aggregations