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 324076
Collapse All | Expand All

(-)src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java (-1 / +2 lines)
Lines 1065-1070 Link Here
1065
										IDelta.REMOVED,
1065
										IDelta.REMOVED,
1066
										IDelta.TYPE,
1066
										IDelta.TYPE,
1067
										restrictions,
1067
										restrictions,
1068
										RestrictionModifiers.NO_RESTRICTIONS,
1068
										type.getModifiers(),
1069
										type.getModifiers(),
1069
										0,
1070
										0,
1070
										typeName,
1071
										typeName,
Lines 1500-1506 Link Here
1500
		int kind = delta.getKind();
1501
		int kind = delta.getKind();
1501
		int modifiers = delta.getNewModifiers();
1502
		int modifiers = delta.getNewModifiers();
1502
		if (DeltaProcessor.isCompatible(delta)) {
1503
		if (DeltaProcessor.isCompatible(delta)) {
1503
			if (!RestrictionModifiers.isReferenceRestriction(delta.getRestrictions())) {
1504
			if (!RestrictionModifiers.isReferenceRestriction(delta.getCurrentRestrictions())) {
1504
				if (Util.isVisible(modifiers)) {
1505
				if (Util.isVisible(modifiers)) {
1505
					if (Flags.isProtected(modifiers)) {
1506
					if (Flags.isProtected(modifiers)) {
1506
						String typeName = delta.getTypeName();
1507
						String typeName = delta.getTypeName();
(-)src/org/eclipse/pde/api/tools/internal/builder/BuildState.java (-2 / +4 lines)
Lines 189-195 Link Here
189
		}
189
		}
190
		int oldModifiers = modifiers & Delta.MODIFIERS_MASK;
190
		int oldModifiers = modifiers & Delta.MODIFIERS_MASK;
191
		int newModifiers = modifiers >>> Delta.NEW_MODIFIERS_OFFSET;
191
		int newModifiers = modifiers >>> Delta.NEW_MODIFIERS_OFFSET;
192
		return new Delta(componentID, elementType, kind, flags, restrictions, oldModifiers, newModifiers, typeName, key, datas);
192
		int previousRestrictions = restrictions >>> Delta.PREVIOUS_RESTRICTIONS_OFFSET;
193
		int currentRestrictions = restrictions & Delta.RESTRICTIONS_MASK;
194
		return new Delta(componentID, elementType, kind, flags, currentRestrictions, previousRestrictions, oldModifiers, newModifiers, typeName, key, datas);
193
	}
195
	}
194
	
196
	
195
	/**
197
	/**
Lines 210-216 Link Here
210
		out.writeInt(delta.getElementType());
212
		out.writeInt(delta.getElementType());
211
		out.writeInt(delta.getKind());
213
		out.writeInt(delta.getKind());
212
		out.writeInt(delta.getFlags());
214
		out.writeInt(delta.getFlags());
213
		out.writeInt(delta.getRestrictions());
215
		out.writeInt(delta.getCurrentRestrictions());
214
		int modifiers = (delta.getNewModifiers() << Delta.NEW_MODIFIERS_OFFSET) | delta.getOldModifiers();
216
		int modifiers = (delta.getNewModifiers() << Delta.NEW_MODIFIERS_OFFSET) | delta.getOldModifiers();
215
		out.writeInt(modifiers);
217
		out.writeInt(modifiers);
216
		out.writeUTF(delta.getTypeName());
218
		out.writeUTF(delta.getTypeName());
(-)src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java (-2 / +8 lines)
Lines 173-179 Link Here
173
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, oldModifiers, newModifiers, type.getName(), key, data));
173
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, oldModifiers, newModifiers, type.getName(), key, data));
174
	}
174
	}
175
	private void addDelta(int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, IApiType type, String key, String[] datas) {
175
	private void addDelta(int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, IApiType type, String key, String[] datas) {
176
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, oldModifiers, newModifiers, type.getName(), key, datas));
176
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, 0, oldModifiers, newModifiers, type.getName(), key, datas));
177
	}
178
	private void addDelta(int elementType, int kind, int flags, int currentRestrictions, int previousRestrictions, int oldModifiers, int newModifiers, IApiType type, String key, String[] datas) {
179
		this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, currentRestrictions, previousRestrictions, oldModifiers, newModifiers, type.getName(), key, datas));
177
	}
180
	}
178
	/**
181
	/**
179
	 * Checks if the super-class set has been change in any way compared to the baseline (grown or reduced or types changed)
182
	 * Checks if the super-class set has been change in any way compared to the baseline (grown or reduced or types changed)
Lines 542-547 Link Here
542
											IDelta.CHANGED,
545
											IDelta.CHANGED,
543
											IDelta.DECREASE_ACCESS,
546
											IDelta.DECREASE_ACCESS,
544
											restrictions | this.currentDescriptorRestrictions,
547
											restrictions | this.currentDescriptorRestrictions,
548
											0,
545
											typeMember.getModifiers(),
549
											typeMember.getModifiers(),
546
											typeMember2.getModifiers(),
550
											typeMember2.getModifiers(),
547
											typeMember.getName(),
551
											typeMember.getName(),
Lines 558-563 Link Here
558
											IDelta.CHANGED,
562
											IDelta.CHANGED,
559
											IDelta.TYPE_VISIBILITY,
563
											IDelta.TYPE_VISIBILITY,
560
											restrictions | this.currentDescriptorRestrictions,
564
											restrictions | this.currentDescriptorRestrictions,
565
											0,
561
											typeMember.getModifiers(),
566
											typeMember.getModifiers(),
562
											typeMember2.getModifiers(),
567
											typeMember2.getModifiers(),
563
											typeMember.getName(),
568
											typeMember.getName(),
Lines 2369-2380 Link Here
2369
			if (restrictions != referenceRestrictions) {
2374
			if (restrictions != referenceRestrictions) {
2370
				if (!Flags.isFinal(access2)) {
2375
				if (!Flags.isFinal(access2)) {
2371
					if (RestrictionModifiers.isOverrideRestriction(restrictions)
2376
					if (RestrictionModifiers.isOverrideRestriction(restrictions)
2372
							&& !RestrictionModifiers.isOverrideRestriction(referenceRestrictions)) {
2377
								&& !RestrictionModifiers.isOverrideRestriction(referenceRestrictions)) {
2373
							this.addDelta(
2378
							this.addDelta(
2374
									getElementType(method),
2379
									getElementType(method),
2375
									IDelta.ADDED,
2380
									IDelta.ADDED,
2376
									IDelta.RESTRICTIONS,
2381
									IDelta.RESTRICTIONS,
2377
									restrictions,
2382
									restrictions,
2383
									referenceRestrictions,
2378
									access,
2384
									access,
2379
									access2,
2385
									access2,
2380
									this.type1,
2386
									this.type1,
(-)src/org/eclipse/pde/api/tools/internal/comparator/Delta.java (-9 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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 28-33 Link Here
28
	public static final int MODIFIERS_MASK = 0xFFFF;
28
	public static final int MODIFIERS_MASK = 0xFFFF;
29
	public static final int NEW_MODIFIERS_OFFSET = 16;
29
	public static final int NEW_MODIFIERS_OFFSET = 16;
30
30
31
	public static final int RESTRICTIONS_MASK = 0xFFFF;
32
	public static final int PREVIOUS_RESTRICTIONS_OFFSET = 16;
33
31
	/**
34
	/**
32
	 * Writes the delta to the given {@link PrintWriter}
35
	 * Writes the delta to the given {@link PrintWriter}
33
	 * @param delta
36
	 * @param delta
Lines 105-121 Link Here
105
	 * @param data
108
	 * @param data
106
	 */
109
	 */
107
	public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, String typeName, String key, String data) {
110
	public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, String typeName, String key, String data) {
108
		this(componentID, elementType, kind, flags, restrictions, oldModifiers, newModifiers, typeName, key, new String[] {data});
111
		this(componentID, elementType, kind, flags, restrictions, 0, oldModifiers, newModifiers, typeName, key, new String[] {data});
109
	}
112
	}
110
113
111
	public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, String typeName, String key, String[] datas) {
114
	public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int previousRestrictions, int oldModifiers, int newModifiers, String typeName, String key, String[] datas) {
112
		this.componentID = componentID;
115
		this.componentID = componentID;
113
		this.elementType = elementType;
116
		this.elementType = elementType;
114
		this.kind = kind;
117
		this.kind = kind;
115
		this.flags = flags;
118
		this.flags = flags;
116
		this.modifiers = (newModifiers & MODIFIERS_MASK) << 16 | (oldModifiers & MODIFIERS_MASK);
119
		this.modifiers = (newModifiers & MODIFIERS_MASK) << NEW_MODIFIERS_OFFSET | (oldModifiers & MODIFIERS_MASK);
117
		this.typeName = typeName == null ? Util.EMPTY_STRING : typeName;
120
		this.typeName = typeName == null ? Util.EMPTY_STRING : typeName;
118
		this.restrictions = restrictions;
121
		this.restrictions = (previousRestrictions & RESTRICTIONS_MASK) << PREVIOUS_RESTRICTIONS_OFFSET | (restrictions & RESTRICTIONS_MASK);
119
		this.key = key;
122
		this.key = key;
120
		this.datas = datas;
123
		this.datas = datas;
121
	}
124
	}
