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 258882 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 227-232 Link Here
227
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_API_TYPE);
227
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_API_TYPE);
228
	private static final Key KEY_API_COMPONENT_REMOVED_TYPE =
228
	private static final Key KEY_API_COMPONENT_REMOVED_TYPE =
229
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_TYPE);
229
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_TYPE);
230
	private static final Key KEY_API_COMPONENT_REMOVED_REEXPORTED_API_TYPE =
231
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_REEXPORTED_API_TYPE);
232
	private static final Key KEY_API_COMPONENT_REMOVED_REEXPORTED_TYPE =
233
		getApiToolsKey(IApiProblemTypes.API_COMPONENT_REMOVED_REEXPORTED_TYPE);
230
	
234
	
231
	private static final Key KEY_ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE =
235
	private static final Key KEY_ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE =
232
		getApiToolsKey(IApiProblemTypes.ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE);
236
		getApiToolsKey(IApiProblemTypes.ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE);
Lines 1022-1031 Link Here
1022
						new String[] {
1026
						new String[] {
1023
								PreferenceMessages.API_COMPONENT_REMOVED_API_TYPE,
1027
								PreferenceMessages.API_COMPONENT_REMOVED_API_TYPE,
1024
								PreferenceMessages.API_COMPONENT_REMOVED_TYPE,
1028
								PreferenceMessages.API_COMPONENT_REMOVED_TYPE,
1029
								PreferenceMessages.API_COMPONENT_REMOVED_REEXPORTED_API_TYPE,
1030
								PreferenceMessages.API_COMPONENT_REMOVED_REEXPORTED_TYPE,
1025
						},
1031
						},
1026
						new Key[] {
1032
						new Key[] {
1027
								KEY_API_COMPONENT_REMOVED_API_TYPE,
1033
								KEY_API_COMPONENT_REMOVED_API_TYPE,
1028
								KEY_API_COMPONENT_REMOVED_TYPE,
1034
								KEY_API_COMPONENT_REMOVED_TYPE,
1035
								KEY_API_COMPONENT_REMOVED_REEXPORTED_API_TYPE,
1036
								KEY_API_COMPONENT_REMOVED_REEXPORTED_TYPE,
1029
						});
1037
						});
1030
				client = createExpansibleComposite(sbody, PreferenceMessages.CompatibilityClassElement);
1038
				client = createExpansibleComposite(sbody, PreferenceMessages.CompatibilityClassElement);
1031
				initializeComboControls(
1039
				initializeComboControls(
(-)src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties (-1 / +3 lines)
Lines 1-5 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2008 IBM Corporation and others.
2
# Copyright (c) 2008, 2009 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 55-60 Link Here
55
55
56
API_COMPONENT_REMOVED_API_TYPE=An API type has become non-API:
56
API_COMPONENT_REMOVED_API_TYPE=An API type has become non-API:
57
API_COMPONENT_REMOVED_TYPE=A type has been removed:
57
API_COMPONENT_REMOVED_TYPE=A type has been removed:
58
API_COMPONENT_REMOVED_REEXPORTED_API_TYPE=An API re-exported type has become non-API:
59
API_COMPONENT_REMOVED_REEXPORTED_TYPE=A re-exported type has been removed:
58
60
59
ANNOTATION_REMOVED_FIELD=A field has been removed:
61
ANNOTATION_REMOVED_FIELD=A field has been removed:
60
ANNOTATION_REMOVED_METHOD=A method has been removed:
62
ANNOTATION_REMOVED_METHOD=A method has been removed:
(-)src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 78-83 Link Here
78
78
79
	public static String API_COMPONENT_REMOVED_API_TYPE;
79
	public static String API_COMPONENT_REMOVED_API_TYPE;
80
	public static String API_COMPONENT_REMOVED_TYPE;
80
	public static String API_COMPONENT_REMOVED_TYPE;
81
	public static String API_COMPONENT_REMOVED_REEXPORTED_API_TYPE;
82
	public static String API_COMPONENT_REMOVED_REEXPORTED_TYPE;
81
83
82
	public static String ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE;
84
	public static String ANNOTATION_ADDED_METHOD_NO_DEFAULT_VALUE;
83
	public static String ANNOTATION_REMOVED_FIELD;
85
	public static String ANNOTATION_REMOVED_FIELD;
(-)src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 58-64 Link Here
58
	private boolean isExcluded(IDelta delta) {
58
	private boolean isExcluded(IDelta delta) {
59
		String typeName = delta.getTypeName();
59
		String typeName = delta.getTypeName();
60
		StringBuffer buffer = new StringBuffer();
60
		StringBuffer buffer = new StringBuffer();
61
		String componentId = delta.getApiComponentID();
61
		String componentId = delta.getComponentVersionId();
62
		if (componentId != null) {
62
		if (componentId != null) {
63
			buffer.append(componentId).append(':');
63
			buffer.append(componentId).append(':');
64
		}
64
		}
(-)src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java (-4 / +14 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 810-816 Link Here
810
							return;
810
							return;
811
						}
811
						}
812
						if (VisibilityModifiers.isAPI(visibility)) {
812
						if (VisibilityModifiers.isAPI(visibility)) {
813
							String deltaComponentID = Util.getDeltaComponentID(reference);
813
							String deltaComponentID = Util.getDeltaComponentVersionsId(reference);
814
							delta = new Delta(
814
							delta = new Delta(
815
									deltaComponentID,
815
									deltaComponentID,
816
									IDelta.API_COMPONENT_ELEMENT_TYPE,
816
									IDelta.API_COMPONENT_ELEMENT_TYPE,
Lines 1124-1131 Link Here
1124
				} catch (JavaModelException e) {
1124
				} catch (JavaModelException e) {
1125
					ApiPlugin.log(e);
1125
					ApiPlugin.log(e);
1126
				}
1126
				}
1127
				IProject project = fJavaProject.getProject();
1127
				if (type == null) {
1128
				if (type == null) {
1128
					IResource manifestFile = Util.getManifestFile(fJavaProject.getProject());
1129
					IResource manifestFile = Util.getManifestFile(project);
1129
					if (manifestFile == null) {
1130
					if (manifestFile == null) {
1130
						// Cannot retrieve the manifest.mf file
1131
						// Cannot retrieve the manifest.mf file
1131
						return null;
1132
						return null;
Lines 1138-1145 Link Here
1138
						if (resource == null) {
1139
						if (resource == null) {
1139
							return null;
1140
							return null;
1140
						}
1141
						}
1142
						if (project.findMember(resource.getProjectRelativePath()) == null) {
1143
							resource = null;
1144
							IResource manifestFile = Util.getManifestFile(project);
1145
							if (manifestFile == null) {
1146
								// Cannot retrieve the manifest.mf file
1147
								return null;
1148
							}
1149
							resource = manifestFile;
1150
						}
1141
					} else {
1151
					} else {
1142
						IResource manifestFile = Util.getManifestFile(fJavaProject.getProject());
1152
						IResource manifestFile = Util.getManifestFile(project);
1143
						if (manifestFile == null) {
1153
						if (manifestFile == null) {
1144
							// Cannot retrieve the manifest.mf file
1154
							// Cannot retrieve the manifest.mf file
1145
							return null;
1155
							return null;
(-)src/org/eclipse/pde/api/tools/internal/builder/BuildState.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 108-114 Link Here
108
	private static void writeDelta(IDelta delta, DataOutputStream out) throws IOException {
108
	private static void writeDelta(IDelta delta, DataOutputStream out) throws IOException {
109
		// encode a delta into the build state
109
		// encode a delta into the build state
110
		// int elementType, int kind, int flags, int restrictions, int modifiers, String typeName, String key, Object data
110
		// int elementType, int kind, int flags, int restrictions, int modifiers, String typeName, String key, Object data
111
		String apiComponentID = delta.getApiComponentID();
111
		String apiComponentID = delta.getComponentVersionId();
112
		boolean hasComponentID = apiComponentID != null;
112
		boolean hasComponentID = apiComponentID != null;
113
		out.writeBoolean(hasComponentID);
113
		out.writeBoolean(hasComponentID);
114
		if (hasComponentID) {
114
		if (hasComponentID) {
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 118-123 Link Here
118
				switch(delta.getFlags()) {
118
				switch(delta.getFlags()) {
119
					case IDelta.TYPE :
119
					case IDelta.TYPE :
120
					case IDelta.API_TYPE :
120
					case IDelta.API_TYPE :
121
					case IDelta.REEXPORTED_API_TYPE :
122
					case IDelta.REEXPORTED_TYPE :
121
						return false;
123
						return false;
122
				}
124
				}
123
				break;
125
				break;
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java (-5 / +37 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 830-835 Link Here
830
	 */
830
	 */
831
	public static final int SUPER_INTERFACE_WITH_METHODS = 69;
831
	public static final int SUPER_INTERFACE_WITH_METHODS = 69;
832
	/**
832
	/**
833
	 * Delta kind flag that denotes a re-exported type has been added or removed.
834
	 * <br>
835
	 * Applies to kinds:
836
	 * <ul>
837
	 * <li>{@link #ADDED}</li>
838
	 * <li>{@link #REMOVED}</li>
839
	 * </ul>
840
	 * 
841
	 * @see #getFlags()
842
	 */
843
	public static final int REEXPORTED_TYPE = 70;
844
	/**
845
	 * Delta kind flag that denotes changing the visibility of a re-exported type from VisibilityModifiers.API to another visibility.
846
	 * As a consequence, the corresponding re-exported type is no longer an API type.
847
	 * <br>
848
	 * Applies to kinds:
849
	 * <ul>
850
	 * <li>{@link #REMOVED}</li>
851
	 * </ul>
852
	 * 
853
	 * @see #getFlags()
854
	 */
855
	public static final int REEXPORTED_API_TYPE = 71;
856
	/**
833
	 * Return true if the receiver has no children deltas, false otherwise.
857
	 * Return true if the receiver has no children deltas, false otherwise.
834
	 * 
858
	 * 
835
	 * @return true if the receiver has no children deltas, false otherwise.
859
	 * @return true if the receiver has no children deltas, false otherwise.
Lines 921-930 Link Here
921
	public int getModifiers();
945
	public int getModifiers();
922
	
946
	
923
	/**
947
	/**
924
	 * Returns the component id in which the given delta is reported. Might be null if the delta
948
	 * Returns the component identifier including its version identifier in which the given delta is
925
	 * is reported against an api profile.
949
	 * reported, or <code>null</code>. Can be <code>null</code> if the delta is reported against an
950
	 * API profile.
951
	 * 
952
	 * @return the component id in which the given delta is reported, or <code>null</code> if none
953
	 */
954
	public String getComponentVersionId();
955
	
956
	/**
957
	 * Update component version id.
926
	 * 
958
	 * 
927
	 * @return the component id in which the given delta is reported, null if none
959
	 * @param value the new component version ID
928
	 */
960
	 */
929
	public String getApiComponentID();
961
	public void setComponentVersionId(String value);
930
}
962
}
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java (-28 / +238 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 21-26 Link Here
21
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
21
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
22
import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
22
import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
23
import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
23
import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
24
import org.eclipse.pde.api.tools.internal.provisional.IRequiredComponentDescription;
24
import org.eclipse.pde.api.tools.internal.provisional.RestrictionModifiers;
25
import org.eclipse.pde.api.tools.internal.provisional.RestrictionModifiers;
25
import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
26
import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
26
import org.eclipse.pde.api.tools.internal.provisional.model.ApiScopeVisitor;
27
import org.eclipse.pde.api.tools.internal.provisional.model.ApiScopeVisitor;
Lines 65-71 Link Here
65
			if (version.getMajor() != version2.getMajor()) {
66
			if (version.getMajor() != version2.getMajor()) {
66
				globalDelta.add(
67
				globalDelta.add(
67
					new Delta(
68
					new Delta(
68
						Util.getDeltaComponentID(apiComponent2),
69
						Util.getDeltaComponentVersionsId(apiComponent2),
69
						IDelta.API_COMPONENT_ELEMENT_TYPE,
70
						IDelta.API_COMPONENT_ELEMENT_TYPE,
70
						IDelta.CHANGED,
71
						IDelta.CHANGED,
71
						IDelta.MAJOR_VERSION,
72
						IDelta.MAJOR_VERSION,
Lines 81-87 Link Here
81
			} else if (version.getMinor() != version2.getMinor()) {
82
			} else if (version.getMinor() != version2.getMinor()) {
82
				globalDelta.add(
83
				globalDelta.add(
83
					new Delta(
84
					new Delta(
84
						Util.getDeltaComponentID(apiComponent2),
85
						Util.getDeltaComponentVersionsId(apiComponent2),
85
						IDelta.API_COMPONENT_ELEMENT_TYPE,
86
						IDelta.API_COMPONENT_ELEMENT_TYPE,
86
						IDelta.CHANGED,
87
						IDelta.CHANGED,
87
						IDelta.MINOR_VERSION,
88
						IDelta.MINOR_VERSION,
Lines 367-373 Link Here
367
						IDelta.API_COMPONENT,
368
						IDelta.API_COMPONENT,
368
						null,
369
						null,
369
						component2.getId(),
370
						component2.getId(),
370
						Util.getDeltaComponentID(component2));
371
						Util.getDeltaComponentVersionsId(component2));
371
			} else if (component2 == null) {
372
			} else if (component2 == null) {
372
				String referenceComponentId = referenceComponent.getId();
373
				String referenceComponentId = referenceComponent.getId();
373
				return new Delta(
374
				return new Delta(
Lines 377-383 Link Here
377
						IDelta.API_COMPONENT,
378
						IDelta.API_COMPONENT,
378
						null,
379
						null,
379
						referenceComponentId,
380
						referenceComponentId,
380
						Util.getDeltaComponentID(referenceComponent));
381
						Util.getDeltaComponentVersionsId(referenceComponent));
381
			}
382
			}
382
			String referenceComponentId = referenceComponent.getId();
383
			String referenceComponentId = referenceComponent.getId();
383
			final Delta globalDelta = new Delta();
384
			final Delta globalDelta = new Delta();
Lines 391-397 Link Here
391
				if (!componentsEEs.remove(currentEE)) {
392
				if (!componentsEEs.remove(currentEE)) {
392
					globalDelta.add(
393
					globalDelta.add(
393
							new Delta(
394
							new Delta(
394
									Util.getDeltaComponentID(referenceComponent),
395
									Util.getDeltaComponentVersionsId(referenceComponent),
395
									IDelta.API_COMPONENT_ELEMENT_TYPE,
396
									IDelta.API_COMPONENT_ELEMENT_TYPE,
396
									IDelta.REMOVED,
397
									IDelta.REMOVED,
397
									IDelta.EXECUTION_ENVIRONMENT,
398
									IDelta.EXECUTION_ENVIRONMENT,
Lines 399-412 Link Here
399
									0,
400
									0,
400
									null,
401
									null,
401
									referenceComponentId,
402
									referenceComponentId,
402
									new String[] { currentEE, Util.getDeltaComponentID(referenceComponent)}));
403
									new String[] { currentEE, Util.getDeltaComponentVersionsId(referenceComponent)}));
403
				}
404
				}
404
			}
405
			}
405
			for (Iterator iterator = componentsEEs.iterator(); iterator.hasNext(); ) {
406
			for (Iterator iterator = componentsEEs.iterator(); iterator.hasNext(); ) {
406
				String currentEE = (String) iterator.next();
407
				String currentEE = (String) iterator.next();
407
				globalDelta.add(
408
				globalDelta.add(
408
						new Delta(
409
						new Delta(
409
								Util.getDeltaComponentID(referenceComponent),
410
								Util.getDeltaComponentVersionsId(referenceComponent),
410
								IDelta.API_COMPONENT_ELEMENT_TYPE,
411
								IDelta.API_COMPONENT_ELEMENT_TYPE,
411
								IDelta.ADDED,
412
								IDelta.ADDED,
412
								IDelta.EXECUTION_ENVIRONMENT,
413
								IDelta.EXECUTION_ENVIRONMENT,
Lines 414-420 Link Here
414
								0,
415
								0,
415
								null,
416
								null,
416
								referenceComponentId,
417
								referenceComponentId,
417
								new String[] { currentEE, Util.getDeltaComponentID(referenceComponent)}));
418
								new String[] { currentEE, Util.getDeltaComponentVersionsId(referenceComponent)}));
418
			}
419
			}
419
			return internalCompare(referenceComponent, component2, referenceBaseline, baseline, visibilityModifiers, globalDelta);
420
			return internalCompare(referenceComponent, component2, referenceBaseline, baseline, visibilityModifiers, globalDelta);
420
		} catch(CoreException e) {
421
		} catch(CoreException e) {
Lines 501-507 Link Here
501
			if (refElementDescription != null) {
502
			if (refElementDescription != null) {
502
				refVisibility = refElementDescription.getVisibility();
503
				refVisibility = refElementDescription.getVisibility();
503
			}
504
			}
504
			String deltaComponentID = Util.getDeltaComponentID(component2);
505
			String deltaComponentID = Util.getDeltaComponentVersionsId(component2);
505
			if (typeRoot == null) {
506
			if (typeRoot == null) {
506
				if (isAPI(visibility, typeDescriptor2)) {
507
				if (isAPI(visibility, typeDescriptor2)) {
507
					return new Delta(
508
					return new Delta(
Lines 745-751 Link Here
745
								} else{
746
								} else{
746
									typeRoot2 = component2.findTypeRoot(typeName, id);
747
									typeRoot2 = component2.findTypeRoot(typeName, id);
747
								}
748
								}
748
								String deltaComponentID = Util.getDeltaComponentID(component2);
749
								String deltaComponentID = null;
750
								IApiComponent provider = null;
751
								IApiDescription providerApiDesc = null;
752
								boolean reexported = false;
753
								if (typeRoot2 == null) {
754
									// check if the type is provided by a required component (it could have been moved/re-exported)
755
									IApiComponent[] providers = component2.getBaseline().resolvePackage(component2, packageName);
756
									int index = 0;
757
									while (typeRoot2 == null && index < providers.length) {
758
										IApiComponent p = providers[index];
759
										if (!p.equals(component2)) {
760
											typeRoot2 = p.findTypeRoot(typeName, p.getId());
761
											if (typeRoot2 != null) {
762
												provider = p;
763
												providerApiDesc = p.getApiDescription();
764
												IRequiredComponentDescription[] required = component2.getRequiredComponents();
765
												for (int k = 0; k < required.length; k++) {
766
													IRequiredComponentDescription description = required[k];
767
													if (description.getId().equals(p.getId())) {
768
														reexported = description.isExported();
769
														break;
770
													}
771
												}
772
											}
773
										}
774
										index++;
775
									}
776
								} else {
777
									provider = component2;
778
									providerApiDesc = apiDescription2;
779
								}
780
								deltaComponentID = Util.getDeltaComponentVersionsId(component2);
749
								if(typeRoot2 == null) {
781
								if(typeRoot2 == null) {
750
									if ((visibility & visibilityModifiers) == 0) {
782
									if ((visibility & visibilityModifiers) == 0) {
751
										// we skip the class file according to their visibility
783
										// we skip the class file according to their visibility
Lines 768-781 Link Here
768
													typeDescriptor.getModifiers(),
800
													typeDescriptor.getModifiers(),
769
													typeName,
801
													typeName,
770
													typeName,
802
													typeName,
771
													new String[] { typeName, deltaComponentID}));
803
													new String[] { typeName, deltaComponentID }));
772
								} else {
804
								} else {
773
									if ((visibility & visibilityModifiers) == 0) {
805
									if ((visibility & visibilityModifiers) == 0) {
774
										// we skip the class file according to their visibility
806
										// we skip the class file according to their visibility
775
										return;
807
										return;
776
									}
808
									}
777
									IApiType typeDescriptor2 = typeRoot2.getStructure();
809
									IApiType typeDescriptor2 = typeRoot2.getStructure();
778
									IApiAnnotations elementDescription2 = apiDescription2.resolveAnnotations(typeDescriptor2.getHandle());
810
									IApiAnnotations elementDescription2 = providerApiDesc.resolveAnnotations(typeDescriptor2.getHandle());
779
									int visibility2 = 0;
811
									int visibility2 = 0;
780
									if (elementDescription2 != null) {
812
									if (elementDescription2 != null) {
781
										visibility2 = elementDescription2.getVisibility();
813
										visibility2 = elementDescription2.getVisibility();
Lines 787-805 Link Here
787
											return;
819
											return;
788
										}
820
										}
789
									}
821
									}
790
									if (isAPI(visibility, typeDescriptor) && !isAPI(visibility2, typeDescriptor2)) {
822
									if (isAPI(visibility, typeDescriptor)) {
791
										globalDelta.add(
823
										if (!isAPI(visibility2, typeDescriptor2)) {
824
											globalDelta.add(
792
												new Delta(
825
												new Delta(
793
														deltaComponentID,
826
													deltaComponentID,
794
														IDelta.API_COMPONENT_ELEMENT_TYPE,
827
													IDelta.API_COMPONENT_ELEMENT_TYPE,
795
														IDelta.REMOVED,
828
													IDelta.REMOVED,
796
														IDelta.API_TYPE,
829
													reexported ?  IDelta.REEXPORTED_API_TYPE : IDelta.API_TYPE,
797
														elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
830
													elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
798
														typeDescriptor2.getModifiers(),
831
													typeDescriptor2.getModifiers(),
799
														typeName,
832
													typeName,
800
														typeName,
833
													typeName,
801
														new String[] { typeName, deltaComponentID}));
834
													new String[] { typeName, deltaComponentID }));
802
										return;
835
											return;
836
										}
803
									}
837
									}
804
									if ((visibility2 & visibilityModifiers) == 0) {
838
									if ((visibility2 & visibilityModifiers) == 0) {
805
										// we simply report a changed visibility
839
										// we simply report a changed visibility
Lines 816-822 Link Here
816
														new String[] { typeName, deltaComponentID}));
850
														new String[] { typeName, deltaComponentID}));
817
									}
851
									}
818
									typeRootBaseLineNames.add(typeName);
852
									typeRootBaseLineNames.add(typeName);
819
									ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, component2, referenceBaseline, baseline, visibilityModifiers);
853
									ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, provider, referenceBaseline, baseline, visibilityModifiers);
820
									IDelta delta = comparator.getDelta();
854
									IDelta delta = comparator.getDelta();
821
									IStatus status = comparator.getStatus();
855
									IStatus status = comparator.getStatus();
822
									if(status != null) {
856
									if(status != null) {
Lines 836-841 Link Here
836
				}
870
				}
837
			}
871
			}
838
		}
872
		}
873
		IRequiredComponentDescription[] requiredComponents = component.getRequiredComponents();
874
		int length = requiredComponents.length;
875
		if (length != 0) {
876
			for (int j = 0; j < length; j++) {
877
				IRequiredComponentDescription description = requiredComponents[j];
878
				if (description.isExported()) {
879
					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
880
					String descriptionID = description.getId();
881
					IApiComponent currentRequiredApiComponent = referenceBaseline.getApiComponent(descriptionID);
882
					final IApiDescription reexportedApiDescription = currentRequiredApiComponent.getApiDescription();
883
					IApiTypeContainer[] apiTypeContainers = currentRequiredApiComponent.getApiTypeContainers();
884
					if (apiTypeContainers != null) {
885
						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
886
							IApiTypeContainer container = apiTypeContainers[i];
887
							try {
888
								container.accept(new ApiTypeContainerVisitor() {
889
									public void visit(String packageName, IApiTypeRoot typeRoot) {
890
										String typeName = typeRoot.getTypeName();
891
										try {
892
											IApiType typeDescriptor = typeRoot.getStructure();
893
											IApiAnnotations elementDescription = reexportedApiDescription.resolveAnnotations(typeDescriptor.getHandle());
894
											if (typeDescriptor.isMemberType() || typeDescriptor.isAnonymous() || typeDescriptor.isLocal()) {
895
												// we skip nested types (member, local and anonymous)
896
												return;
897
											}
898
											int visibility = 0;
899
											if (elementDescription != null) {
900
												visibility = elementDescription.getVisibility();
901
											}
902
											IApiTypeRoot typeRoot2 = null;
903
											if (isSWT) {
904
												typeRoot2 = component2.findTypeRoot(typeName);
905
											} else{
906
												typeRoot2 = component2.findTypeRoot(typeName, id);
907
											}
908
											IApiDescription providerApiDesc = null;
909
											if (typeRoot2 == null) {
910
												// check if the type is provided by a required component (it could have been moved/re-exported)
911
												IApiComponent[] providers = component2.getBaseline().resolvePackage(component2, packageName);
912
												int index = 0;
913
												while (typeRoot2 == null && index < providers.length) {
914
													IApiComponent p = providers[index];
915
													if (!p.equals(component2)) {
916
														typeRoot2 = p.findTypeRoot(typeName, p.getId());
917
														if (typeRoot2 != null) {
918
															providerApiDesc = p.getApiDescription();
919
														}
920
													}
921
													index++;
922
												}
923
											} else {
924
												providerApiDesc = apiDescription2;
925
											}
926
											if(typeRoot2 == null) {
927
												if ((visibility & visibilityModifiers) == 0) {
928
													// we skip the class file according to their visibility
929
													return;
930
												}
931
												if (visibilityModifiers == VisibilityModifiers.API) {
932
													// if the visibility is API, we only consider public and protected types
933
													if (Util.isDefault(typeDescriptor.getModifiers())
934
																|| Util.isPrivate(typeDescriptor.getModifiers())) {
935
														return;
936
													}
937
												}
938
												globalDelta.add(
939
														new Delta(
940
																currentComponentID,
941
																IDelta.API_COMPONENT_ELEMENT_TYPE,
942
																IDelta.REMOVED,
943
																IDelta.REEXPORTED_TYPE,
944
																RestrictionModifiers.NO_RESTRICTIONS,
945
																typeDescriptor.getModifiers(),
946
																typeName,
947
																typeName,
948
																new String[] { typeName, currentComponentID }));
949
											} else {
950
												typeRootBaseLineNames.add(typeName);
951
												IApiType typeDescriptor2 = typeRoot2.getStructure();
952
												IApiAnnotations elementDescription2 = providerApiDesc.resolveAnnotations(typeDescriptor2.getHandle());
953
												int visibility2 = 0;
954
												if (elementDescription2 != null) {
955
													visibility2 = elementDescription2.getVisibility();
956
												}
957
												// if the visibility is API, we only consider public and protected types
958
												if (Util.isDefault(typeDescriptor.getModifiers())
959
														|| Util.isPrivate(typeDescriptor.getModifiers())) {
960
													return;
961
												}
962
												if (isAPI(visibility, typeDescriptor)) {
963
													if (!isAPI(visibility2, typeDescriptor2)) {
964
														globalDelta.add(
965
															new Delta(
966
																currentComponentID,
967
																IDelta.API_COMPONENT_ELEMENT_TYPE,
968
																IDelta.REMOVED,
969
																IDelta.REEXPORTED_API_TYPE,
970
																elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
971
																typeDescriptor2.getModifiers(),
972
																typeName,
973
																typeName,
974
																new String[] { typeName, currentComponentID }));
975
														return;
976
													}
977
												}
978
											}
979
										} catch (CoreException e) {
980
											ApiPlugin.log(e);
981
										}
982
									}
983
								});
984
							} catch (CoreException e) {
985
								ApiPlugin.log(e);
986
							}
987
						}
988
					}
989
				}
990
			}
991
		}
839
		if (typeRootContainers2 != null) {
992
		if (typeRootContainers2 != null) {
840
			for (int i = 0, max = typeRootContainers2.length; i < max; i++) {
993
			for (int i = 0, max = typeRootContainers2.length; i < max; i++) {
841
				IApiTypeContainer container = typeRootContainers2[i];
994
				IApiTypeContainer container = typeRootContainers2[i];
Lines 858-864 Link Here
858
									return;
1011
									return;
859
								}
1012
								}
860
								typeRootBaseLineNames.add(typeName);
1013
								typeRootBaseLineNames.add(typeName);
861
								String deltaComponentID = Util.getDeltaComponentID(component2);
1014
								String deltaComponentID = Util.getDeltaComponentVersionsId(component2);
862
								globalDelta.add(
1015
								globalDelta.add(
863
										new Delta(
1016
										new Delta(
864
												deltaComponentID,
1017
												deltaComponentID,
Lines 869-875 Link Here
869
												type.getModifiers(),
1022
												type.getModifiers(),
870
												typeName,
1023
												typeName,
871
												typeName,
1024
												typeName,
872
												new String[] { typeName, deltaComponentID}));
1025
												new String[] { typeName, deltaComponentID }));
873
							} catch (CoreException e) {
1026
							} catch (CoreException e) {
874
								ApiPlugin.log(e);
1027
								ApiPlugin.log(e);
875
							}
1028
							}
Lines 880-885 Link Here
880
				}
1033
				}
881
			}
1034
			}
882
		}
1035
		}
1036
		requiredComponents = component2.getRequiredComponents();
1037
		length = requiredComponents.length;
1038
		if (length != 0) {
1039
			for (int j = 0; j < length; j++) {
1040
				IRequiredComponentDescription description = requiredComponents[j];
1041
				if (description.isExported()) {
1042
					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
1043
					String descriptionID = description.getId();
1044
					IApiComponent currentRequiredApiComponent = baseline.getApiComponent(descriptionID);
1045
					IApiTypeContainer[] apiTypeContainers = currentRequiredApiComponent.getApiTypeContainers();
1046
					final IApiDescription reexportedApiDescription = currentRequiredApiComponent.getApiDescription();
1047
					if (apiTypeContainers != null) {
1048
						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
1049
							IApiTypeContainer container = apiTypeContainers[i];
1050
							try {
1051
								container.accept(new ApiTypeContainerVisitor() {
1052
									public void visit(String packageName, IApiTypeRoot typeRoot) {
1053
										String typeName = typeRoot.getTypeName();
1054
										try {
1055
											IApiType typeDescriptor = typeRoot.getStructure();
1056
											IApiAnnotations elementDescription = reexportedApiDescription.resolveAnnotations(typeDescriptor.getHandle());
1057
											if (typeDescriptor.isMemberType() || typeDescriptor.isAnonymous() || typeDescriptor.isLocal()) {
1058
												// we skip nested types (member, local and anonymous)
1059
												return;
1060
											}
1061
											if (filterType(visibilityModifiers, elementDescription, typeDescriptor)) {
1062
												return;
1063
											}
1064
											if (typeRootBaseLineNames.contains(typeName)) {
1065
												// already processed
1066
												return;
1067
											}
1068
											typeRootBaseLineNames.add(typeName);
1069
											globalDelta.add(
1070
													new Delta(
1071
															currentComponentID,
1072
															IDelta.API_COMPONENT_ELEMENT_TYPE,
1073
															IDelta.ADDED,
1074
															IDelta.REEXPORTED_TYPE,
1075
															elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1076
															typeDescriptor.getModifiers(),
1077
															typeName,
1078
															typeName,
1079
															new String[] { typeName, currentComponentID }));
1080
										} catch (CoreException e) {
1081
											ApiPlugin.log(e);
1082
										}
1083
									}
1084
								});
1085
							} catch (CoreException e) {
1086
								ApiPlugin.log(e);
1087
							}
1088
						}
1089
					}
1090
				}
1091
			}
1092
		}
883
		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
1093
		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
884
	}
1094
	}
885
1095
(-)src/org/eclipse/pde/api/tools/internal/comparator/Delta.java (-2 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 210-216 Link Here
210
		return true;
210
		return true;
211
	}
211
	}
