use of org.yakindu.sct.ui.editor.propertysheets.ValidatingEMFDatabindingContext 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