Lines 304-315 Link Here
304
		return this.modifiers & MODIFIERS_MASK;
307
		return this.modifiers & MODIFIERS_MASK;
305
	}
308
	}
306
	/* (non-Javadoc)
309
	/* (non-Javadoc)
307
	 * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getRestrictions()
310
	 * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getCurrentRestrictions()
308
	 */
311
	 */
309
	public int getRestrictions() {
312
	public int getCurrentRestrictions() {
310
		return this.restrictions;
313
		return (this.restrictions & RESTRICTIONS_MASK);
314
	}
315
	/* (non-Javadoc)
316
	 * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getPreviousRestrictions()
317
	 */
318
	public int getPreviousRestrictions() {
319
		return (this.restrictions >>> PREVIOUS_RESTRICTIONS_OFFSET);
311
	}
320
	}
312
	
313
	/* (non-Javadoc)
321
	/* (non-Javadoc)
314
	 * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getTypeName()
322
	 * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getTypeName()
315
	 */
323
	 */
(-)src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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_OLD_MODIFIERS, Integer.toString(delta.getOldModifiers()));
74
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_OLD_MODIFIERS, Integer.toString(delta.getOldModifiers()));
75
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS, Integer.toString(delta.getNewModifiers()));
75
		deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS, Integer.toString(delta.getNewModifiers()));
76
		deltaElement.setAttribute(IApiXmlConstants.ATTR_RESTRICTIONS, Integer.toString(delta.getRestrictions()));
76
		deltaElement.setAttribute(IApiXmlConstants.ATTR_RESTRICTIONS, Integer.toString(delta.getCurrentRestrictions()));
77
		String apiComponentID = delta.getComponentVersionId();
77
		String apiComponentID = delta.getComponentVersionId();
78
		if (apiComponentID != null) {
78
		if (apiComponentID != null) {
79
			deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID);
79
			deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID);
(-)src/org/eclipse/pde/api/tools/internal/comparator/Messages.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
2
 * Copyright (c) 2008, 2010 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 418-427 Link Here
418
							case IDelta.SYNCHRONIZED_TO_NON_SYNCHRONIZED :
418
							case IDelta.SYNCHRONIZED_TO_NON_SYNCHRONIZED :
419
								return 74;
419
								return 74;
420
							case IDelta.NON_FINAL_TO_FINAL :
420
							case IDelta.NON_FINAL_TO_FINAL :
421
								if (RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) {
421
								if (RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions())) {
422
									return 81;
422
									return 81;
423
								}
423
								}
424
								if (RestrictionModifiers.isOverrideRestriction(delta.getRestrictions())) {
424
								if (RestrictionModifiers.isOverrideRestriction(delta.getCurrentRestrictions())) {
425
									return 82;
425
									return 82;
426
								}
426
								}
427
								return 83;
427
								return 83;
(-)src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java (-1 / +1 lines)
Lines 327-333 Link Here
327
			version = ver != null ? new Version(ver) : null;
327
			version = ver != null ? new Version(ver) : null;
328
		}
328
		}
329
		catch (NumberFormatException nfe) {
329
		catch (NumberFormatException nfe) {
330
			version = null;
330
			// ignore
331
		}
331
		}
332
		ManifestElement[] name = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, (String)manifest.get(Constants.BUNDLE_SYMBOLICNAME));
332
		ManifestElement[] name = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, (String)manifest.get(Constants.BUNDLE_SYMBOLICNAME));