212
	
212
	
213
	public String getApiComponentID() {
213
	public String getComponentVersionId() {
214
		return this.componentID;
214
		return this.componentID;
215
	}
215
	}
216
216
Lines 342-345 Link Here
342
		}
342
		}
343
		return String.valueOf(writer.getBuffer());
343
		return String.valueOf(writer.getBuffer());
344
	}
344
	}
345
346
	public void setComponentVersionId(String value) {
347
		this.componentID = value;
348
	}
345
}
349
}
(-)src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 73-79 Link Here
73
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPATIBLE, Boolean.toString(DeltaProcessor.isCompatible(delta)));
73
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPATIBLE, Boolean.toString(DeltaProcessor.isCompatible(delta)));
74
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_MODIFIERS, Integer.toString(delta.getModifiers()));
74
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_MODIFIERS, Integer.toString(delta.getModifiers()));
75
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_RESTRICTIONS, Integer.toString(delta.getRestrictions()));
75
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_RESTRICTIONS, Integer.toString(delta.getRestrictions()));
76
		String apiComponentID = delta.getApiComponentID();
76
		String apiComponentID = delta.getComponentVersionId();
77
		if (apiComponentID != null) {
77
		if (apiComponentID != null) {
78
			deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID);
78
			deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID);
79
		}
