@@ -0,0 +1,1056 @@
+/*******************************************************************************%0A * Copyright (c) 2014 itemis AG (http://www.itemis.eu) and others.%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *******************************************************************************/%0Apackage org.eclipse.xtext.util.concurrent;%0A%0Aimport org.eclipse.xtext.util.CancelIndicator;%0A%0A/**%0A * @author Jan Koehnlein - Initial contribution and API%0A * @since 2.7%0A */%0Apublic abstract class CancelableUnitOfWork%3CR,P%3E implements IUnitOfWork%3CR, P%3E %7B%0A%09%0A%09private CancelIndicator cancelIndicator;%0A%0A%09public void setCancelIndicator(CancelIndicator cancelIndicator) %7B%0A%09%09this.cancelIndicator = cancelIndicator;%0A%09%7D%0A%09%0A%09public R exec(P state) throws Exception %7B%0A%09%09return exec(state, cancelIndicator);%0A%09%7D%0A%0A%09public abstract R exec(P state, CancelIndicator cancelIndicator) throws Exception;%0A%7D%0A

Make read-only jobs cancelable