333
		if(name.length < 1) {
333
		if(name.length < 1) {
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java (+15 lines)
Lines 84-89 Link Here
84
						IDelta.CHANGED,
84
						IDelta.CHANGED,
85
						IDelta.MAJOR_VERSION,
85
						IDelta.MAJOR_VERSION,
86
						RestrictionModifiers.NO_RESTRICTIONS,
86
						RestrictionModifiers.NO_RESTRICTIONS,
87
						RestrictionModifiers.NO_RESTRICTIONS,
87
						0,
88
						0,
88
						0,
89
						0,
89
						null,
90
						null,
Lines 101-106 Link Here
101
						IDelta.CHANGED,
102
						IDelta.CHANGED,
102
						IDelta.MINOR_VERSION,
103
						IDelta.MINOR_VERSION,
103
						RestrictionModifiers.NO_RESTRICTIONS,
104
						RestrictionModifiers.NO_RESTRICTIONS,
105
						RestrictionModifiers.NO_RESTRICTIONS,
104
						0,
106
						0,
105
						0,
107
						0,
106
						null,
108
						null,
Lines 348-353 Link Here
348
									IDelta.REMOVED,
350
									IDelta.REMOVED,
349
									IDelta.EXECUTION_ENVIRONMENT,
351
									IDelta.EXECUTION_ENVIRONMENT,
350
									RestrictionModifiers.NO_RESTRICTIONS,
352
									RestrictionModifiers.NO_RESTRICTIONS,
353
									RestrictionModifiers.NO_RESTRICTIONS,
351
									0,
354
									0,
352
									0,
355
									0,
353
									null,
356
									null,
Lines 365-370 Link Here
365
								IDelta.ADDED,
368
								IDelta.ADDED,
366
								IDelta.EXECUTION_ENVIRONMENT,
369
								IDelta.EXECUTION_ENVIRONMENT,
367
								RestrictionModifiers.NO_RESTRICTIONS,
370
								RestrictionModifiers.NO_RESTRICTIONS,
371
								RestrictionModifiers.NO_RESTRICTIONS,
368
								0,
372
								0,
369
								0,
373
								0,
370
								null,
374
								null,
Lines 481-486 Link Here
481
							IDelta.ADDED,
485
							IDelta.ADDED,
482
							reexporter == null ? IDelta.TYPE : IDelta.REEXPORTED_TYPE,
486
							reexporter == null ? IDelta.TYPE : IDelta.REEXPORTED_TYPE,
483
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
487
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
488
							RestrictionModifiers.NO_RESTRICTIONS,
484
							0,
489
							0,
485
							typeDescriptor2.getModifiers(),
490
							typeDescriptor2.getModifiers(),
486
							typeName,
491
							typeName,
Lines 503-508 Link Here
503
							IDelta.REMOVED,
508
							IDelta.REMOVED,
504
							IDelta.API_TYPE,
509
							IDelta.API_TYPE,
505
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
510
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
511
							RestrictionModifiers.NO_RESTRICTIONS,
506
							typeDescriptor.getModifiers(),
512
							typeDescriptor.getModifiers(),
507
							typeDescriptor2.getModifiers(),
513
							typeDescriptor2.getModifiers(),
508
							typeName,
514
							typeName,
Lines 517-522 Link Here
517
						IDelta.ADDED,
523
						IDelta.ADDED,
518
						IDelta.TYPE,
524
						IDelta.TYPE,
519
						elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
525
						elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
526
						RestrictionModifiers.NO_RESTRICTIONS,
520
						typeDescriptor.getModifiers(),
527
						typeDescriptor.getModifiers(),
521
						typeDescriptor2.getModifiers(),
528
						typeDescriptor2.getModifiers(),
522
						typeName,
529
						typeName,
Lines 537-542 Link Here
537
							IDelta.REMOVED,
544
							IDelta.REMOVED,
538
							IDelta.API_TYPE,
545
							IDelta.API_TYPE,
539
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
546
							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
547
							RestrictionModifiers.NO_RESTRICTIONS,
540
							typeDescriptor.getModifiers(),
548
							typeDescriptor.getModifiers(),
541
							typeDescriptor2.getModifiers(),
549
							typeDescriptor2.getModifiers(),
542
							typeName,
550
							typeName,
Lines 837-842 Link Here
837
													IDelta.REMOVED,
845
													IDelta.REMOVED,
838
													IDelta.TYPE,
846
													IDelta.TYPE,
839
													RestrictionModifiers.NO_RESTRICTIONS,
847
													RestrictionModifiers.NO_RESTRICTIONS,
848
													RestrictionModifiers.NO_RESTRICTIONS,
840
													typeDescriptor.getModifiers(),
849
													typeDescriptor.getModifiers(),
841
													0,
850
													0,
842
													typeName,
851
													typeName,
Lines 869-874 Link Here
869
													IDelta.REMOVED,
878
													IDelta.REMOVED,
870
													reexported ?  IDelta.REEXPORTED_API_TYPE : IDelta.API_TYPE,
879
													reexported ?  IDelta.REEXPORTED_API_TYPE : IDelta.API_TYPE,
871
													elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
880
													elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
881
													RestrictionModifiers.NO_RESTRICTIONS,
872
													typeDescriptor.getModifiers(),
882
													typeDescriptor.getModifiers(),
873
													typeDescriptor2.getModifiers(),
883
													typeDescriptor2.getModifiers(),
874
													typeName,
884
													typeName,
Lines 886-891 Link Here
886
														IDelta.CHANGED,
896
														IDelta.CHANGED,
887
														IDelta.TYPE_VISIBILITY,
897
														IDelta.TYPE_VISIBILITY,
888
														elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
898
														elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
899
														RestrictionModifiers.NO_RESTRICTIONS,
889
														typeDescriptor.getModifiers(),
900
														typeDescriptor.getModifiers(),
890
														typeDescriptor2.getModifiers(),
901
														typeDescriptor2.getModifiers(),
891
														typeName,
902
														typeName,
Lines 1000-1005 Link Here
1000
																IDelta.REMOVED,
1011
																IDelta.REMOVED,
1001
																IDelta.REEXPORTED_TYPE,
1012
																IDelta.REEXPORTED_TYPE,
1002
																RestrictionModifiers.NO_RESTRICTIONS,
1013
																RestrictionModifiers.NO_RESTRICTIONS,
1014
																RestrictionModifiers.NO_RESTRICTIONS,
1003
																typeDescriptor.getModifiers(),
1015
																typeDescriptor.getModifiers(),
1004
																0,
1016
																0,
1005
																typeName,
1017
																typeName,
Lines 1027-1032 Link Here
1027
																IDelta.REMOVED,
1039
																IDelta.REMOVED,
1028
																IDelta.REEXPORTED_API_TYPE,
1040
																IDelta.REEXPORTED_API_TYPE,
1029
																elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1041
																elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1042
																RestrictionModifiers.NO_RESTRICTIONS,
1030
																typeDescriptor.getModifiers(),
1043
																typeDescriptor.getModifiers(),
1031
																typeDescriptor2.getModifiers(),
1044
																typeDescriptor2.getModifiers(),
1032
																typeName,
1045
																typeName,
Lines 1082-1087 Link Here
1082
												IDelta.ADDED,
1095
												IDelta.ADDED,
1083
												IDelta.TYPE,
1096
												IDelta.TYPE,
1084
												elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1097
												elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1098
												RestrictionModifiers.NO_RESTRICTIONS,
1085
												0,
1099
												0,
1086
												type.getModifiers(),
1100
												type.getModifiers(),
1087
												typeName,
1101
												typeName,
Lines 1144-1149 Link Here
1144
															IDelta.ADDED,
1158
															IDelta.ADDED,
1145
															IDelta.REEXPORTED_TYPE,
1159
															IDelta.REEXPORTED_TYPE,
1146
															elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1160
															elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
1161
															RestrictionModifiers.NO_RESTRICTIONS,
1147
															0,
1162
															0,
1148
															typeDescriptor.getModifiers(),
1163
															typeDescriptor.getModifiers(),
1149
															typeName,
1164
															typeName,
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java (-19 / +22 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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 173-179 Link Here
173
	 * @return true if compatible, false otherwise
173
	 * @return true if compatible, false otherwise
174
	 */
174
	 */
175
	private static boolean isMethodCompatible(IDelta delta) {
175
	private static boolean isMethodCompatible(IDelta delta) {
176
		int restrictions = delta.getRestrictions();
176
		int restrictions = delta.getCurrentRestrictions();
177
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
177
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
178
			return true;
178
			return true;
179
		}
179
		}
Lines 189-195 Link Here
189
				switch(delta.getFlags()) {
189
				switch(delta.getFlags()) {
190
					case IDelta.TYPE_PARAMETER :
190
					case IDelta.TYPE_PARAMETER :
191
					case IDelta.RESTRICTIONS :
191
					case IDelta.RESTRICTIONS :
192
						return !Util.isVisible(delta.getNewModifiers());
192
						if (Util.isVisible(delta.getNewModifiers())) {
193
							return RestrictionModifiers.isExtendRestriction(delta.getPreviousRestrictions());
194
						}
195
						return true;
193
				}
196
				}
194
				break;
197
				break;
195
			case IDelta.CHANGED :
198
			case IDelta.CHANGED :
Lines 219-225 Link Here
219
	 * @return true if compatible, false otherwise
222
	 * @return true if compatible, false otherwise
220
	 */
223
	 */
221
	private static boolean isFieldCompatible(IDelta delta) {
224
	private static boolean isFieldCompatible(IDelta delta) {
222
		int restrictions = delta.getRestrictions();
225
		int restrictions = delta.getCurrentRestrictions();
223
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
226
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
224
			return true;
227
			return true;
225
		}
228
		}
Lines 230-236 Link Here
230
				switch(delta.getFlags()) {
233
				switch(delta.getFlags()) {
231
					case IDelta.VALUE :
234
					case IDelta.VALUE :
232
						if (Flags.isProtected(oldModifiers)) {
235
						if (Flags.isProtected(oldModifiers)) {
233
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
236
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
234
						}
237
						}
235
						if (Flags.isPublic(oldModifiers)) {
238
						if (Flags.isPublic(oldModifiers)) {
236
							return false;
239
							return false;
Lines 249-255 Link Here
249
				switch(delta.getFlags()) {
252
				switch(delta.getFlags()) {
250
					case IDelta.TYPE :
253
					case IDelta.TYPE :
251
						if (Flags.isProtected(newModifiers)) {
254
						if (Flags.isProtected(newModifiers)) {
252
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
255
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
253
						}
256
						}
254
						return !Util.isVisible(newModifiers);
257
						return !Util.isVisible(newModifiers);
255
					case IDelta.TYPE_ARGUMENT :
258
					case IDelta.TYPE_ARGUMENT :
Lines 260-266 Link Here
260
					case IDelta.VALUE :
263
					case IDelta.VALUE :
261
					case IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT :
264
					case IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT :
262
						if (Flags.isProtected(newModifiers)) {
265
						if (Flags.isProtected(newModifiers)) {
263
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
266
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
264
						}
267
						}
265
						if (Flags.isPublic(newModifiers)) {
268
						if (Flags.isPublic(newModifiers)) {
266
							return false;
269
							return false;
Lines 268-274 Link Here
268
						// not visible
271
						// not visible
269
						return true;
272
						return true;
270
					case IDelta.DECREASE_ACCESS :
273
					case IDelta.DECREASE_ACCESS :
271
						return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
274
						return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
272
				}
275
				}
273
				break;
276
				break;
274
			case IDelta.ADDED :
277
			case IDelta.ADDED :
Lines 286-292 Link Here
286
	 * @return true if compatible, false otherwise
289
	 * @return true if compatible, false otherwise
287
	 */
290
	 */
288
	private static boolean isConstructorCompatible(IDelta delta) {
291
	private static boolean isConstructorCompatible(IDelta delta) {
289
		int restrictions = delta.getRestrictions();
292
		int restrictions = delta.getCurrentRestrictions();
290
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
293
		if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
291
			return true;
294
			return true;
292
		}
295
		}
Lines 380-386 Link Here
380
						if (Util.isVisible(newModifiers)) {
383
						if (Util.isVisible(newModifiers)) {
381
							if (Flags.isAbstract(newModifiers)) {
384
							if (Flags.isAbstract(newModifiers)) {
382
								// case where the implementation is provided and the class cannot be instantiated by the client
385
								// case where the implementation is provided and the class cannot be instantiated by the client
383
								return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
386
								return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
384
							}
387
							}
385
						}
388
						}
386
						return true; 
389
						return true; 
Lines 400-414 Link Here
400
							return false;
403
							return false;
401
						}
404
						}
402
						if (Flags.isProtected(delta.getOldModifiers())) {
405
						if (Flags.isProtected(delta.getOldModifiers())) {
403
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
406
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
404
						}
407
						}
405
						return true;
408
						return true;
406
					case IDelta.CONSTRUCTOR :
409
					case IDelta.CONSTRUCTOR :
407
					case IDelta.API_CONSTRUCTOR :
410
					case IDelta.API_CONSTRUCTOR :
408
						if (Util.isVisible(delta.getOldModifiers())) {
411
						if (Util.isVisible(delta.getOldModifiers())) {
409
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions())
412
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions())
410
									&& (Flags.isProtected(delta.getOldModifiers()) ||
413
									&& (Flags.isProtected(delta.getOldModifiers()) ||
411
											RestrictionModifiers.isInstantiateRestriction(delta.getRestrictions()));
414
											RestrictionModifiers.isInstantiateRestriction(delta.getCurrentRestrictions()));
412
						}
415
						}
413
						return true;
416
						return true;
414
					case IDelta.TYPE_PARAMETER :
417
					case IDelta.TYPE_PARAMETER :
Lines 420-426 Link Here
420
				switch(delta.getFlags()) {
423
				switch(delta.getFlags()) {
421
					case IDelta.NON_ABSTRACT_TO_ABSTRACT :
424
					case IDelta.NON_ABSTRACT_TO_ABSTRACT :
422
						if (Util.isVisible(delta.getNewModifiers())) {
425
						if (Util.isVisible(delta.getNewModifiers())) {
423
							return RestrictionModifiers.isInstantiateRestriction(delta.getRestrictions());
426
							return RestrictionModifiers.isInstantiateRestriction(delta.getCurrentRestrictions());
424
						}
427
						}
425
						return true;
428
						return true;
426
					case IDelta.TYPE_CONVERSION :
429
					case IDelta.TYPE_CONVERSION :
Lines 430-440 Link Here
430
						return !Util.isVisible(delta.getNewModifiers());
433
						return !Util.isVisible(delta.getNewModifiers());
431
					case IDelta.NON_FINAL_TO_FINAL:
434
					case IDelta.NON_FINAL_TO_FINAL:
432
						if (Util.isVisible(delta.getNewModifiers())) {
435
						if (Util.isVisible(delta.getNewModifiers())) {
433
							return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
436
							return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
434
						}
437
						}
435
						return true; 
438
						return true; 
436
					case IDelta.DECREASE_ACCESS :
439
					case IDelta.DECREASE_ACCESS :
437
						return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
440
						return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
438
				}
441
				}
439
				break;
442
				break;
440
		}
443
		}
Lines 481-490 Link Here
481
			case IDelta.ADDED :
484
			case IDelta.ADDED :
482
				switch(delta.getFlags()) {
485
				switch(delta.getFlags()) {
483
					case IDelta.FIELD :
486
					case IDelta.FIELD :
484
						return RestrictionModifiers.isImplementRestriction(delta.getRestrictions());
487
						return RestrictionModifiers.isImplementRestriction(delta.getCurrentRestrictions());
485
					case IDelta.METHOD :
488
					case IDelta.METHOD :
486
					case IDelta.SUPER_INTERFACE_WITH_METHODS :
489
					case IDelta.SUPER_INTERFACE_WITH_METHODS :
487
						return RestrictionModifiers.isImplementRestriction(delta.getRestrictions());
490
						return RestrictionModifiers.isImplementRestriction(delta.getCurrentRestrictions());
488
					case IDelta.TYPE_PARAMETER :
491
					case IDelta.TYPE_PARAMETER :
489
						return false;
492
						return false;
490
					case IDelta.RESTRICTIONS :
493
					case IDelta.RESTRICTIONS :
Lines 508-514 Link Here
508
					case IDelta.TYPE_CONVERSION :
511
					case IDelta.TYPE_CONVERSION :
509
						return false;
512
						return false;
510
					case IDelta.DECREASE_ACCESS :
513
					case IDelta.DECREASE_ACCESS :
511
						return RestrictionModifiers.isExtendRestriction(delta.getRestrictions());
514
						return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions());
512
				}
515
				}
513
				break;
516
				break;
514
		}
517
		}
