Search in sources :

Example 11 with IEMFValueProperty

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));
}
Also used : ISWTObservableValue(org.eclipse.jface.databinding.swt.ISWTObservableValue) IEMFValueProperty(org.eclipse.emf.databinding.IEMFValueProperty)

Example 12 with IEMFValueProperty

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));
}
Also used : ISWTObservableValue(org.eclipse.jface.databinding.swt.ISWTObservableValue) IEMFValueProperty(org.eclipse.emf.databinding.IEMFValueProperty)

Example 13 with IEMFValueProperty

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));
}
Also used : ISWTObservableValue(org.eclipse.jface.databinding.swt.ISWTObservableValue) IEMFValueProperty(org.eclipse.emf.databinding.IEMFValueProperty)

Example 14 with IEMFValueProperty

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);
}
Also used : ValidatingEMFDatabindingContext(org.yakindu.sct.ui.editor.propertysheets.ValidatingEMFDatabindingContext) ISWTObservableValue(org.eclipse.jface.databinding.swt.ISWTObservableValue) IObservableValue(org.eclipse.core.databinding.observable.value.IObservableValue) IEMFValueProperty(org.eclipse.emf.databinding.IEMFValueProperty)

Aggregations

IEMFValueProperty (org.eclipse.emf.databinding.IEMFValueProperty)14 ISWTObservableValue (org.eclipse.jface.databinding.swt.ISWTObservableValue)11 UpdateValueStrategy (org.eclipse.core.databinding.UpdateValueStrategy)4 IObservableValue (org.eclipse.core.databinding.observable.value.IObservableValue)4 IStatus (org.eclipse.core.runtime.IStatus)3 EObject (org.eclipse.emf.ecore.EObject)3 IViewerObservableValue (org.eclipse.jface.databinding.viewers.IViewerObservableValue)1 IDomain (org.yakindu.sct.domain.extension.IDomain)1 ValidatingEMFDatabindingContext (org.yakindu.sct.ui.editor.propertysheets.ValidatingEMFDatabindingContext)1