Search in sources :

Example 6 with UISynchronize

use of org.eclipse.e4.ui.di.UISynchronize in project whole by wholeplatform.

the class FramesChangeEventHandler method resfreshNotation.

public void resfreshNotation(final IEntity source) {
    EntityEditDomain editDomain = context.get(IEntityPartViewer.class).getEditDomain();
    if (editDomain.isDisabled() || !isVariabilityDescendant(source))
        return;
    UISynchronize uiSynchronize = context.get(UISynchronize.class);
    uiSynchronize.syncExec(() -> editDomain.setDisabled(true));
    FramesUtils.updateSubset(source);
    uiSynchronize.asyncExec(() -> editDomain.setDisabled(false));
}
Also used : EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain) IEntityPartViewer(org.whole.lang.ui.viewers.IEntityPartViewer) UISynchronize(org.eclipse.e4.ui.di.UISynchronize)

Aggregations

UISynchronize (org.eclipse.e4.ui.di.UISynchronize)5 IEntity (org.whole.lang.model.IEntity)2 OperationCanceledException (org.whole.lang.operations.OperationCanceledException)2 EntityEditDomain (org.whole.lang.ui.viewers.EntityEditDomain)2 IEntityPartViewer (org.whole.lang.ui.viewers.IEntityPartViewer)2 ISafeRunnable (org.eclipse.core.runtime.ISafeRunnable)1 CanExecute (org.eclipse.e4.core.di.annotations.CanExecute)1 Execute (org.eclipse.e4.core.di.annotations.Execute)1 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)1 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)1 E4UIDecorationManager (org.whole.lang.e4.ui.operations.E4UIDecorationManager)1 IEditorKit (org.whole.lang.reflect.IEditorKit)1 ModelTransactionCommand (org.whole.lang.ui.commands.ModelTransactionCommand)1