(-)src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java (-4 / +11 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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 942-952 Link Here
942
	public String[] getArguments();
942
	public String[] getArguments();
943
	
943
	
944
	/**
944
	/**
945
	 * Returns the delta's restrictions.
945
	 * Returns the delta's current restrictions.
946
	 * 
946
	 * 
947
	 * @return the delta's restrictions
947
	 * @return the delta's current restrictions
948
	 */
948
	 */
949
	public int getRestrictions();
949
	public int getCurrentRestrictions();
950
951
	/**
952
	 * Returns the delta's previous restrictions.
953
	 * 
954
	 * @return the delta's previous restrictions
955
	 */
956
	public int getPreviousRestrictions();
950
957
951
	/**
958
	/**
952
	 * Returns the delta's new modifiers. This corresponds to the new modifiers of the affected element.
959
	 * Returns the delta's new modifiers. This corresponds to the new modifiers of the affected element.
(-)src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java (-1 / +1 lines)
Lines 146-152 Link Here
146
									break;
146
									break;
147
							}
147
							}
148
						}
148
						}
149
					} else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) {
149
					} else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions())) {
150
						if ((this.flags & CHECK_DEPRECATION) != 0) {
150
						if ((this.flags & CHECK_DEPRECATION) != 0) {
151
							switch(delta.getFlags()) {
151
							switch(delta.getFlags()) {
152
								case IDelta.DEPRECATION :
152
								case IDelta.DEPRECATION :
(-)src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityMethodTests.java (-1 / +20 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
2
 * Copyright (c) 2008, 2010 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 56-61 Link Here
56
	 */
56
	 */
57
	public static Test suite() {
57
	public static Test suite() {
58
		return buildTestSuite(ClassCompatibilityMethodTests.class);
58
		return buildTestSuite(ClassCompatibilityMethodTests.class);
59
//		junit.framework.TestSuite suite = new junit.framework.TestSuite();
60
//		suite.addTest(new ClassCompatibilityMethodTests("testAddNooverrideRemoveNoextendI"));
61
//		suite.addTest(new ClassCompatibilityMethodTests("testAddNooverrideRemoveNoextendF"));
62
//		return suite;
59
	}
63
	}
60
64
61
	/* (non-Javadoc)
65
	/* (non-Javadoc)
Lines 107-112 Link Here
107
		xRemoveTwoPublicAPIMethods(false);
111
		xRemoveTwoPublicAPIMethods(false);
108
	}	
112
	}	
109
	
113
	
114
	public void testAddNooverrideRemoveNoextendI() throws Exception {
115
		xAddNooverrideRemoveNoextendI(true);
116
	}	
117
	
118
	public void testAddNooverrideRemoveNoextendF() throws Exception {
119
		xAddNooverrideRemoveNoextendI(false);
120
	}	
121
	
122
	/**
123
	 * Tests the removal of a public methods from an API class - incremental.
124
	 */
125
	private void xAddNooverrideRemoveNoextendI(boolean incremental) throws Exception {
126
		IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("AddNooverrideRemoveNoextend.java");
127
		performCompatibilityTest(filePath, incremental);
128
	}
110
	/**
129
	/**
111
	 * Tests the removal of a public methods from an API class - incremental.
130
	 * Tests the removal of a public methods from an API class - incremental.
112
	 */
131
	 */
(-)src/org/eclipse/pde/api/tools/comparator/tests/ClassDeltaTests.java (-29 / +29 lines)
Lines 1334-1340 Link Here
1334
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1334
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1335
		IDelta child = allLeavesDeltas[0];
1335
		IDelta child = allLeavesDeltas[0];
1336
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1336
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1337
		assertTrue("Has no extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1337
		assertTrue("Has no extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1338
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1338
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1339
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1339
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1340
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1340
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1362-1368 Link Here
1362
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1362
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1363
		IDelta child = allLeavesDeltas[0];
1363
		IDelta child = allLeavesDeltas[0];
1364
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1364
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1365
		assertFalse("Extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1365
		assertFalse("Extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1366
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1366
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1367
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1367
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1368
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1368
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1458-1464 Link Here
1458
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1458
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1459
		IDelta child = allLeavesDeltas[0];
1459
		IDelta child = allLeavesDeltas[0];
1460
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1460
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1461
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1461
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1462
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1462
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1463
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1463
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1464
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1464
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1482-1488 Link Here
1482
		IDelta child = allLeavesDeltas[0];
1482
		IDelta child = allLeavesDeltas[0];
1483
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1483
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1484
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1484
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1485
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1485
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1486
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1486
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1487
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1487
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1488
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1488
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1595-1601 Link Here
1595
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1595
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1596
		IDelta child = allLeavesDeltas[0];
1596
		IDelta child = allLeavesDeltas[0];
1597
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1597
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1598
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1598
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1599
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1599
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
1600
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1600
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1601
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1601
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1693-1699 Link Here
1693
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1693
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1694
		IDelta child = allLeavesDeltas[0];
1694
		IDelta child = allLeavesDeltas[0];
1695
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1695
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1696
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1696
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1697
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1697
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1698
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1698
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1699
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1699
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1721-1727 Link Here
1721
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1721
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1722
		IDelta child = allLeavesDeltas[0];
1722
		IDelta child = allLeavesDeltas[0];
1723
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1723
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1724
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1724
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1725
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1725
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1726
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1726
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1727
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1727
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1749-1755 Link Here
1749
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1749
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1750
		IDelta child = allLeavesDeltas[0];
1750
		IDelta child = allLeavesDeltas[0];
1751
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1751
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1752
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1752
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1753
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
1753
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
1754
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1754
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1755
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1755
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1772-1778 Link Here
1772
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1772
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1773
		IDelta child = allLeavesDeltas[0];
1773
		IDelta child = allLeavesDeltas[0];
1774
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1774
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1775
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1775
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1776
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
1776
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
1777
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1777
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1778
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1778
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1834-1840 Link Here
1834
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1834
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1835
		IDelta child = allLeavesDeltas[0];
1835
		IDelta child = allLeavesDeltas[0];
1836
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1836
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1837
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1837
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1838
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1838
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1839
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1839
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1840
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1840
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1857-1863 Link Here
1857
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1857
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
1858
		IDelta child = allLeavesDeltas[0];
1858
		IDelta child = allLeavesDeltas[0];
1859
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1859
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1860
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1860
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1861
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1861
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1862
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1862
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1863
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1863
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2140-2146 Link Here
2140
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2140
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2141
		IDelta child = allLeavesDeltas[0];
2141
		IDelta child = allLeavesDeltas[0];
2142
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2142
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2143
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2143
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2144
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
2144
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
2145
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2145
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2146
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2146
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2209-2215 Link Here
2209
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2209
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2210
		IDelta child = allLeavesDeltas[0];
2210
		IDelta child = allLeavesDeltas[0];
2211
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2211
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2212
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2212
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2213
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
2213
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
2214
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2214
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2215
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2215
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2383-2389 Link Here
2383
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2383
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2384
		IDelta child = allLeavesDeltas[0];
2384
		IDelta child = allLeavesDeltas[0];
2385
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2385
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2386
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2386
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2387
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2387
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2388
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2388
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2389
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2389
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2473-2479 Link Here
2473
		IDelta child = allLeavesDeltas[0];
2473
		IDelta child = allLeavesDeltas[0];
2474
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2474
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2475
		// implicit restrictions
2475
		// implicit restrictions
2476
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2476
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2477
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2477
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2478
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2478
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2479
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2479
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2497-2503 Link Here
2497
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2497
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2498
		IDelta child = allLeavesDeltas[0];
2498
		IDelta child = allLeavesDeltas[0];
2499
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2499
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2500
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2500
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2501
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2501
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2502
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2502
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2503
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2503
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2544-2550 Link Here
2544
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2544
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2545
		IDelta child = allLeavesDeltas[0];
2545
		IDelta child = allLeavesDeltas[0];
2546
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2546
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2547
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2547
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2548
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2548
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2549
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2549
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2550
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2550
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2590-2596 Link Here
2590
		IDelta child = allLeavesDeltas[0];
2590
		IDelta child = allLeavesDeltas[0];
2591
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2591
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2592
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2592
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2593
		assertTrue("No extend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2593
		assertTrue("No extend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2594
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2594
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2595
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2595
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2596
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2596
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2613-2619 Link Here
2613
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2613
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2614
		IDelta child = allLeavesDeltas[0];
2614
		IDelta child = allLeavesDeltas[0];
2615
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2615
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2616
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2616
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2617
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2617
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
2618
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2618
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2619
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2619
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 2637-2643 Link Here
2637
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2637
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2638
		IDelta child = allLeavesDeltas[0];
2638
		IDelta child = allLeavesDeltas[0];
2639
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2639
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2640
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2640
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2641
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2641
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
2642
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2642
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2643
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2643
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 2660-2666 Link Here
2660
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2660
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2661
		IDelta child = allLeavesDeltas[0];
2661
		IDelta child = allLeavesDeltas[0];
2662
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2662
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2663
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2663
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2664
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2664
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2665
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2665
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2666
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2666
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 2683-2690 Link Here
2683
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2683
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2684
		IDelta child = allLeavesDeltas[0];
2684
		IDelta child = allLeavesDeltas[0];
2685
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2685
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2686
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2686
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2687
		assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getRestrictions()));
2687
		assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getCurrentRestrictions()));
2688
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2688
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2689
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2689
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2690
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2690
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 2707-2714 Link Here
2707
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2707
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
2708
		IDelta child = allLeavesDeltas[0];
2708
		IDelta child = allLeavesDeltas[0];
2709
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2709
		assertEquals("Wrong kind", IDelta.REMOVED, child.getKind());
2710
		assertFalse("Is extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2710
		assertFalse("Is extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2711
		assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getRestrictions()));
2711
		assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getCurrentRestrictions()));
2712
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2712
		assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags());
