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 / +246 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
											if ("org.eclipse.swt".equals(p.getId())) { //$NON-NLS-1$
761
												typeRoot2 = p.findTypeRoot(typeName);
762
											} else {
763
												typeRoot2 = p.findTypeRoot(typeName, p.getId());
764
											}
765
											if (typeRoot2 != null) {
766
												provider = p;
767
												providerApiDesc = p.getApiDescription();
768
												IRequiredComponentDescription[] required = component2.getRequiredComponents();
769
												for (int k = 0; k < required.length; k++) {
770
													IRequiredComponentDescription description = required[k];
771
													if (description.getId().equals(p.getId())) {
772
														reexported = description.isExported();
773
														break;
774
													}
775
												}
776
											}
777
										}
778
										index++;
779
									}
780
								} else {
781
									provider = component2;
782
									providerApiDesc = apiDescription2;
783
								}
784
								deltaComponentID = Util.getDeltaComponentVersionsId(component2);
749
								if(typeRoot2 == null) {
785
								if(typeRoot2 == null) {
750
									if ((visibility & visibilityModifiers) == 0) {
786
									if ((visibility & visibilityModifiers) == 0) {
751
										// we skip the class file according to their visibility
787
										// we skip the class file according to their visibility
Lines 768-781 Link Here
768
													typeDescriptor.getModifiers(),
804
													typeDescriptor.getModifiers(),
769
													typeName,
805
													typeName,
770
													typeName,
806
													typeName,
771
													new String[] { typeName, deltaComponentID}));
807
													new String[] { typeName, deltaComponentID }));
772
								} else {
808
								} else {
773
									if ((visibility & visibilityModifiers) == 0) {
809
									if ((visibility & visibilityModifiers) == 0) {
774
										// we skip the class file according to their visibility
810
										// we skip the class file according to their visibility
775
										return;
811
										return;
776
									}
812
									}
777
									IApiType typeDescriptor2 = typeRoot2.getStructure();
813
									IApiType typeDescriptor2 = typeRoot2.getStructure();
778
									IApiAnnotations elementDescription2 = apiDescription2.resolveAnnotations(typeDescriptor2.getHandle());
814
									IApiAnnotations elementDescription2 = providerApiDesc.resolveAnnotations(typeDescriptor2.getHandle());
779
									int visibility2 = 0;
815
									int visibility2 = 0;
780
									if (elementDescription2 != null) {
816
									if (elementDescription2 != null) {
781
										visibility2 = elementDescription2.getVisibility();
817
										visibility2 = elementDescription2.getVisibility();
Lines 787-805 Link Here
787
											return;
823
											return;
788
										}
824
										}
789
									}
825
									}
790
									if (isAPI(visibility, typeDescriptor) && !isAPI(visibility2, typeDescriptor2)) {
826
									if (isAPI(visibility, typeDescriptor)) {
791
										globalDelta.add(
827
										if (!isAPI(visibility2, typeDescriptor2)) {
828
											globalDelta.add(
792
												new Delta(
829
												new Delta(
793
														deltaComponentID,
830
													deltaComponentID,
794
														IDelta.API_COMPONENT_ELEMENT_TYPE,
831
													IDelta.API_COMPONENT_ELEMENT_TYPE,
795
														IDelta.REMOVED,
832
													IDelta.REMOVED,
796
														IDelta.API_TYPE,
833
													reexported ?  IDelta.REEXPORTED_API_TYPE : IDelta.API_TYPE,
797
														elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
834
													elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
798
														typeDescriptor2.getModifiers(),
835
													typeDescriptor2.getModifiers(),
799
														typeName,
836
													typeName,
800
														typeName,
837
													typeName,
801
														new String[] { typeName, deltaComponentID}));
838
													new String[] { typeName, deltaComponentID }));
802
										return;
839
											return;
840
										}
803
									}
841
									}
804
									if ((visibility2 & visibilityModifiers) == 0) {
842
									if ((visibility2 & visibilityModifiers) == 0) {
805
										// we simply report a changed visibility
843
										// we simply report a changed visibility
Lines 816-822 Link Here
816
														new String[] { typeName, deltaComponentID}));
854
														new String[] { typeName, deltaComponentID}));
817
									}
855
									}
818
									typeRootBaseLineNames.add(typeName);
856
									typeRootBaseLineNames.add(typeName);
819
									ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, component2, referenceBaseline, baseline, visibilityModifiers);
857
									ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, provider, referenceBaseline, baseline, visibilityModifiers);
820
									IDelta delta = comparator.getDelta();
858
									IDelta delta = comparator.getDelta();
821
									IStatus status = comparator.getStatus();
859
									IStatus status = comparator.getStatus();
