Bug 540685 - Document which Job#create method to prefer - ICoreRunnable
or IJobFunction
Change-Id: Ib1bd47a5b40df2f1fd1070c01bb671ecbbe0bf47
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
index 8bdf6a5..16a13db 100644
--- a/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
+++ b/bundles/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
@@ -148,10 +148,12 @@
}
/**
- * Creates a new Job that will execute the provided function
- * when it runs.
+ * Creates a new Job that will execute the provided function when it runs.
*
- * @param name The name of the job
+ * Prefer using {@link Job#create(String, ICoreRunnable)} as this does not
+ * require to call done on the monitor and relies on OperationCanceledException
+ *
+ * @param name The name of the job
* @param function The function to execute
* @return A job that encapsulates the provided function
* @see IJobFunction
@@ -196,10 +198,11 @@
* Creates a new system {@link Job} with the given name that will execute the
* provided function when it runs.
*
- * @param name
- * the name of the job
- * @param function
- * The function to execute
+ * Prefer using {@link Job#createSystem(String, ICoreRunnable)} as this does not
+ * require to call done on the monitor and relies on OperationCanceledException
+ *
+ * @param name the name of the job
+ * @param function The function to execute
* @return a job that encapsulates the provided function
* @see IJobFunction
* @see Job#setSystem(boolean)