2713
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2713
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
2714
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2714
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 3024-3030 Link Here
3024
		IDelta child = allLeavesDeltas[0];
3024
		IDelta child = allLeavesDeltas[0];
3025
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3025
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3026
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3026
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3027
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
3027
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
3028
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
3028
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
3029
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3029
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3030
	}
3030
	}
Lines 3308-3314 Link Here
3308
		IDelta child = allLeavesDeltas[0];
3308
		IDelta child = allLeavesDeltas[0];
3309
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3309
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3310
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3310
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3311
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
3311
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
3312
		assertEquals("Wrong element type", IDelta.ANNOTATION_ELEMENT_TYPE, child.getElementType());
3312
		assertEquals("Wrong element type", IDelta.ANNOTATION_ELEMENT_TYPE, child.getElementType());
3313
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3313
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3314
	}
3314
	}
Lines 3330-3336 Link Here
3330
		IDelta child = allLeavesDeltas[0];
3330
		IDelta child = allLeavesDeltas[0];
3331
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3331
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3332
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3332
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3333
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
3333
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
3334
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
3334
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
3335
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3335
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3336
	}
3336
	}
Lines 3352-3358 Link Here
3352
		IDelta child = allLeavesDeltas[0];
3352
		IDelta child = allLeavesDeltas[0];
