Lines 477-483
Link Here
|
477 |
* </p> |
477 |
* </p> |
478 |
* </div> |
478 |
* </div> |
479 |
*/ |
479 |
*/ |
480 |
public void runUserActionTask( final CancellableTask<CompilationController> task, final boolean shared) throws IOException { |
480 |
public void runUserActionTask( final Task<CompilationController> task, final boolean shared) throws IOException { |
481 |
if (task == null) { |
481 |
if (task == null) { |
482 |
throw new IllegalArgumentException ("Task cannot be null"); //NOI18N |
482 |
throw new IllegalArgumentException ("Task cannot be null"); //NOI18N |
483 |
} |
483 |
} |
Lines 632-638
Link Here
|
632 |
* @throws IOException encapsulating the exception thrown by {@link CancellableTasks#run} |
632 |
* @throws IOException encapsulating the exception thrown by {@link CancellableTasks#run} |
633 |
* @since 0.12 |
633 |
* @since 0.12 |
634 |
*/ |
634 |
*/ |
635 |
public Future<Void> runWhenScanFinished (final CancellableTask<CompilationController> task, final boolean shared) throws IOException { |
635 |
public Future<Void> runWhenScanFinished (final Task<CompilationController> task, final boolean shared) throws IOException { |
636 |
assert task != null; |
636 |
assert task != null; |
637 |
final ScanSync sync = new ScanSync (task); |
637 |
final ScanSync sync = new ScanSync (task); |
638 |
final DeferredTask r = new DeferredTask (this,task,shared,sync); |
638 |
final DeferredTask r = new DeferredTask (this,task,shared,sync); |
Lines 697-706
Link Here
|
697 |
/** Runs a task which permits for modifying the sources. |
697 |
/** Runs a task which permits for modifying the sources. |
698 |
* Call to this method will cancel processig of all the phase completion tasks until |
698 |
* Call to this method will cancel processig of all the phase completion tasks until |
699 |
* this task does not finish.<BR> |
699 |
* this task does not finish.<BR> |
700 |
* @see CancellableTask for information about implementation requirements |
700 |
* @see Task for information about implementation requirements |
701 |
* @param task The task which. |
701 |
* @param task The task which. |
702 |
*/ |
702 |
*/ |
703 |
public ModificationResult runModificationTask(CancellableTask<WorkingCopy> task) throws IOException { |
703 |
public ModificationResult runModificationTask(Task<WorkingCopy> task) throws IOException { |
704 |
if (task == null) { |
704 |
if (task == null) { |
705 |
throw new IllegalArgumentException ("Task cannot be null"); //NOI18N |
705 |
throw new IllegalArgumentException ("Task cannot be null"); //NOI18N |
706 |
} |
706 |
} |
Lines 1984-1994
Link Here
|
1984 |
|
1984 |
|
1985 |
static final class ScanSync implements Future<Void> { |
1985 |
static final class ScanSync implements Future<Void> { |
1986 |
|
1986 |
|
1987 |
private CancellableTask<CompilationController> task; |
1987 |
private Task<CompilationController> task; |
1988 |
private final CountDownLatch sync; |
1988 |
private final CountDownLatch sync; |
1989 |
private final AtomicBoolean canceled; |
1989 |
private final AtomicBoolean canceled; |
1990 |
|
1990 |
|
1991 |
public ScanSync (final CancellableTask<CompilationController> task) { |
1991 |
public ScanSync (final Task<CompilationController> task) { |
1992 |
assert task != null; |
1992 |
assert task != null; |
1993 |
this.task = task; |
1993 |
this.task = task; |
1994 |
this.sync = new CountDownLatch (1); |
1994 |
this.sync = new CountDownLatch (1); |
Lines 2039-2049
Link Here
|
2039 |
|
2039 |
|
2040 |
static final class DeferredTask { |
2040 |
static final class DeferredTask { |
2041 |
final JavaSource js; |
2041 |
final JavaSource js; |
2042 |
final CancellableTask<CompilationController> task; |
2042 |
final Task<CompilationController> task; |
2043 |
final boolean shared; |
2043 |
final boolean shared; |
2044 |
final ScanSync sync; |
2044 |
final ScanSync sync; |
2045 |
|
2045 |
|
2046 |
public DeferredTask (final JavaSource js, final CancellableTask<CompilationController> task, final boolean shared, final ScanSync sync) { |
2046 |
public DeferredTask (final JavaSource js, final Task<CompilationController> task, final boolean shared, final ScanSync sync) { |
2047 |
assert js != null; |
2047 |
assert js != null; |
2048 |
assert task != null; |
2048 |
assert task != null; |
2049 |
assert sync != null; |
2049 |
assert sync != null; |