public abstract class SynchronizationOperation extends TeamOperation
This class may be subclasses by clients.
ISynchronizationContext,
IMergeContext| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizationOperation(ISynchronizePageConfiguration configuration,
Object[] elements)
Create a synchronize operation that operations on the given elements
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
execute(IProgressMonitor monitor)
Execute the operation.
|
ISynchronizePageConfiguration |
getConfiguration()
Return the configuration for the page from which this
operation was launched.
|
protected ISynchronizationContext |
getContext()
Return the synchronization context associated with this action.
|
Object[] |
getElements()
Return the model elements that are the target of this operation.
|
SaveableComparison |
getSaveable()
Return the saveable that this operation will write its results
to or
null if the operation does not buffer
its results. |
void |
run(IProgressMonitor monitor)
Runs this operation.
|
boolean |
shouldRun()
Make
shouldRun public so the result
can be used to provide handler enablement |
belongsTo, canRunAsJob, getGotoAction, getJobName, getKeepOperation, getOperationIcon, getPart, getSchedulingRule, getShell, isKeepOneProgressServiceEntry, isPostponeAutobuild, isSameFamilyAs, isUserInitiated, runaboutToRun, awake, done, running, scheduled, sleepingprotected SynchronizationOperation(ISynchronizePageConfiguration configuration, Object[] elements)
configuration - the configuration for the page the operation is associated withelements - the elements to be operated onpublic ISynchronizePageConfiguration getConfiguration()
protected ISynchronizationContext getContext()
public Object[] getElements()
public boolean shouldRun()
shouldRun public so the result
can be used to provide handler enablementshouldRun in class TeamOperationpublic SaveableComparison getSaveable()
null if the operation does not buffer
its results. By default, null is returned but
subclasses may override.nullpublic final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
IRunnableWithProgressIRunnableContext's run method,
which supplies the progress monitor.
A request to cancel the operation should be honored and acknowledged
by throwing InterruptedException.monitor - the progress monitor to use to display progress and receive
requests for cancelationInvocationTargetException - if the run method must propagate a checked exception,
it should wrap it inside an InvocationTargetException; runtime exceptions are automatically
wrapped in an InvocationTargetException by the calling contextInterruptedException - if the operation detects a request to cancel,
using IProgressMonitor.isCanceled(), it should exit by throwing
InterruptedExceptionIRunnableContext.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)protected abstract void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
TeamOperation.run() or run(IProgressMonitor)
to invoke the operation.monitor - a progress monitorInvocationTargetExceptionInterruptedExceptionGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.