3353
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3353
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
3354
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3354
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
3355
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
3355
		assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
3356
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
3356
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
3357
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3357
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
3358
	}
3358
	}
(-)src/org/eclipse/pde/api/tools/comparator/tests/FieldDeltaTests.java (-16 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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 541-547 Link Here
541
		IDelta child = allLeavesDeltas[0];
541
		IDelta child = allLeavesDeltas[0];
542
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
542
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
543
		assertTrue("Is visible", Util.isVisible(child.getNewModifiers()));
543
		assertTrue("Is visible", Util.isVisible(child.getNewModifiers()));
544
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
544
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
545
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
545
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
546
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
546
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
547
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
547
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 724-730 Link Here
724
		IDelta child = allLeavesDeltas[0];
724
		IDelta child = allLeavesDeltas[0];
725
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
725
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
726
		assertTrue("Is visible", Util.isVisible(child.getNewModifiers()));
726
		assertTrue("Is visible", Util.isVisible(child.getNewModifiers()));
727
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
727
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
728
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
728
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
729
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
729
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
730
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
730
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 930-936 Link Here
930
		IDelta child = allLeavesDeltas[0];
930
		IDelta child = allLeavesDeltas[0];
931
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
931
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
932
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
932
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
933
		assertTrue("Wrong restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
933
		assertTrue("Wrong restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
934
		assertTrue("Wrong modifier", Flags.isProtected(child.getNewModifiers()));
934
		assertTrue("Wrong modifier", Flags.isProtected(child.getNewModifiers()));
935
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
935
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
936
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
936
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1324-1330 Link Here
1324
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1324
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1325
		assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags());
1325
		assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags());
1326
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1326
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1327
		assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1327
		assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1328
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1328
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1329
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1329
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1330
	}
1330
	}
Lines 1391-1404 Link Here
1391
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1391
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1392
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
1392
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
1393
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1393
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1394
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1394
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1395
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1395
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1396
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1396
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1397
		child = allLeavesDeltas[1];
1397
		child = allLeavesDeltas[1];
1398
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1398
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1399
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
1399
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
1400
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1400
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1401
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1401
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1402
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1402
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1403
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1403
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1404
	}
1404
	}
Lines 1421-1427 Link Here
1421
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1421
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1422
		assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags());
1422
		assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags());
1423
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1423
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1424
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1424
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1425
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1425
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1426
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1426
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1427
	}
1427
	}
Lines 1444-1450 Link Here
1444
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1444
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1445
		assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags());
1445
		assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags());
1446
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1446
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1447
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1447
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1448
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1448
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1449
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1449
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1450
	}
1450
	}
Lines 1467-1480 Link Here
1467
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1467
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1468
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
1468
		assertEquals("Wrong flag", IDelta.VALUE, child.getFlags());
1469
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1469
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1470
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1470
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1471
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1471
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1472
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1472
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1473
		child = allLeavesDeltas[1];
1473
		child = allLeavesDeltas[1];
1474
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1474
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1475
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
1475
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
1476
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1476
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1477
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1477
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1478
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1478
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1479
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1479
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1480
	}
1480
	}
Lines 1497-1503 Link Here
1497
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1497
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1498
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1498
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1499
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1499
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1500
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1500
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1501
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1501
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1502
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1502
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1503
	}
1503
	}
Lines 1520-1526 Link Here
1520
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1520
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1521
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1521
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1522
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1522
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1523
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1523
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1524
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1524
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1525
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1525
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1526
	}
1526
	}
Lines 1543-1549 Link Here
1543
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1543
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1544
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1544
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1545
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1545
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1546
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1546
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1547
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1547
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1548
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1548
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1549
	}
1549
	}
Lines 1566-1572 Link Here
1566
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1566
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1567
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1567
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1568
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1568
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1569
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1569
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1570
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1570
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1571
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1571
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1572
	}
1572
	}
Lines 1589-1595 Link Here
1589
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1589
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1590
		assertEquals("Wrong flag", IDelta.TYPE, child.getFlags());
1590
		assertEquals("Wrong flag", IDelta.TYPE, child.getFlags());
1591
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1591
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1592
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1592
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1593
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1593
		assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());
1594
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1594
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1595
	}
1595
	}
(-)src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java (-16 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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 363-369 Link Here
363
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
363
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
364
		IDelta child = allLeavesDeltas[0];
364
		IDelta child = allLeavesDeltas[0];
365
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
365
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
366
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
366
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
367
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
367
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
368
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
368
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
369
		assertTrue("Should be compatible", DeltaProcessor.isCompatible(child));
369
		assertTrue("Should be compatible", DeltaProcessor.isCompatible(child));
Lines 386-392 Link Here
386
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
386
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
387
		IDelta child = allLeavesDeltas[0];
387
		IDelta child = allLeavesDeltas[0];
388
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
388
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
389
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
389
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
390
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
390
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
391
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
391
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
392
		assertTrue("Should not be compatible", !DeltaProcessor.isCompatible(child));
392
		assertTrue("Should not be compatible", !DeltaProcessor.isCompatible(child));
Lines 409-415 Link Here
409
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
409
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
410
		IDelta child = allLeavesDeltas[0];
410
		IDelta child = allLeavesDeltas[0];
411
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
411
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
412
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
412
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
413
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
413
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
414
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
414
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
415
		assertTrue("Should be compatible", DeltaProcessor.isCompatible(child));
415
		assertTrue("Should be compatible", DeltaProcessor.isCompatible(child));
Lines 432-438 Link Here
432
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
432
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
433
		IDelta child = allLeavesDeltas[0];
433
		IDelta child = allLeavesDeltas[0];
434
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
434
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
435
		assertTrue("Implement restrictions", !RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
435
		assertTrue("Implement restrictions", !RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
436
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
436
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
437
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
437
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
438
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
438
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 455-461 Link Here
455
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
455
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
456
		IDelta child = allLeavesDeltas[0];
456
		IDelta child = allLeavesDeltas[0];
457
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
457
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
458
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
458
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
459
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
459
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
460
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
460
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
461
		assertTrue("Method Add not compatible", DeltaProcessor.isCompatible(child));
461
		assertTrue("Method Add not compatible", DeltaProcessor.isCompatible(child));
Lines 483-489 Link Here
483
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
483
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
484
		IDelta child = allLeavesDeltas[0];
484
		IDelta child = allLeavesDeltas[0];
485
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
485
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
486
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
486
		assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
487
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
487
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
488
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
488
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
489
		assertTrue("Method Add not compatible", !DeltaProcessor.isCompatible(child));
489
		assertTrue("Method Add not compatible", !DeltaProcessor.isCompatible(child));
Lines 511-517 Link Here
511
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
511
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
512
		IDelta child = allLeavesDeltas[0];
512
		IDelta child = allLeavesDeltas[0];
513
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
513
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
514
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
514
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
515
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
515
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
516
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
516
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
517
		assertTrue("Method Add compatible", DeltaProcessor.isCompatible(child));
517
		assertTrue("Method Add compatible", DeltaProcessor.isCompatible(child));
Lines 539-545 Link Here
539
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
539
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
540
		IDelta child = allLeavesDeltas[0];
540
		IDelta child = allLeavesDeltas[0];
541
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
541
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
542
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
542
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
543
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
543
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
544
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
544
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
545
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
545
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 567-573 Link Here
567
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
567
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
568
		IDelta child = allLeavesDeltas[0];
568
		IDelta child = allLeavesDeltas[0];
569
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
569
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
570
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
570
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
571
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
571
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
572
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
572
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
573
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
573
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 590-596 Link Here
590
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
590
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
591
		IDelta child = allLeavesDeltas[0];
591
		IDelta child = allLeavesDeltas[0];
592
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
592
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
593
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
593
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
594
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
594
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
595
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
595
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
596
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
596
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
Lines 613-625 Link Here
613
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
613
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
614
		IDelta child = allLeavesDeltas[0];
614
		IDelta child = allLeavesDeltas[0];
615
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
615
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
616
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
616
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
617
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
617
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
618
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
618
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
619
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
619
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
620
		child = allLeavesDeltas[1];
620
		child = allLeavesDeltas[1];
621
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
621
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
622
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
622
		assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
623
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
623
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
624
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
624
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
625
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
625
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 664-676 Link Here
664
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
664
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
665
		IDelta child = allLeavesDeltas[0];
665
		IDelta child = allLeavesDeltas[0];
666
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
666
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
667
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
667
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
668
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
668
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
669
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
669
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
670
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
670
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
671
		child = allLeavesDeltas[1];
671
		child = allLeavesDeltas[1];
672
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
672
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
673
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
673
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
674
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
674
		assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags());
675
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
675
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
676
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
676
		assertTrue("Is compatible", DeltaProcessor.isCompatible(child));
Lines 693-699 Link Here
693
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
693
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
694
		IDelta child = allLeavesDeltas[0];
694
		IDelta child = allLeavesDeltas[0];
695
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
695
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
696
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions()));
696
		assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions()));