822
									if(status != null) {
860
									if(status != null) {
Lines 836-841 Link Here
836
				}
874
				}
837
			}
875
			}
838
		}
876
		}
877
		IRequiredComponentDescription[] requiredComponents = component.getRequiredComponents();
878
		int length = requiredComponents.length;
879
		if (length != 0) {
880
			for (int j = 0; j < length; j++) {
881
				IRequiredComponentDescription description = requiredComponents[j];
882
				if (description.isExported()) {
883
					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
884
					String descriptionID = description.getId();
885
					IApiComponent currentRequiredApiComponent = referenceBaseline.getApiComponent(descriptionID);
886
					final IApiDescription reexportedApiDescription = currentRequiredApiComponent.getApiDescription();
887
					IApiTypeContainer[] apiTypeContainers = currentRequiredApiComponent.getApiTypeContainers();
888
					if (apiTypeContainers != null) {
889
						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
890
							IApiTypeContainer container = apiTypeContainers[i];
891
							try {
892
								container.accept(new ApiTypeContainerVisitor() {
893
									public void visit(String packageName, IApiTypeRoot typeRoot) {
894
										String typeName = typeRoot.getTypeName();
895
										try {
896
											IApiType typeDescriptor = typeRoot.getStructure();
897
											IApiAnnotations elementDescription = reexportedApiDescription.resolveAnnotations(typeDescriptor.getHandle());
898
											if (typeDescriptor.isMemberType() || typeDescriptor.isAnonymous() || typeDescriptor.isLocal()) {
899
												// we skip nested types (member, local and anonymous)
900
												return;
901
											}
902
											int visibility = 0;
903
											if (elementDescription != null) {
904
												visibility = elementDescription.getVisibility();
905
											}
906
											IApiTypeRoot typeRoot2 = null;
907
											if (isSWT) {
908
												typeRoot2 = component2.findTypeRoot(typeName);
909
											} else{
910
												typeRoot2 = component2.findTypeRoot(typeName, id);
911
											}
912
											IApiDescription providerApiDesc = null;
913
											if (typeRoot2 == null) {
914
												// check if the type is provided by a required component (it could have been moved/re-exported)
915
												IApiComponent[] providers = component2.getBaseline().resolvePackage(component2, packageName);
916
												int index = 0;
917
												while (typeRoot2 == null && index < providers.length) {
918
													IApiComponent p = providers[index];
919
													if (!p.equals(component2)) {
920
														if ("org.eclipse.swt".equals(p.getId())) { //$NON-NLS-1$
921
															typeRoot2 = p.findTypeRoot(typeName);
922
														} else {
923
															typeRoot2 = p.findTypeRoot(typeName, p.getId());
924
														}
925
														if (typeRoot2 != null) {
926
															providerApiDesc = p.getApiDescription();
927
														}
928
													}
929
													index++;
930
												}
931
											} else {
932
												providerApiDesc = apiDescription2;
933
											}
934
											if(typeRoot2 == null) {
935
												if ((visibility & visibilityModifiers) == 0) {
936
													// we skip the class file according to their visibility
937
													return;
938
												}
939
												if (visibilityModifiers == VisibilityModifiers.API) {
940
													// if the visibility is API, we only consider public and protected types
941
													if (Util.isDefault(typeDescriptor.getModifiers())
942
																|| Util.isPrivate(typeDescriptor.getModifiers())) {
943
														return;
944
													}
945
												}
946
												globalDelta.add(
947
														new Delta(
948
																currentComponentID,
949
																IDelta.API_COMPONENT_ELEMENT_TYPE,
950
																IDelta.REMOVED,
951
																IDelta.REEXPORTED_TYPE,
952
																RestrictionModifiers.NO_RESTRICTIONS,
953
																typeDescriptor.getModifiers(),
954
																typeName,
955
																typeName,
956
																new String[] { typeName, currentComponentID }));
957
											} else {
958
												typeRootBaseLineNames.add(typeName);
959
												IApiType typeDescriptor2 = typeRoot2.getStructure();
960
												IApiAnnotations elementDescription2 = providerApiDesc.resolveAnnotations(typeDescriptor2.getHandle());
961
												int visibility2 = 0;
962
												if (elementDescription2 != null) {
963
													visibility2 = elementDescription2.getVisibility();
964
												}
965
												// if the visibility is API, we only consider public and protected types
966
												if (Util.isDefault(typeDescriptor.getModifiers())
967
														|| Util.isPrivate(typeDescriptor.getModifiers())) {
968
													return;
969
												}
970
												if (isAPI(visibility, typeDescriptor)) {
971
													if (!isAPI(visibility2, typeDescriptor2)) {
972
														globalDelta.add(
973
															new Delta(
974
																currentComponentID,
975
																IDelta.API_COMPONENT_ELEMENT_TYPE,
976
																IDelta.REMOVED,
977
																IDelta.REEXPORTED_API_TYPE,
978
																elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
979
																typeDescriptor2.getModifiers(),
980
																typeName,
981
																typeName,
982
																new String[] { typeName, currentComponentID }));
983
														return;
984
													}
985
												}
986
											}
987
										} catch (CoreException e) {
988
											ApiPlugin.log(e);
989
										}
990
									}
991
								});
992
							} catch (CoreException e) {
993
								ApiPlugin.log(e);
994
							}
995
						}
996
					}
997
				}
998
			}
