commit | 045d698f5769d110f20411cbdd2b91664337f97d | [log] [tgz] |
---|---|---|
author | Eike Stepper <stepper@esc-net.de> | Wed Jul 02 13:07:30 2014 +0200 |
committer | Pascal Rapicault <pascal@rapicorp.com> | Mon Feb 02 10:37:41 2015 -0500 |
tree | 2fed6c03d38e67bd784a133d845c19d1ed467522 | |
parent | 6cf7e98bd1fe3001279ba1bde421be18fc457a39 [diff] |
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>