697
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
697
		assertEquals("Wrong flag", IDelta.FIELD, child.getFlags());
698
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
698
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
699
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
699
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
(-)src/org/eclipse/pde/api/tools/comparator/tests/MethodDeltaTests.java (-23 / +23 lines)
Lines 94-100 Link Here
94
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
94
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
95
		IDelta child = allLeavesDeltas[0];
95
		IDelta child = allLeavesDeltas[0];
96
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
96
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
97
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
97
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
98
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
98
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
99
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
99
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
100
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
100
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 122-128 Link Here
122
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
122
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
123
		IDelta child = allLeavesDeltas[0];
123
		IDelta child = allLeavesDeltas[0];
124
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
124
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
125
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
125
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
126
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
126
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
127
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
127
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
128
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
128
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 150-156 Link Here
150
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
150
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
151
		IDelta child = allLeavesDeltas[0];
151
		IDelta child = allLeavesDeltas[0];
152
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
152
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
153
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
153
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
154
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
154
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
155
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
155
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
156
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
156
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 178-184 Link Here
178
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
178
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
179
		IDelta child = allLeavesDeltas[0];
179
		IDelta child = allLeavesDeltas[0];
180
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
180
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
181
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
181
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
182
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
182
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
183
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
183
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
184
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
184
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 206-212 Link Here
206
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
206
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
207
		IDelta child = allLeavesDeltas[0];
207
		IDelta child = allLeavesDeltas[0];
208
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
208
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
209
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
209
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
210
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
210
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
211
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
211
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
212
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
212
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 583-589 Link Here
583
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
583
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
584
		IDelta child = allLeavesDeltas[0];
584
		IDelta child = allLeavesDeltas[0];
585
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
585
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
586
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
586
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
587
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
587
		assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags());
588
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
588
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
589
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
589
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
Lines 1208-1214 Link Here
1208
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1208
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1209
		IDelta child = allLeavesDeltas[0];
1209
		IDelta child = allLeavesDeltas[0];
1210
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1210
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1211
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1211
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1212
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1212
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1213
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1213
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1214
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1214
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1232-1238 Link Here
1232
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1232
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1233
		IDelta child = allLeavesDeltas[0];
1233
		IDelta child = allLeavesDeltas[0];
1234
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1234
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1235
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1235
		assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1236
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1236
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1237
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1237
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1238
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1238
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1256-1262 Link Here
1256
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1256
		assertEquals("Wrong size", 1, allLeavesDeltas.length);
1257
		IDelta child = allLeavesDeltas[0];
1257
		IDelta child = allLeavesDeltas[0];
1258
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1258
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
1259
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1259
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1260
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1260
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1261
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1261
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1262
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1262
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 1857-1863 Link Here
1857
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1857
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1858
		assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags());
1858
		assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags());
1859
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1859
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1860
		assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1860
		assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1861
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
1861
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
1862
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1862
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1863
	}
1863
	}
Lines 1881-1887 Link Here
1881
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1881
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
1882
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1882
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
1883
		assertTrue("Not protected", Flags.isProtected(child.getNewModifiers()));
1883
		assertTrue("Not protected", Flags.isProtected(child.getNewModifiers()));
1884
		assertTrue("Not @extend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
1884
		assertTrue("Not @extend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
1885
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1885
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
1886
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1886
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1887
	}
1887
	}
Lines 1948-1954 Link Here
1948
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1948
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1949
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1949
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1950
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1950
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1951
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1951
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1952
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1952
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1953
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1953
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1954
	}
1954
	}
Lines 1971-1977 Link Here
1971
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1971
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1972
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1972
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1973
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1973
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1974
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1974
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1975
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1975
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1976
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1976
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1977
	}
1977
	}
Lines 1994-2000 Link Here
1994
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1994
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
1995
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1995
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
1996
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1996
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
1997
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
1997
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
1998
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1998
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
1999
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
1999
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2000
	}
2000
	}
Lines 2017-2023 Link Here
2017
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2017
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2018
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2018
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2019
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2019
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2020
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2020
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2021
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
2021
		assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType());
2022
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2022
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2023
	}
2023
	}
Lines 2040-2046 Link Here
2040
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2040
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2041
		assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags());
2041
		assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags());
2042
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2042
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2043
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2043
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2044
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2044
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2045
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2045
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2046
	}
2046
	}
Lines 2063-2069 Link Here
2063
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2063
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2064
		assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags());
2064
		assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags());
2065
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2065
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2066
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2066
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2067
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2067
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2068
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2068
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2069
	}
2069
	}
Lines 2086-2092 Link Here
2086
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2086
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2087
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2087
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2088
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2088
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2089
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2089
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2090
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2090
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2091
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2091
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2092
	}
2092
	}
Lines 2109-2115 Link Here
2109
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2109
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2110
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2110
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2111
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2111
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2112
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2112
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2113
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2113
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2114
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2114
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2115
	}
2115
	}
Lines 2132-2138 Link Here
2132
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2132
		assertEquals("Wrong kind", IDelta.CHANGED, child.getKind());
2133
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2133
		assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags());
2134
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2134
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2135
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions()));
2135
		assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions()));
2136
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2136
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2137
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2137
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2138
	}
2138
	}
Lines 2265-2271 Link Here
2265
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2265
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2266
		assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags());
2266
		assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags());
2267
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2267
		assertTrue("Not visible", Util.isVisible(child.getNewModifiers()));
2268
		assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getRestrictions()));
2268
		assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getCurrentRestrictions()));
2269
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2269
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2270
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2270
		assertFalse("Is compatible", DeltaProcessor.isCompatible(child));
2271
	}
2271
	}
Lines 2348-2354 Link Here
2348
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2348
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
2349
		assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags());
2349
		assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags());
2350
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2350
		assertFalse("Is visible", Util.isVisible(child.getNewModifiers()));
2351
		assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getRestrictions()));
2351
		assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getCurrentRestrictions()));
2352
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2352
		assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType());
2353
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2353
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2354
	}
2354
	}
Lines 2828-2833 Link Here
2828
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
2828
		assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType());
2829
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2829
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2830
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2830
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
2831
		assertTrue("Not noextend", RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
2831
		assertTrue("Not noextend", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
2832
	}
2832
	}
2833
}
2833
}
(-)src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java (-4 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 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
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
58
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
59
		IDelta child = allLeavesDeltas[0];
59
		IDelta child = allLeavesDeltas[0];
60
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
60
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
61
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
61
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
62
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
62
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
63
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
63
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
64
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
64
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 85-91 Link Here
85
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
85
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
86
		IDelta child = allLeavesDeltas[0];
86
		IDelta child = allLeavesDeltas[0];
87
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
87
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
88
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
88
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
89
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
89
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
90
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
90
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
91
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
91
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
Lines 112-118 Link Here
112
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
112
		assertEquals("Wrong size", 2, allLeavesDeltas.length);
113
		IDelta child = allLeavesDeltas[0];
113
		IDelta child = allLeavesDeltas[0];
114
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
114
		assertEquals("Wrong kind", IDelta.ADDED, child.getKind());
115
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions()));
115
		assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions()));
116
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
116
		assertEquals("Wrong flag", IDelta.METHOD, child.getFlags());