999
		}
839
		if (typeRootContainers2 != null) {
1000
		if (typeRootContainers2 != null) {
840
			for (int i = 0, max = typeRootContainers2.length; i < max; i++) {
1001
			for (int i = 0, max = typeRootContainers2.length; i < max; i++) {
841
				IApiTypeContainer container = typeRootContainers2[i];
1002
				IApiTypeContainer container = typeRootContainers2[i];
Lines 858-864 Link Here
858
									return;
1019
									return;
859
								}
1020
								}
860
								typeRootBaseLineNames.add(typeName);
1021
								typeRootBaseLineNames.add(typeName);
861
								String deltaComponentID = Util.getDeltaComponentID(component2);
1022
								String deltaComponentID = Util.getDeltaComponentVersionsId(component2);
862
								globalDelta.add(
1023
								globalDelta.add(
863
										new Delta(
1024
										new Delta(
864
												deltaComponentID,
1025
												deltaComponentID,
Lines 869-875 Link Here
869
												type.getModifiers(),
1030
												type.getModifiers(),
870
												typeName,
1031
												typeName,
871
												typeName,
1032
												typeName,
872
												new String[] { typeName, deltaComponentID}));
1033
												new String[] { typeName, deltaComponentID }));
873
							} catch (CoreException e) {
1034
							} catch (CoreException e) {
874
								ApiPlugin.log(e);
1035
								ApiPlugin.log(e);
875
							}
1036
							}
Lines 880-885 Link Here
880
				}
1041
				}
881
			}
1042
			}
882
		}
1043
		}
1044
		requiredComponents = component2.getRequiredComponents();
1045
		length = requiredComponents.length;
1046
		if (length != 0) {
1047
			for (int j = 0; j < length; j++) {
1048
				IRequiredComponentDescription description = requiredComponents[j];
1049
				if (description.isExported()) {
1050
					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
1051
					String descriptionID = description.getId();
1052
					IApiComponent currentRequiredApiComponent = baseline.getApiComponent(descriptionID);
1053
					IApiTypeContainer[] apiTypeContainers = currentRequiredApiComponent.getApiTypeContainers();
1054
					final IApiDescription reexportedApiDescription = currentRequiredApiComponent.getApiDescription();
1055
					if (apiTypeContainers != null) {
1056
						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
1057
							IApiTypeContainer container = apiTypeContainers[i];
1058
							try {
1059
								container.accept(new ApiTypeContainerVisitor() {
1060
									public void visit(String packageName, IApiTypeRoot typeRoot) {
1061
										String typeName = typeRoot.getTypeName();
1062
										try {
1063
											IApiType typeDescriptor = typeRoot.getStructure();
1064
											IApiAnnotations elementDescription = reexportedApiDescription.resolveAnnotations(typeDescriptor.getHandle());
1065
											if (typeDescriptor.isMemberType() || typeDescriptor.isAnonymous() || typeDescriptor.isLocal()) {
1066
												// we skip nested types (member, local and anonymous)
1067
												return;
1068
											}
1069
											if (filterType(visibilityModifiers, elementDescription, typeDescriptor)) {
1070
												return;
1071
											}
1072
											if (typeRootBaseLineNames.contains(typeName)) {
1073
												// already processed
1074
												return;
1075
											}
1076
											typeRootBaseLineNames.add(typeName);
1077
											globalDelta.add(
1078
													new Delta(
1079
															currentComponentID,
1080
															IDelta.API_COMPONENT_ELEMENT_TYPE,
1081
															IDelta.ADDED,
1082
															IDelta.REEXPORTED_TYPE,
1083
															elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1084
															typeDescriptor.getModifiers(),
1085
															typeName,
1086
															typeName,
1087
															new String[] { typeName, currentComponentID }));
1088
										} catch (CoreException e) {
1089
											ApiPlugin.log(e);
1090
										}
1091
									}
1092
								});
1093
							} catch (CoreException e) {
1094
								ApiPlugin.log(e);
1095
							}
1096
						}
1097
					}
1098
				}
1099
			}
1100
		}
883
		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
1101
		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
884
	}
1102
	}
885
1103
(-)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