Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2009-12-08 15:32:47 +0000
committerPascal Rapicault2009-12-08 15:32:47 +0000
commit2ae04749ac14b3f97a668d56f0d8efef53ee0f45 (patch)
treef0e2959fdaa9c9b456a8ced631765cc8196b7a11
parent241c85bd09a7a863d3e7744a2f80bd3544d4bf21 (diff)
downloadrt.equinox.p2-2ae04749ac14b3f97a668d56f0d8efef53ee0f45.tar.gz
rt.equinox.p2-2ae04749ac14b3f97a668d56f0d8efef53ee0f45.tar.xz
rt.equinox.p2-2ae04749ac14b3f97a668d56f0d8efef53ee0f45.zip
Remove the isFragment call from IInstallableUnit
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java4
17 files changed, 29 insertions, 31 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
index f0055da72..cfa7ce375 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
@@ -16,6 +16,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnitFrag
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
public class AttachmentHelper {
private static final IInstallableUnitFragment[] NO_FRAGMENTS = new IInstallableUnitFragment[0];
@@ -47,7 +48,7 @@ public class AttachmentHelper {
ArrayList applicableFragments = new ArrayList();
for (Iterator iterator2 = potentialIUFragments.iterator(); iterator2.hasNext();) {
IInstallableUnit dependentIU = (IInstallableUnitFragment) iterator2.next();
- if (hostIU.equals(dependentIU) || !dependentIU.isFragment())
+ if (hostIU.equals(dependentIU) || !FragmentQuery.isFragment(dependentIU))
continue;
IInstallableUnitFragment potentialFragment = (IInstallableUnitFragment) dependentIU;
@@ -90,7 +91,7 @@ public class AttachmentHelper {
if (iu == null)
continue;
//just return fragments as they are
- if (iu.isFragment()) {
+ if (FragmentQuery.isFragment(iu)) {
result.add(iu);
continue;
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
index 10915b93a..c82973da9 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
@@ -17,6 +17,7 @@ import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.osgi.util.NLS;
public class Configure extends InstallableUnitPhase {
@@ -31,7 +32,7 @@ public class Configure extends InstallableUnitPhase {
protected ProvisioningAction[] getActions(InstallableUnitOperand currentOperand) {
IInstallableUnit unit = currentOperand.second();
- if (unit.isFragment())
+ if (FragmentQuery.isFragment(unit))
return null;
return getActions(unit, phaseId);
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
index 75792d433..8815c5d14 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.osgi.util.NLS;
public class Install extends InstallableUnitPhase {
@@ -94,7 +95,7 @@ public class Install extends InstallableUnitPhase {
afterAction.setTouchpoint(touchpoint);
}
- if (unit.isFragment())
+ if (FragmentQuery.isFragment(unit))
return new ProvisioningAction[] {beforeAction, afterAction};
ProvisioningAction[] parsedActions = getActions(unit, phaseId);
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
index 71dac0b53..474357d58 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
@@ -17,6 +17,7 @@ import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
public class Unconfigure extends InstallableUnitPhase {
@@ -36,7 +37,7 @@ public class Unconfigure extends InstallableUnitPhase {
//TODO: monitor.subTask(NLS.bind(Messages.Engine_Unconfiguring_IU, unit.getId()));
IInstallableUnit unit = currentOperand.first();
- if (unit.isFragment())
+ if (FragmentQuery.isFragment(unit))
return null;
return getActions(unit, phaseId);
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
index 72af4a9ff..f3754d207 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
public class Uninstall extends InstallableUnitPhase {
@@ -93,7 +94,7 @@ public class Uninstall extends InstallableUnitPhase {
afterAction.setTouchpoint(touchpoint);
}
- if (unit.isFragment())
+ if (FragmentQuery.isFragment(unit))
return new ProvisioningAction[] {beforeAction, afterAction};
ProvisioningAction[] parsedActions = getActions(unit, phaseId);
if (parsedActions == null)
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
index d053073ff..3bb30e600 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
@@ -24,6 +24,7 @@ import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
import org.eclipse.equinox.internal.provisional.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
@@ -55,7 +56,7 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
attribute(SINGLETON_ATTRIBUTE, iu.isSingleton(), true);
// attribute(FRAGMENT_ATTRIBUTE, iu.isFragment(), false);
- if (iu.isFragment() && iu instanceof IInstallableUnitFragment) {
+ if (FragmentQuery.isFragment(iu) && iu instanceof IInstallableUnitFragment) {
IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
writeHostRequiredCapabilities(fragment.getHost());
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
index fbe8eb7a3..70092e7cd 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
@@ -168,10 +168,6 @@ public class InstallableUnit implements IInstallableUnit {
return result;
}
- public boolean isFragment() {
- return false;
- }
-
public boolean isResolved() {
return false;
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
index 2f1687600..41b76cc93 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
@@ -36,10 +36,6 @@ public class InstallableUnitFragment extends InstallableUnit implements IInstall
setRequiredCapabilities(result);
}
- public boolean isFragment() {
- return true;
- }
-
public IRequirement[] getHost() {
return hostRequirements;
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
index bd077680a..2c02c0ac1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
@@ -110,10 +110,6 @@ public class ResolvedInstallableUnit implements IInstallableUnit {
return original.getVersion();
}
- public boolean isFragment() {
- return original.isFragment();
- }
-
public boolean isSingleton() {
return original.isSingleton();
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
index 1f81e72cf..2e7a6b3bf 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
@@ -134,8 +134,6 @@ public interface IInstallableUnit extends IVersionedId, Comparable {
public ITouchpointType getTouchpointType();
- public boolean isFragment();
-
/**
* Returns whether this installable unit has been resolved. A resolved
* installable unit represents the union of an installable unit and some
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
index ad95dc40c..fe5acbcb8 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
@@ -18,6 +18,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
@@ -92,7 +93,7 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
IInstallableUnit iu = (IInstallableUnit) i.next();
// skip over source bundles and fragments
// TODO should we use the source property here rather than magic name matching?
- if (iu.getId().endsWith(".source") || iu.isFragment()) //$NON-NLS-1$
+ if (iu.getId().endsWith(".source") || FragmentQuery.isFragment(iu)) //$NON-NLS-1$
continue;
advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
found = true;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
index 010a94f17..dd5291940 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
@@ -33,6 +33,7 @@ import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.equinox.p2.publisher.PublisherInfo;
import org.eclipse.equinox.p2.publisher.eclipse.*;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
@@ -1034,15 +1035,15 @@ public abstract class AbstractProvisioningTest extends TestCase {
if (!iu1.equals(iu2))
fail(message + " " + iu1 + " is not equal to " + iu2);
- if (iu1.isFragment()) {
- if (!iu2.isFragment())
+ if (FragmentQuery.isFragment(iu1)) {
+ if (!FragmentQuery.isFragment(iu2))
fail(message + " " + iu1 + " is not a fragment.");
try {
assertEquals(message, ((IInstallableUnitFragment) iu1).getHost(), ((IInstallableUnitFragment) iu2).getHost());
} catch (AssertionFailedError failure) {
fail(message + " Unequal hosts: " + failure.getMessage());
}
- } else if (iu2.isFragment()) {
+ } else if (FragmentQuery.isFragment(iu2)) {
fail(message + " " + iu2 + " is a fragment.");
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
index 4c370dc5a..4a48aec1d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
@@ -18,6 +18,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.equinox.p2.publisher.eclipse.AdviceFileParser;
public class AdviceFileParserTest extends TestCase {
@@ -270,7 +271,7 @@ public class AdviceFileParserTest extends TestCase {
assertEquals("testid0", iu0.getId());
assertEquals(Version.create("1.2.3"), iu0.getVersion());
assertFalse(iu0.isSingleton());
- assertFalse(iu0.isFragment());
+ assertFalse(FragmentQuery.isFragment(iu0));
assertEquals(0, iu0.getArtifacts().length);
assertEquals(null, iu0.getCopyright());
assertEquals(null, iu0.getFilter());
@@ -352,7 +353,7 @@ public class AdviceFileParserTest extends TestCase {
assertEquals(2, iu1.getUpdateDescriptor().getSeverity());
assertEquals("some description", iu1.getUpdateDescriptor().getDescription());
- assertTrue(iu1.isFragment());
+ assertTrue(FragmentQuery.isFragment(iu1));
IRequirement[] hostRequired = ((IInstallableUnitFragment) iu1).getHost();
assertEquals(2, hostRequired.length);
assertEquals("testNamespace1", ((IRequiredCapability) hostRequired[0].getMatches()).getNamespace());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
index 5289380a6..a996abf80 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
@@ -24,6 +24,7 @@ import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
import org.eclipse.equinox.internal.provisional.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.equinox.p2.publisher.IPublisherResult;
import org.eclipse.equinox.p2.publisher.eclipse.*;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
@@ -90,7 +91,7 @@ public class ConfigCUsActionTest extends ActionTest {
verifyProvidedCapability(providedCapabilities, flavor + id, id + "." + cuType, version); //$NON-NLS-1$
assertTrue(providedCapabilities.length == 2);
assertTrue(iu.getRequiredCapabilities().length == 0);
- assertFalse(iu.isFragment());
+ assertTrue(FragmentQuery.isFragment(iu));
return; //pass
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
index c4d713f2e..406450bcf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
@@ -52,7 +52,6 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
version = Version.emptyVersion;
expect(result.getVersion()).andReturn(version).anyTimes();
expect(result.getFilter()).andReturn(null).anyTimes();
- expect(result.isFragment()).andReturn(fragment).anyTimes();
replay(result);
return result;
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
index 8b6206199..909f83902 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.osgi.util.NLS;
public class InstallBundleAction extends ProvisioningAction {
@@ -44,7 +45,7 @@ public class InstallBundleAction extends ProvisioningAction {
return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
//TODO: eventually remove this. What is a fragment doing here??
- if (iu.isFragment()) {
+ if (FragmentQuery.isFragment(iu)) {
System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
index 72231a3e5..2ad51aef4 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
@@ -21,8 +21,10 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
import org.eclipse.osgi.util.NLS;
+
public class UninstallBundleAction extends ProvisioningAction {
public static final String ID = "uninstallBundle"; //$NON-NLS-1$
@@ -44,7 +46,7 @@ public class UninstallBundleAction extends ProvisioningAction {
return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
//TODO: eventually remove this. What is a fragment doing here??
- if (iu.isFragment()) {
+ if (FragmentQuery.isFragment(iu)) {
System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
return Status.OK_STATUS;
}

Back to the top