org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation Java Examples

The following examples show how to use org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ValidateAction.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
* @generated
*/
public void run() {
	IWorkbenchPart workbenchPart = page.getActivePart();
	if (workbenchPart instanceof IDiagramWorkbenchPart) {
		final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
		try {
			new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {

				public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
					runValidation(part.getDiagramEditPart(), part.getDiagram());
				}
			}).run(new NullProgressMonitor());
		} catch (Exception e) {
			CrossflowDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
		}
	}
}
 
Example #2
Source File: ValidateAction.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
public void run() {
	IWorkbenchPart workbenchPart = page.getActivePart();
	if (workbenchPart instanceof IDiagramWorkbenchPart) {
		final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
		try {
			new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() {

				public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
					runValidation(part.getDiagramEditPart(), part.getDiagram());
				}
			}).run(new NullProgressMonitor());
		} catch (Exception e) {
			ProcessDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
		}
	}
}
 
Example #3
Source File: WorkspaceOperationRunner.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable, ISchedulingRule schedulingRule) throws InvocationTargetException, InterruptedException {
	WorkspaceModifyDelegatingOperation operation= new WorkspaceModifyDelegatingOperation(runnable, schedulingRule);
	operation.run(getProgressMonitor());
}