Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 329287 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java (-1 / +11 lines)
Lines 76-81 Link Here
76
	static final IPath SETTINGS_PATH = new Path(".settings"); //$NON-NLS-1$
76
	static final IPath SETTINGS_PATH = new Path(".settings"); //$NON-NLS-1$
77
	
77
	
78
	/**
78
	/**
79
	 * Project relative path to the build.properties file
80
	 */
81
	static final IPath BUILD_PROPERTIES_PATH = new Path("build.properties"); //$NON-NLS-1$
82
83
	/**
79
	 * Project relative path to the manifest file.
84
	 * Project relative path to the manifest file.
80
	 */
85
	 */
81
	static final IPath MANIFEST_PATH = new Path(JarFile.MANIFEST_NAME);
86
	static final IPath MANIFEST_PATH = new Path(JarFile.MANIFEST_NAME);
Lines 272-277 Link Here
272
						}
277
						}
273
						else {	
278
						else {	
274
							IResourceDelta manifest = null;
279
							IResourceDelta manifest = null;
280
							IResourceDelta buildProperties = null;
275
							IResourceDelta filters = null;
281
							IResourceDelta filters = null;
276
							boolean filterbuild = false;
282
							boolean filterbuild = false;
277
							for (int i = 0; i < deltas.length; i++) {
283
							for (int i = 0; i < deltas.length; i++) {
Lines 279-284 Link Here
279
								if(manifest != null) {
285
								if(manifest != null) {
280
									break;
286
									break;
281
								}
287
								}
288
								buildProperties = deltas[i].findMember(BUILD_PROPERTIES_PATH);
289
								if(buildProperties != null) {
290
									break;
291
								}
282
								filters = deltas[i].findMember(FILTER_PATH);
292
								filters = deltas[i].findMember(FILTER_PATH);
283
								if(filters != null){
293
								if(filters != null){
284
									switch(filters.getKind()) {
294
									switch(filters.getKind()) {
Lines 297-303 Link Here
297
									}
307
									}
298
								}
308
								}
299
							}
309
							}
300
							if (manifest != null || filterbuild) {
310
							if (manifest != null || buildProperties != null || filterbuild) {
301
								if (DEBUG) {
311
								if (DEBUG) {
302
									System.out.println("Performing full build since MANIFEST.MF or .api_filters was modified"); //$NON-NLS-1$
312
									System.out.println("Performing full build since MANIFEST.MF or .api_filters was modified"); //$NON-NLS-1$
303
		 						}
313
		 						}
(-)src/org/eclipse/pde/api/tools/internal/model/ProjectComponent.java (-28 / +48 lines)
Lines 265-297 Link Here
265
						int length = entries.length;
265
						int length = entries.length;
266
						for (int i = 0; i < length; i++) {
266
						for (int i = 0; i < length; i++) {
267
							IBuildEntry buildEntry = entries[i];
267
							IBuildEntry buildEntry = entries[i];
268
							if (buildEntry.getName().startsWith(IBuildEntry.JAR_PREFIX)) {
268
							String name = buildEntry.getName();
269
								String jar = buildEntry.getName().substring(IBuildEntry.JAR_PREFIX.length());
269
							if (name.startsWith(IBuildEntry.JAR_PREFIX)) {
270
								String[] tokens = buildEntry.getTokens();
270
								retrieveContainers(name, IBuildEntry.JAR_PREFIX, buildEntry);
271
								if (tokens.length == 1) {
271
							} else if (name.startsWith("extra.")) { //$NON-NLS-1$
272
									IApiTypeContainer container = getApiTypeContainer(tokens[0], this);
272
								retrieveContainers(name, "extra.", buildEntry); //$NON-NLS-1$
273
									if (container != null) {
274
										fPathToOutputContainers.put(jar, container);
275
									}
276
								} else {
277
									List containers = new ArrayList();
278
									for (int j = 0; j < tokens.length; j++) {
279
										String currentToken = tokens[j];
280
										IApiTypeContainer container = getApiTypeContainer(currentToken, this);
281
										if (container != null && !containers.contains(container)) {
282
											containers.add(container);
283
										}
284
									}
285
									if (!containers.isEmpty()) {
286
										IApiTypeContainer cfc = null;
287
										if (containers.size() == 1) {
288
											cfc = (IApiTypeContainer) containers.get(0);
289
										} else {
290
											cfc = new CompositeApiTypeContainer(this, containers);
291
										}
292
										fPathToOutputContainers.put(jar, cfc);
293
									}
294
								}
295
							}
273
							}
296
						}
274
						}
297
					}
275
					}
Lines 301-307 Link Here
301
		}
279
		}
302
		return Collections.EMPTY_LIST;
280
		return Collections.EMPTY_LIST;
303
	}
281
	}
304
	
282
	private void retrieveContainers(String name, String prefix, IBuildEntry buildEntry) throws CoreException {
283
		String jar = name.substring(prefix.length());
284
		String[] tokens = buildEntry.getTokens();
285
		if (tokens.length == 1) {
286
			IApiTypeContainer container = getApiTypeContainer(tokens[0], this);
287
			if (container != null) {
288
				IApiTypeContainer existingContainer = (IApiTypeContainer) this.fPathToOutputContainers.get(jar);
289
				if (existingContainer != null) {
290
					// concat both containers
291
					List allContainers = new ArrayList();
292
					allContainers.add(existingContainer);
293
					allContainers.add(container);
294
					IApiTypeContainer apiTypeContainer = new CompositeApiTypeContainer(this, allContainers);
295
					fPathToOutputContainers.put(jar, apiTypeContainer);
296
				} else {
297
					fPathToOutputContainers.put(jar, container);
298
				}
299
			}
300
		} else {
301
			List containers = new ArrayList();
302
			for (int j = 0; j < tokens.length; j++) {
303
				String currentToken = tokens[j];
304
				IApiTypeContainer container = getApiTypeContainer(currentToken, this);
305
				if (container != null && !containers.contains(container)) {
306
					containers.add(container);
307
				}
308
			}
309
			if (!containers.isEmpty()) {
310
				IApiTypeContainer existingContainer = (IApiTypeContainer) this.fPathToOutputContainers.get(jar);
311
				if (existingContainer != null) {
312
					// concat both containers
313
					containers.add(existingContainer);
314
				}
315
				IApiTypeContainer cfc = null;
316
				if (containers.size() == 1) {
317
					cfc = (IApiTypeContainer) containers.get(0);
318
				} else {
319
					cfc = new CompositeApiTypeContainer(this, containers);
320
				}
321
				fPathToOutputContainers.put(jar, cfc);
322
			}
323
		}
324
	}
305
	/* (non-Javadoc)
325
	/* (non-Javadoc)
306
	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createClassFileContainer(java.lang.String)
326
	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createClassFileContainer(java.lang.String)
307
	 */
327
	 */

Return to bug 329287