117
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
117
		assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType());
118
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
118
		assertTrue("Not compatible", DeltaProcessor.isCompatible(child));
(-)test-builder/baseline/bundle.a/src/a/classes/methods/AddNooverrideRemoveNoextend.java (+20 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package a.classes.methods;
12
13
/**
14
 * @noextend This class is not intended to be subclassed by clients.
15
 */
16
public class AddNooverrideRemoveNoextend {
17
	
18
	public void methodOne() {
19
	}
20
}
(-)test-builder/compat/class/methods/AddNooverrideRemoveNoextend.java (+20 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package a.classes.methods;
12
13
public class AddNooverrideRemoveNoextend {
14
	
15
	/**
16
	 * @nooverride This method is not intended to be re-implemented or extended by clients.
17
	 */
18
	public void methodOne() {
19
	}
20
}
(-)src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
2
 * Copyright (c) 2008, 2010 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-61 Link Here
55
	public static String PropertyKindKey;
55
	public static String PropertyKindKey;
56
	public static String PropertyNewModifiersKey;
56
	public static String PropertyNewModifiersKey;
57
	public static String PropertyOldModifiersKey;
57
	public static String PropertyOldModifiersKey;
58
	public static String PropertyRestrictionsKey;
58
	public static String PropertyCurrentRestrictionsKey;
59
	public static String PropertyPreviousRestrictionsKey;
59
	public static String PropertyTypeNameKey;
60
	public static String PropertyTypeNameKey;
60
61
61
	public static String MessageCategory;
62
	public static String MessageCategory;
(-)src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java (-10 / +23 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009 IBM Corporation and others.
2
 * Copyright (c) 2009, 2010 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-61 Link Here
55
		private static final Object ID_KIND = "IDelta.Kind"; //$NON-NLS-1$
55
		private static final Object ID_KIND = "IDelta.Kind"; //$NON-NLS-1$
56
		private static final Object ID_NEW_MODIFIERS = "IDelta.NewModifiers"; //$NON-NLS-1$
56
		private static final Object ID_NEW_MODIFIERS = "IDelta.NewModifiers"; //$NON-NLS-1$
57
		private static final Object ID_OLD_MODIFIERS = "IDelta.OldModifiers"; //$NON-NLS-1$
57
		private static final Object ID_OLD_MODIFIERS = "IDelta.OldModifiers"; //$NON-NLS-1$
58
		private static final Object ID_RESTRICTIONS = "IDelta.Restrictions"; //$NON-NLS-1$
58
		private static final Object ID_CURRENT_RESTRICTIONS = "IDelta.CurrentRestrictions"; //$NON-NLS-1$
59
		private static final Object ID_PREVIOUS_RESTRICTIONS = "IDelta.PreviousRestrictions"; //$NON-NLS-1$
59
		private static final Object ID_TYPENAME = "IDelta.TypeName"; //$NON-NLS-1$
60
		private static final Object ID_TYPENAME = "IDelta.TypeName"; //$NON-NLS-1$
60
61
61
		// categories
62
		// categories
Lines 70-76 Link Here
70
		public static final String P_KIND = ActionMessages.PropertyKindKey;
71
		public static final String P_KIND = ActionMessages.PropertyKindKey;
71
		public static final String P_NEW_MODIFIERS = ActionMessages.PropertyNewModifiersKey;
72
		public static final String P_NEW_MODIFIERS = ActionMessages.PropertyNewModifiersKey;
72
		public static final String P_OLD_MODIFIERS = ActionMessages.PropertyOldModifiersKey;
73
		public static final String P_OLD_MODIFIERS = ActionMessages.PropertyOldModifiersKey;
73
		public static final String P_RESTRICTIONS = ActionMessages.PropertyRestrictionsKey;
74
		public static final String P_CURRENT_RESTRICTIONS = ActionMessages.PropertyCurrentRestrictionsKey;
75
		public static final String P_PREVIOUS_RESTRICTIONS = ActionMessages.PropertyPreviousRestrictionsKey;
74
		public static final String P_TYPENAME = ActionMessages.PropertyTypeNameKey;
76
		public static final String P_TYPENAME = ActionMessages.PropertyTypeNameKey;
75
77
76
		private static List Descriptors;
78
		private static List Descriptors;
Lines 102-108 Link Here
102
			propertyDescriptor.setCategory(P_INFO_CATEGORY);
104
			propertyDescriptor.setCategory(P_INFO_CATEGORY);
103
			Descriptors.add(propertyDescriptor);
105
			Descriptors.add(propertyDescriptor);
104
106
105
			propertyDescriptor = new PropertyDescriptor(ID_RESTRICTIONS, P_RESTRICTIONS);
107
			propertyDescriptor = new PropertyDescriptor(ID_CURRENT_RESTRICTIONS, P_CURRENT_RESTRICTIONS);
108
			propertyDescriptor.setCategory(P_INFO_CATEGORY);
109
			Descriptors.add(propertyDescriptor);
110
111
			propertyDescriptor = new PropertyDescriptor(ID_PREVIOUS_RESTRICTIONS, P_PREVIOUS_RESTRICTIONS);
106
			propertyDescriptor.setCategory(P_INFO_CATEGORY);
112
			propertyDescriptor.setCategory(P_INFO_CATEGORY);
107
			Descriptors.add(propertyDescriptor);
113
			Descriptors.add(propertyDescriptor);
108
114
Lines 210-227 Link Here
210
			}
216
			}
211
			if (ID_OLD_MODIFIERS.equals(propKey)) {
217
			if (ID_OLD_MODIFIERS.equals(propKey)) {
212
				return getDisplayedModifiers(delta.getOldModifiers());
218
				return getDisplayedModifiers(delta.getOldModifiers());
213
				}
219
			}
214
			if (ID_RESTRICTIONS.equals(propKey)) {
220
			if (ID_CURRENT_RESTRICTIONS.equals(propKey)) {
215
				int restrictions = delta.getRestrictions();
221
				int restrictions = delta.getCurrentRestrictions();
216
				StringBuffer buffer = new StringBuffer(RestrictionModifiers.getRestrictionText(restrictions));
222
				return getDisplayRestrictions(restrictions);
217
				buffer.append(" (0x").append(Integer.toHexString(restrictions)).append(')'); //$NON-NLS-1$
223
			}
218
				return String.valueOf(buffer);
224
			if (ID_PREVIOUS_RESTRICTIONS.equals(propKey)) {
225
				int restrictions = delta.getPreviousRestrictions();
226
				return getDisplayRestrictions(restrictions);
219
			}
227
			}
220
			if (ID_TYPENAME.equals(propKey)) {
228
			if (ID_TYPENAME.equals(propKey)) {
221
				return delta.getTypeName();
229
				return delta.getTypeName();
222
			}
230
			}
223
			return null;
231
			return null;
224
		}
232
		}
233
		private Object getDisplayRestrictions(int restrictions) {
234
			StringBuffer buffer = new StringBuffer(RestrictionModifiers.getRestrictionText(restrictions));
235
			buffer.append(" (0x").append(Integer.toHexString(restrictions)).append(')'); //$NON-NLS-1$
236
			return String.valueOf(buffer);
237
		}
225
		public boolean isPropertySet(Object id) {
238
		public boolean isPropertySet(Object id) {
226
			return false;
239
			return false;
227
		}
240
		}
(-)src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties (-2 / +3 lines)
Lines 1-5 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2008, 2009 IBM Corporation and others.
2
# Copyright (c) 2008, 2010 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 47-53 Link Here
47
PropertyKindKey=kind
47
PropertyKindKey=kind
48
PropertyNewModifiersKey=new modifiers
48
PropertyNewModifiersKey=new modifiers
49
PropertyOldModifiersKey=old modifiers
49
PropertyOldModifiersKey=old modifiers
50
PropertyRestrictionsKey=restrictions
50
PropertyCurrentRestrictionsKey=current restrictions
51
PropertyPreviousRestrictionsKey=previous restrictions
51
PropertyTypeNameKey=type name
52
PropertyTypeNameKey=type name
52
53
53
MessageCategory=Message
54
MessageCategory=Message

Return to bug 324076