use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class ExitPropertySection method bindModel.
@Override
public void bindModel(EMFDataBindingContext context) {
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.NAMED_ELEMENT__NAME);
ISWTObservableValue observe = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(nameText);
context.bindValue(observe, property.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class RegionPropertySection method bindModel.
@Override
public void bindModel(EMFDataBindingContext context) {
IEMFValueProperty property = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.NAMED_ELEMENT__NAME);
ISWTObservableValue observe = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(nameText);
context.bindValue(observe, property.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class StatePropertySection method bindNameControl.
protected void bindNameControl(EMFDataBindingContext context) {
IEMFValueProperty nameProperty = EMFEditProperties.value(TransactionUtil.getEditingDomain(eObject), BasePackage.Literals.NAMED_ELEMENT__NAME);
ISWTObservableValue nameTextProperty = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.DefaultSelection }).observe(txtName);
context.bindValue(nameTextProperty, nameProperty.observe(eObject));
}
use of org.eclipse.emf.databinding.IEMFValueProperty in project statecharts by Yakindu.
the class StatechartDefinitionSection method initBinding.
@SuppressWarnings({ "unchecked", "rawtypes" })
protected void initBinding(StyledText embeddedEditorWidget) {
IEMFValueProperty modelProperty = EMFEditProperties.value(getTransactionalEditingDomain(), SGraphPackage.Literals.SPECIFICATION_ELEMENT__SPECIFICATION);
ISWTObservableValue uiProperty = WidgetProperties.text(new int[] { SWT.FocusOut, SWT.Modify }).observe(embeddedEditorWidget);
IObservableValue modelPropertyObservable = modelProperty.observe(getContextObject());
ValidatingEMFDatabindingContext context = new ValidatingEMFDatabindingContext((IContextElementProvider) editorPart, editorPart.getSite().getShell());
context.bindValue(uiProperty, modelPropertyObservable, null, null);
}
Aggregations