79
		}
(-)src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java (-12 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 161-170 Link Here
161
		this.delta.add(delta);
161
		this.delta.add(delta);
162
	}
162
	}
163
	private void addDelta(int elementType, int kind, int flags, int restrictions, int modifiers, IApiType type, String key, String data) {
163
	private void addDelta(int elementType, int kind, int flags, int restrictions, int modifiers, IApiType type, String key, String data) {
164
		this.addDelta(new Delta(Util.getDeltaComponentID(this.component2), elementType, kind, flags, restrictions, modifiers, type.getName(), key, data));
164
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, modifiers, type.getName(), key, data));
165
	}
165
	}
166
	private void addDelta(int elementType, int kind, int flags, int restrictions, int modifiers, IApiType type, String key, String[] datas) {
166
	private void addDelta(int elementType, int kind, int flags, int restrictions, int modifiers, IApiType type, String key, String[] datas) {
167
		this.addDelta(new Delta(Util.getDeltaComponentID(this.component2), elementType, kind, flags, restrictions, modifiers, type.getName(), key, datas));
167
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, modifiers, type.getName(), key, datas));
168
	}
168
	}
169
	/**
169
	/**
170
	 * Checks if the super-class set has been change in any way compared to the baseline (grown or reduced or types changed)
170
	 * Checks if the super-class set has been change in any way compared to the baseline (grown or reduced or types changed)
Lines 471-477 Link Here
471
								typeMember.getModifiers(),
471
								typeMember.getModifiers(),
472
								this.type1,
472
								this.type1,
473
								typeMember.getName(),
473
								typeMember.getName(),
474
								new String[] { typeMember.getName().replace('$', '.'), Util.getDeltaComponentID(component2)});
474
								new String[] { typeMember.getName().replace('$', '.'), Util.getDeltaComponentVersionsId(component2)});
475
					} catch (CoreException e) {
475
					} catch (CoreException e) {
476
						reportStatus(e);
476
						reportStatus(e);
477
					}
477
					}
Lines 506-512 Link Here
506
						if (memberTypeElementDescription2 != null) {
506
						if (memberTypeElementDescription2 != null) {
507
							memberTypeVisibility2 = memberTypeElementDescription2.getVisibility();
507
							memberTypeVisibility2 = memberTypeElementDescription2.getVisibility();
508
						}
508
						}
509
						String deltaComponentID = Util.getDeltaComponentID(component2);
509
						String deltaComponentID = Util.getDeltaComponentVersionsId(component2);
510
						int restrictions = memberTypeElementDescription2 != null ? memberTypeElementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS;
510
						int restrictions = memberTypeElementDescription2 != null ? memberTypeElementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS;
511
						if (Util.isFinal(this.type2.getModifiers())) {
511
						if (Util.isFinal(this.type2.getModifiers())) {
512
							restrictions |= RestrictionModifiers.NO_EXTEND;
512
							restrictions |= RestrictionModifiers.NO_EXTEND;
Lines 586-592 Link Here
586
							typeMember.getModifiers(),
586
							typeMember.getModifiers(),
587
							this.type1,
587
							this.type1,
588
							typeMember.getName(),
588
							typeMember.getName(),
589
							new String[] { typeMember.getName().replace('$', '.'), Util.getDeltaComponentID(component2)});
589
							new String[] { typeMember.getName().replace('$', '.'), Util.getDeltaComponentVersionsId(component2)});
590
				} catch (CoreException e) {
590
				} catch (CoreException e) {
591
					reportStatus(e);
591
					reportStatus(e);
592
				}
592
				}
Lines 1006-1013 Link Here
1006
									IDelta.RESTRICTIONS,
1006
									IDelta.RESTRICTIONS,
1007
									restrictions2,
1007
									restrictions2,
1008
									typeAccess,
1008
									typeAccess,
1009
									this.type1,
1009
									this.type2,
1010
									this.type1.getName(),
1010
									this.type2.getName(),
1011
									Util.getDescriptorName(type1));
1011
									Util.getDescriptorName(type1));
1012
							}
1012
							}
1013
						} else {
1013
						} else {
Lines 1022-1029 Link Here
1022
											IDelta.RESTRICTIONS,
1022
											IDelta.RESTRICTIONS,
1023
											restrictions2,
1023
											restrictions2,
1024
											typeAccess,
1024
											typeAccess,
1025
											this.type1,
1025
											this.type2,
1026
											this.type1.getName(),
1026
											this.type2.getName(),
1027
											Util.getDescriptorName(type1));
1027
											Util.getDescriptorName(type1));
1028
								}
1028
								}
1029
							}
1029
							}
Lines 1038-1045 Link Here
1038
											IDelta.RESTRICTIONS,
1038
											IDelta.RESTRICTIONS,
1039
											restrictions2,
1039
											restrictions2,
1040
											typeAccess,
1040
											typeAccess,
1041
											this.type1,
1041
											this.type2,
1042
											this.type1.getName(),
1042
											this.type2.getName(),
1043
											Util.getDescriptorName(type1));
1043
											Util.getDescriptorName(type1));
1044
								}
1044
								}
1045
							}
1045
							}
(-)src/org/eclipse/pde/api/tools/internal/util/Util.java (-2 / +11 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 677-682 Link Here
677
			case IDelta.API_METHOD_WITHOUT_DEFAULT_VALUE : return "API_METHOD_WITHOUT_DEFAULT_VALUE"; //$NON-NLS-1$
677
			case IDelta.API_METHOD_WITHOUT_DEFAULT_VALUE : return "API_METHOD_WITHOUT_DEFAULT_VALUE"; //$NON-NLS-1$
678
			case IDelta.TYPE_ARGUMENT : return "TYPE_ARGUMENT"; //$NON-NLS-1$
678
			case IDelta.TYPE_ARGUMENT : return "TYPE_ARGUMENT"; //$NON-NLS-1$
679
			case IDelta.SUPER_INTERFACE_WITH_METHODS : return "SUPER_INTERFACE_WITH_METHODS"; //$NON-NLS-1$
679
			case IDelta.SUPER_INTERFACE_WITH_METHODS : return "SUPER_INTERFACE_WITH_METHODS"; //$NON-NLS-1$
680
			case IDelta.REEXPORTED_API_TYPE : return "REEXPORTED_API_TYPE"; //$NON-NLS-1$
681
			case IDelta.REEXPORTED_TYPE : return "REEXPORTED_TYPE"; //$NON-NLS-1$
680
		}
682
		}
681
		return UNKNOWN_FLAGS;
683
		return UNKNOWN_FLAGS;
682
	}
684
	}
Lines 2448-2454 Link Here
2448
		return set;
2450
		return set;
2449
	}
2451
	}
2450
2452
2451
	public static String getDeltaComponentID(IApiComponent component) {
2453
	/**
2454
	 * Returns an identifier for the given API component including its version identifier
2455
	 * (component id + _ + major + _ + minor + _ + micro)
2456
	 *  
2457
	 * @param component API component
2458
	 * @return API component + version identifier
2459
	 */
