Search in sources :

Example 1 with E4UIDecorationManager

use of org.whole.lang.e4.ui.operations.E4UIDecorationManager in project whole by wholeplatform.

the class ValidateModelRunnable method run.

@Override
public void run(IOperationProgressMonitor pm) throws InvocationTargetException, InterruptedException {
    pm.beginTask("Validating...", IOperationProgressMonitor.TOTAL_WORK);
    try {
        UISynchronize synchronize = context.get(UISynchronize.class);
        bm.wDefValue("decorationManager", new E4UIDecorationManager(synchronize, bm));
        HandlersBehavior.validateModel(bm);
        if (MarkerUtils.findMarkers((IResource) bm.wGetValue("file"), true).length > 0)
            E4Utils.revealPart(context, "org.eclipse.ui.views.ProblemView");
    } catch (OperationCanceledException e) {
    // gracefully terminate execution
    } finally {
        pm.endTask();
    }
}
Also used : E4UIDecorationManager(org.whole.lang.e4.ui.operations.E4UIDecorationManager) OperationCanceledException(org.whole.lang.operations.OperationCanceledException) UISynchronize(org.eclipse.e4.ui.di.UISynchronize)

Aggregations

UISynchronize (org.eclipse.e4.ui.di.UISynchronize)1 E4UIDecorationManager (org.whole.lang.e4.ui.operations.E4UIDecorationManager)1 OperationCanceledException (org.whole.lang.operations.OperationCanceledException)1