@@ -107,46 +107,6 @@ public class P2Utils {
107
107
public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory .createProvidedCapability (NAMESPACE_ECLIPSE_TYPE , TYPE_ECLIPSE_BUNDLE , Version .createOSGi (1 , 0 , 0 ));
108
108
public static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package" ; //$NON-NLS-1$
109
109
110
- /**
111
- * Returns bundles defined by the 'bundles.info' file in the
112
- * specified location, or <code>null</code> if none. The "bundles.info" file
113
- * is assumed to be at a fixed location relative to the configuration area URL.
114
- * This method will also look for a "source.info". If available, any source
115
- * bundles found will also be added to the returned list. If bundle URLs found
116
- * in the bundles.info are relative, they will be appended to platformHome to
117
- * make them absolute.
118
- *
119
- * @param platformHome absolute path in the local file system to an installation
120
- * @param configurationArea url location of the configuration directory to search for bundles.info and source.info
121
- * @return URLs of all bundles in the installation or <code>null</code> if not able
122
- * to locate a bundles.info
123
- */
124
- public static URL [] readBundlesTxt (String platformHome , File configurationArea ) {
125
- if (configurationArea == null ) {
126
- return null ;
127
- }
128
- try {
129
- BundleInfo [] bundles = readBundles (platformHome , configurationArea );
130
- if (bundles == null ) {
131
- return null ;
132
- }
133
- int length = bundles .length ;
134
- BundleInfo [] srcBundles = readSourceBundles (platformHome , configurationArea );
135
- if (srcBundles != null ) {
136
- length += srcBundles .length ;
137
- }
138
- URL [] urls = new URL [length ];
139
- copyURLs (urls , 0 , bundles );
140
- if (srcBundles != null && srcBundles .length > 0 ) {
141
- copyURLs (urls , bundles .length , srcBundles );
142
- }
143
- return urls ;
144
- } catch (MalformedURLException e ) {
145
- PDECore .log (e );
146
- return null ;
147
- }
148
- }
149
-
150
110
/**
151
111
* Returns bundles defined by the 'bundles.info' relative to the given
152
112
* home and configuration area, or <code>null</code> if none.
@@ -207,19 +167,6 @@ public static BundleInfo[] readSourceBundles(String platformHome, File configura
207
167
}
208
168
}
209
169
210
- /**
211
- * Copies URLs from the given bundle info objects into the specified array starting at the given index.
212
- *
213
- * @param dest array to copy URLs into
214
- * @param start index to start copying into
215
- * @param infos associated bundle infos
216
- */
217
- private static void copyURLs (URL [] dest , int start , BundleInfo [] infos ) throws MalformedURLException {
218
- for (BundleInfo info : infos ) {
219
- dest [start ++] = new File (info .getLocation ()).toURL ();
220
- }
221
- }
222
-
223
170
/**
224
171
* Returns a list of {@link BundleInfo} for each bundle entry or
225
172
* <code>null</code> if there is a problem reading the file.
0 commit comments