Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-04-01 11:53:35 -0400
committerSusan Franklin2010-04-01 11:53:35 -0400
commit0dd99fd2cb02c025257882f49ed04770abb4524e (patch)
tree71e91c7d7cb480c6591dc4165378320cfe6ef007 /examples
parent506e097221917f8beee623b6c2c3e8fbe04cdfea (diff)
downloadrt.equinox.p2-0dd99fd2cb02c025257882f49ed04770abb4524e.tar.gz
rt.equinox.p2-0dd99fd2cb02c025257882f49ed04770abb4524e.tar.xz
rt.equinox.p2-0dd99fd2cb02c025257882f49ed04770abb4524e.zip
doc
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
index 66c9027ef..cca8f3f7d 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
@@ -20,6 +20,21 @@ import org.eclipse.equinox.p2.operations.ProvisioningJob;
import org.eclipse.equinox.p2.operations.ProvisioningSession;
import org.eclipse.equinox.p2.operations.UpdateOperation;
+/**
+ * This class shows an example for checking for updates and performing the
+ * update synchronously. It is up to the caller to run this in a job if
+ * a background update check is desired. This is a reasonable way to run an
+ * operation when user intervention is not required. Another approach is
+ * to separately perform the resolution and provisioning steps, deciding
+ * whether to perform these synchronously or in a job.
+ *
+ * Any p2 operation can be run modally (synchronously), or the job
+ * can be requested and scheduled by the caller.
+ *
+ * @see UpdateOperation#resolveModal(IProgressMonitor)
+ * @see UpdateOperation#getResolveJob(IProgressMonitor)
+ * @see UpdateOperation#getProvisioningJob(IProgressMonitor)
+ */
public class P2Util {
// XXX Check for updates to this application and return a status.
static IStatus checkForUpdates(IProvisioningAgent agent, IProgressMonitor monitor) throws OperationCanceledException {

Back to the top