2460
	public static String getDeltaComponentVersionsId(IApiComponent component) {
2452
		try {
2461
		try {
2453
			StringBuffer buffer = new StringBuffer(component.getId());
2462
			StringBuffer buffer = new StringBuffer(component.getId());
2454
			String version = component.getVersion();
2463
			String version = component.getVersion();
(-)src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties (-3 / +5 lines)
Lines 1-5 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2008 IBM Corporation and others.
2
# Copyright (c) 2008, 2009 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 11-17 Link Here
11
# the slot 107 has been removed. So it is open again for another message
11
# the slot 107 has been removed. So it is open again for another message
12
# remove messages for 31, 38, 42,
12
# remove messages for 31, 38, 42,
13
# 45, 46, 47, 48, 49, 50, 51, 52, 53, 57, 58, 59, 60, 62, 63, 65, 68, 70, 71, 74, 75, 80,
13
# 45, 46, 47, 48, 49, 50, 51, 52, 53, 57, 58, 59, 60, 62, 63, 65, 68, 70, 71, 74, 75, 80,
14
# 82, 83, 88, 90, 93, 05, 99, 103, 124
14
# 82, 83, 88, 90, 93, 05
15
#api profile
15
#api profile
16
1 = An API baseline has not been set for the current workspace.
16
1 = An API baseline has not been set for the current workspace.
17
17
Lines 140-143 Link Here
140
25 = The local type {0} defined in {1} illegally extends {2}
140
25 = The local type {0} defined in {1} illegally extends {2}
141
28 = An anonymous type defined in {0} illegally extends {1}
141
28 = An anonymous type defined in {0} illegally extends {1}
142
99 = API analysis aborted: {0} has unresolved constraints: {1}
142
99 = API analysis aborted: {0} has unresolved constraints: {1}
143
30 = The API problem filter for: ''{0}'' is no longer used
143
30 = The API problem filter for: ''{0}'' is no longer used
144
134 = The re-exported type {0} in {1} is no longer API
145
135 = The re-exported type {0} has been removed from {1}
(-)src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 553-558 Link Here
553
							case IDelta.API_METHOD_WITHOUT_DEFAULT_VALUE: return 130;
553
							case IDelta.API_METHOD_WITHOUT_DEFAULT_VALUE: return 130;
554
							case IDelta.TYPE_ARGUMENT: return 107;
554
							case IDelta.TYPE_ARGUMENT: return 107;
555
							case IDelta.SUPERCLASS: return 131;
555
							case IDelta.SUPERCLASS: return 131;
556
							case IDelta.REEXPORTED_API_TYPE: return 134;
557
							case IDelta.REEXPORTED_TYPE: return 135;
556
						}
558
						}
557
					}
