mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 22:05:44 +02:00
documentation enhancement
This commit is contained in:
parent
9500d9b90a
commit
0bba84bfef
1 changed files with 40 additions and 15 deletions
|
@ -110,13 +110,20 @@ public class RequestMonitor extends DsfExecutable {
|
||||||
private boolean fCanceled = false;
|
private boolean fCanceled = false;
|
||||||
private boolean fDone = false;
|
private boolean fDone = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor with an optional parent monitor.
|
* Constructor with an optional parent monitor.
|
||||||
* @param executor This executor will be used to invoke the runnable that
|
*
|
||||||
* will allow processing the completion code of this request monitor.
|
* @param executor
|
||||||
* @param parentRequestMonitor The optional parent request monitor to be invoked by
|
* This executor will be used to invoke the runnable that will
|
||||||
* default when this request completes. Parameter may be null.
|
* allow processing the completion code of this request monitor.
|
||||||
*/
|
* I.e., the runnable will call {@link #handleCompleted()}.
|
||||||
|
* @param parentRequestMonitor
|
||||||
|
* An optional parent request monitor. By default, our completion
|
||||||
|
* handlers invoke the parent monitor's <code>done</code> method,
|
||||||
|
* thus allowing monitors to be daisy chained. If this request is
|
||||||
|
* unsuccessful, its status is set into the parent monitor.
|
||||||
|
* Parameter may be null.
|
||||||
|
*/
|
||||||
public RequestMonitor(Executor executor, RequestMonitor parentRequestMonitor) {
|
public RequestMonitor(Executor executor, RequestMonitor parentRequestMonitor) {
|
||||||
fExecutor = executor;
|
fExecutor = executor;
|
||||||
fParentRequestMonitor = parentRequestMonitor;
|
fParentRequestMonitor = parentRequestMonitor;
|
||||||
|
@ -262,14 +269,32 @@ public class RequestMonitor extends DsfExecutable {
|
||||||
public boolean isSuccess() {
|
public boolean isSuccess() {
|
||||||
return !isCanceled() && getStatus().getSeverity() <= IStatus.INFO;
|
return !isCanceled() && getStatus().getSeverity() <= IStatus.INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default handler for the completion of a request. The implementation
|
* First tier handler for the completion of the request. By default, the
|
||||||
* calls {@link #handleSuccess()} if the request succeeded, and calls
|
* {@link #done()} method drives this method on the executor specified at
|
||||||
* {@link #handleFailure()} or cancel otherwise.
|
* construction time. By default, this handler merely calls a more
|
||||||
* <br>
|
* specialized handler, which in turn may call an even more specialized
|
||||||
* Note: Sub-classes may override this method.
|
* handler, and so on, thus giving a subclass the ability to
|
||||||
*/
|
* compartmentalize its completion logic by overriding specific handlers.
|
||||||
|
* All handlers are named <code>handleXxxxx</code>. More specifically, the
|
||||||
|
* base implementation calls {@link #handleSuccess()} if the request
|
||||||
|
* succeeded, and calls {@link #handleFailure()} otherwise. <br>
|
||||||
|
*
|
||||||
|
* The complete hierarchy of handlers is as follows: <br>
|
||||||
|
* <pre>
|
||||||
|
* + handleCompleted
|
||||||
|
* - handleSuccess
|
||||||
|
* + handleFailure
|
||||||
|
* - handleCancel
|
||||||
|
* + handleErrororWarning
|
||||||
|
* - handleError
|
||||||
|
* - handleWarning
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Note: Sub-classes may override this method.
|
||||||
|
*/
|
||||||
@ConfinedToDsfExecutor("fExecutor")
|
@ConfinedToDsfExecutor("fExecutor")
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
if (isSuccess()) {
|
if (isSuccess()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue