Bug 438714 - Expose whether a provisioning plan has operands or not

This change adds a public isEmpty() method to IProvisioningPlan.

Change-Id: Ib1eef3c306f524bc542cca0885b9b7e32c90d8a9
Signed-off-by: Eike Stepper <stepper@esc-net.de>
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
index 992f4ad..7703e3a 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
@@ -68,6 +68,10 @@
 		return operands.toArray(new Operand[operands.size()]);
 	}
 
+	public boolean isEmpty() {
+		return operands.isEmpty();
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getRemovals()
 	 */
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
index 2493b85..a6ca379 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
@@ -91,6 +91,13 @@
 	public IStatus getStatus();
 
 	/**
+	 * Returns <code>true</code> if the plan contains no operations, <code>false</code> otherwise.
+	 *
+	 * @return <code>true</code> if the plan contains no operations, <code>false</code> otherwise.
+	 */
+	public boolean isEmpty();
+
+	/**
 	 * Adds an installable unit to the plan. This will cause the given installable unit
 	 * to be installed into the profile when this plan is executed by the engine. 
 	 * <p>