559
					}
558
				}
560
				}
(-)src/org/eclipse/pde/api/tools/internal/provisional/ApiPlugin.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 152-157 Link Here
152
	public static String[] AllCompatibilityKeys = new String[] {
152
	public static String[] AllCompatibilityKeys = new String[] {
153
		IApiProblemTypes.API_COMPONENT_REMOVED_TYPE,
153
		IApiProblemTypes.API_COMPONENT_REMOVED_TYPE,
154
		IApiProblemTypes.API_COMPONENT_REMOVED_API_TYPE,
154
		IApiProblemTypes.API_COMPONENT_REMOVED_API_TYPE,
155
		IApiProblemTypes.API_COMPONENT_REMOVED_REEXPORTED_TYPE,
156
		IApiProblemTypes.API_COMPONENT_REMOVED_REEXPORTED_API_TYPE,
155
		IApiProblemTypes.ANNOTATION_REMOVED_FIELD,
157
		IApiProblemTypes.ANNOTATION_REMOVED_FIELD,
156
		IApiProblemTypes.ANNOTATION_REMOVED_METHOD,
158
		IApiProblemTypes.ANNOTATION_REMOVED_METHOD,
157
		IApiProblemTypes.ANNOTATION_REMOVED_TYPE_MEMBER,
159
		IApiProblemTypes.ANNOTATION_REMOVED_TYPE_MEMBER,
(-)src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java (-1 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others.
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 26-31 Link Here
26
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.TYPE);
26
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.TYPE);
27
	public static final String API_COMPONENT_REMOVED_API_TYPE =
27
	public static final String API_COMPONENT_REMOVED_API_TYPE =
28
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.API_TYPE);
28
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.API_TYPE);
29
	// Compatibility problems
30
	public static final String API_COMPONENT_REMOVED_REEXPORTED_TYPE =
31
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.REEXPORTED_TYPE);
32
	public static final String API_COMPONENT_REMOVED_REEXPORTED_API_TYPE =
33
		Util.getDeltaPrefererenceKey(IDelta.API_COMPONENT_ELEMENT_TYPE, IDelta.REMOVED, IDelta.REEXPORTED_API_TYPE);
29
	public static final String ANNOTATION_REMOVED_FIELD =
34
	public static final String ANNOTATION_REMOVED_FIELD =
30
		Util.getDeltaPrefererenceKey(IDelta.ANNOTATION_ELEMENT_TYPE, IDelta.REMOVED, IDelta.FIELD);
35
		Util.getDeltaPrefererenceKey(IDelta.ANNOTATION_ELEMENT_TYPE, IDelta.REMOVED, IDelta.FIELD);
31
	public static final String ANNOTATION_REMOVED_METHOD =
36
	public static final String ANNOTATION_REMOVED_METHOD =

Return to bug 258882