diff options
author | Eike Stepper | 2014-07-02 11:07:30 +0000 |
---|---|---|
committer | Pascal Rapicault | 2015-02-02 15:37:41 +0000 |
commit | 045d698f5769d110f20411cbdd2b91664337f97d (patch) | |
tree | 2fed6c03d38e67bd784a133d845c19d1ed467522 | |
parent | 6cf7e98bd1fe3001279ba1bde421be18fc457a39 (diff) | |
download | rt.equinox.p2-045d698f5769d110f20411cbdd2b91664337f97d.tar.gz rt.equinox.p2-045d698f5769d110f20411cbdd2b91664337f97d.tar.xz rt.equinox.p2-045d698f5769d110f20411cbdd2b91664337f97d.zip |
Bug 438714 - Expose whether a provisioning plan has operands or notI20150210-0800I20150203-0800
This change adds a public isEmpty() method to IProvisioningPlan.
Change-Id: Ib1eef3c306f524bc542cca0885b9b7e32c90d8a9
Signed-off-by: Eike Stepper <stepper@esc-net.de>
2 files changed, 11 insertions, 0 deletions
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 992f4adaa..7703e3a67 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 @@ public class ProvisioningPlan implements IProvisioningPlan { 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 2493b85fd..a6ca379ab 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 interface IProvisioningPlan { 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> |