1 19 package org.netbeans.modules.retouche.editor.semantic; 20 import org.netbeans.api.gsf.CancellableTask; 21 22 31 public abstract class ScanningCancellableTask<T> implements CancellableTask<T> { 32 33 private boolean canceled; 34 35 36 protected ScanningCancellableTask() { 37 } 38 39 public final synchronized void cancel() { 40 System.err.println("ScanningCancellableTask.cancel: Not yet implemented"); 41 } 50 51 public abstract void run(T parameter) throws Exception ; 52 53 protected final synchronized boolean isCancelled() { 54 return canceled; 55 } 56 57 protected final synchronized void resume() { 58 canceled = false; 59 } 60 61 } 105 | Popular Tags |