Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 152365 Details for
Bug 292691
PDE's use of p2 API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch absorbing changes around iinstallableunit
pde2.patch (text/plain), 9.63 KB, created by
Pascal Rapicault
on 2009-11-16 23:07:42 EST
(
hide
)
Description:
patch absorbing changes around iinstallableunit
Filename:
MIME Type:
Creator:
Pascal Rapicault
Created:
2009-11-16 23:07:42 EST
Size:
9.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/Attic/RootFileParentAction.java,v >retrieving revision 1.1.2.1 >diff -u -r1.1.2.1 RootFileParentAction.java >--- src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java 30 Oct 2009 18:53:56 -0000 1.1.2.1 >+++ src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java 17 Nov 2009 03:32:36 -0000 >@@ -41,6 +41,7 @@ > public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) { > final String idPrefix = baseId + ".rootfiles"; //$NON-NLS-1$ > final String flavorPrefix = flavor + baseId + ".rootfiles"; //$NON-NLS-1$ >+ //TODO this could be turned into a "name query", a query that checks on some parameters > MatchQuery query = new MatchQuery() { > public boolean isMatch(Object candidate) { > if (candidate instanceof IInstallableUnit) { >#P org.eclipse.pde.core >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF,v >retrieving revision 1.50.4.2 >diff -u -r1.50.4.2 MANIFEST.MF >--- META-INF/MANIFEST.MF 13 Nov 2009 21:30:15 -0000 1.50.4.2 >+++ META-INF/MANIFEST.MF 17 Nov 2009 03:32:37 -0000 >@@ -67,5 +67,6 @@ > org.eclipse.equinox.p2.garbagecollector;bundle-version="[1.0.100,2.0.0)" > Eclipse-LazyStart: true > Bundle-RequiredExecutionEnvironment: J2SE-1.4 >-Import-Package: com.ibm.icu.util >+Import-Package: com.ibm.icu.util, >+ org.eclipse.equinox.p2.touchpoint.eclipse.query > Bundle-ActivationPolicy: lazy >Index: src/org/eclipse/pde/internal/core/target/IUBundleContainer.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java,v >retrieving revision 1.5.2.1 >diff -u -r1.5.2.1 IUBundleContainer.java >--- src/org/eclipse/pde/internal/core/target/IUBundleContainer.java 13 Nov 2009 21:30:15 -0000 1.5.2.1 >+++ src/org/eclipse/pde/internal/core/target/IUBundleContainer.java 17 Nov 2009 03:32:37 -0000 >@@ -27,6 +27,7 @@ > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; > import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager; > import org.eclipse.equinox.p2.engine.IProvisioningPlan; >+import org.eclipse.equinox.p2.touchpoint.eclipse.query.OSGiBundleQuery; > import org.eclipse.osgi.util.NLS; > import org.eclipse.pde.internal.core.PDECore; > import org.eclipse.pde.internal.core.target.provisional.*; >@@ -85,29 +86,6 @@ > private boolean fIncludeMultipleEnvironments = false; > > /** >- * Query for bundles in a profile. Every IU that ends up being installed as a bundle >- * provides a capability in the name space "osgi.bundle". >- */ >- class BundleQuery extends MatchQuery { >- >- /* (non-Javadoc) >- * @see org.eclipse.equinox.internal.provisional.p2.query.MatchQuery#isMatch(java.lang.Object) >- */ >- public boolean isMatch(Object candidate) { >- if (candidate instanceof IInstallableUnit) { >- IInstallableUnit unit = (IInstallableUnit) candidate; >- IProvidedCapability[] provided = unit.getProvidedCapabilities(); >- for (int i = 0; i < provided.length; i++) { >- if (provided[i].getNamespace().equals("osgi.bundle")) { //$NON-NLS-1$ >- return true; >- } >- } >- } >- return false; >- } >- } >- >- /** > * Constructs a installable unit bundle container for the specified units. > * > * @param ids IU identifiers >@@ -265,7 +243,7 @@ > } > > // query for bundles >- BundleQuery query = new BundleQuery(); >+ OSGiBundleQuery query = new OSGiBundleQuery(); > Collector collector = new Collector(); > slice.query(query, collector, new SubProgressMonitor(subMonitor, 10)); > >@@ -423,7 +401,7 @@ > } > > // query for bundles >- collector = slice.query(new BundleQuery(), new Collector(), new SubProgressMonitor(subMonitor, 10)); >+ collector = slice.query(new OSGiBundleQuery(), new Collector(), new SubProgressMonitor(subMonitor, 10)); > > if (subMonitor.isCanceled()) { > return new IResolvedBundle[0]; >Index: src/org/eclipse/pde/internal/core/target/TargetDefinition.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java,v >retrieving revision 1.6 >diff -u -r1.6 TargetDefinition.java >--- src/org/eclipse/pde/internal/core/target/TargetDefinition.java 8 Oct 2009 14:02:55 -0000 1.6 >+++ src/org/eclipse/pde/internal/core/target/TargetDefinition.java 17 Nov 2009 03:32:37 -0000 >@@ -17,10 +17,12 @@ > import org.eclipse.core.runtime.*; > import org.eclipse.debug.core.DebugPlugin; > import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo; >-import org.eclipse.equinox.internal.provisional.p2.metadata.Version; >-import org.eclipse.equinox.internal.provisional.p2.engine.*; >+import org.eclipse.equinox.internal.provisional.p2.engine.IProfile; >+import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry; > import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; >+import org.eclipse.equinox.internal.provisional.p2.metadata.Version; > import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector; >+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery; > import org.eclipse.pde.internal.core.PDECore; > import org.eclipse.pde.internal.core.target.provisional.*; > import org.xml.sax.SAXException; >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java,v >retrieving revision 1.16.2.3 >diff -u -r1.16.2.3 RuntimeInstallJob.java >--- src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java 10 Nov 2009 17:23:58 -0000 1.16.2.3 >+++ src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java 17 Nov 2009 03:32:38 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.equinox.internal.provisional.p2.engine.IProfile; > import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry; > import org.eclipse.equinox.internal.provisional.p2.metadata.*; >+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription; > import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitPatchDescription; > import org.eclipse.equinox.internal.provisional.p2.metadata.query.*; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; >@@ -215,7 +216,7 @@ > iuPatchDescription.setLifeCycle(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, lifecycleUnit.getId(), new VersionRange(lifecycleUnit.getVersion(), true, lifecycleUnit.getVersion(), true), null, false, false, false)); > } > >- iuPatchDescription.setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString()); >+ iuPatchDescription.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString()); > > return MetadataFactory.createInstallableUnitPatch(iuPatchDescription); > } >#P org.eclipse.pde.ui.tests >Index: src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java,v >retrieving revision 1.6 >diff -u -r1.6 IUBundleContainerTests.java >--- src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java 6 Oct 2009 21:58:02 -0000 1.6 >+++ src/org/eclipse/pde/ui/tests/target/IUBundleContainerTests.java 17 Nov 2009 03:32:40 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.core.runtime.*; > import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; > import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector; >-import org.eclipse.equinox.internal.provisional.p2.metadata.query.MatchQuery; >+import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; > import org.eclipse.pde.internal.core.PDECore; >@@ -72,24 +72,8 @@ > * @param repository repository > * @return installable unit > */ >- protected IInstallableUnit getUnit(final String id, IMetadataRepository repository) { >- class IUQuery extends MatchQuery { >- >- /* (non-Javadoc) >- * @see org.eclipse.equinox.internal.provisional.p2.query.MatchQuery#isMatch(java.lang.Object) >- */ >- public boolean isMatch(Object candidate) { >- if (candidate instanceof IInstallableUnit) { >- IInstallableUnit unit = (IInstallableUnit) candidate; >- if (unit.getId().equals(id)) { >- return true; >- } >- } >- return false; >- } >- } >- >- Collector result = repository.query(new IUQuery(), new Collector(), null); >+ protected IInstallableUnit getUnit(String id, IMetadataRepository repository) { >+ Collector result = repository.query(new InstallableUnitQuery(id), new Collector(), null); > IInstallableUnit[] units = (IInstallableUnit[]) result.toArray(IInstallableUnit.class); > if (units.length == 1) { > return units[0];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 292691
:
152095
|
152205
|
152362
|
152365
|
152504
|
152544
|
152984
|
152986
|
153141
|
153282
|
153349
|
153895
|
153988
|
154541
|
154542
|
154883
|
155120
|
155154
|
155466
|
155547
|
155813
|
155814
|
155879
|
155912
|
155913
|
155979