Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 178540 Details for
Bug 324076
Removing @noextend and adding @nooverride results API tool problem being reported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix + regression test
patch_324076.txt (text/plain), 95.43 KB, created by
Olivier Thomann
on 2010-09-09 13:48:12 EDT
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-09-09 13:48:12 EDT
Size:
95.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.api.tools >Index: src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java,v >retrieving revision 1.119 >diff -u -r1.119 BaseApiAnalyzer.java >--- src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java 23 Apr 2010 20:21:20 -0000 1.119 >+++ src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java 9 Sep 2010 17:47:50 -0000 >@@ -1065,6 +1065,7 @@ > IDelta.REMOVED, > IDelta.TYPE, > restrictions, >+ RestrictionModifiers.NO_RESTRICTIONS, > type.getModifiers(), > 0, > typeName, >@@ -1500,7 +1501,7 @@ > int kind = delta.getKind(); > int modifiers = delta.getNewModifiers(); > if (DeltaProcessor.isCompatible(delta)) { >- if (!RestrictionModifiers.isReferenceRestriction(delta.getRestrictions())) { >+ if (!RestrictionModifiers.isReferenceRestriction(delta.getCurrentRestrictions())) { > if (Util.isVisible(modifiers)) { > if (Flags.isProtected(modifiers)) { > String typeName = delta.getTypeName(); >Index: src/org/eclipse/pde/api/tools/internal/builder/BuildState.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java,v >retrieving revision 1.16 >diff -u -r1.16 BuildState.java >--- src/org/eclipse/pde/api/tools/internal/builder/BuildState.java 2 Feb 2010 21:55:54 -0000 1.16 >+++ src/org/eclipse/pde/api/tools/internal/builder/BuildState.java 9 Sep 2010 17:47:50 -0000 >@@ -189,7 +189,9 @@ > } > int oldModifiers = modifiers & Delta.MODIFIERS_MASK; > int newModifiers = modifiers >>> Delta.NEW_MODIFIERS_OFFSET; >- return new Delta(componentID, elementType, kind, flags, restrictions, oldModifiers, newModifiers, typeName, key, datas); >+ int previousRestrictions = restrictions >>> Delta.PREVIOUS_RESTRICTIONS_OFFSET; >+ int currentRestrictions = restrictions & Delta.RESTRICTIONS_MASK; >+ return new Delta(componentID, elementType, kind, flags, currentRestrictions, previousRestrictions, oldModifiers, newModifiers, typeName, key, datas); > } > > /** >@@ -210,7 +212,7 @@ > out.writeInt(delta.getElementType()); > out.writeInt(delta.getKind()); > out.writeInt(delta.getFlags()); >- out.writeInt(delta.getRestrictions()); >+ out.writeInt(delta.getCurrentRestrictions()); > int modifiers = (delta.getNewModifiers() << Delta.NEW_MODIFIERS_OFFSET) | delta.getOldModifiers(); > out.writeInt(modifiers); > out.writeUTF(delta.getTypeName()); >Index: src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java,v >retrieving revision 1.93 >diff -u -r1.93 ClassFileComparator.java >--- src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java 26 May 2010 21:01:26 -0000 1.93 >+++ src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java 9 Sep 2010 17:47:50 -0000 >@@ -173,7 +173,10 @@ > this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, oldModifiers, newModifiers, type.getName(), key, data)); > } > private void addDelta(int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, IApiType type, String key, String[] datas) { >- this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, oldModifiers, newModifiers, type.getName(), key, datas)); >+ this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, restrictions, 0, oldModifiers, newModifiers, type.getName(), key, datas)); >+ } >+ private void addDelta(int elementType, int kind, int flags, int currentRestrictions, int previousRestrictions, int oldModifiers, int newModifiers, IApiType type, String key, String[] datas) { >+ this.addDelta(new Delta(Util.getDeltaComponentVersionsId(this.component2), elementType, kind, flags, currentRestrictions, previousRestrictions, oldModifiers, newModifiers, type.getName(), key, datas)); > } > /** > * Checks if the super-class set has been change in any way compared to the baseline (grown or reduced or types changed) >@@ -542,6 +545,7 @@ > IDelta.CHANGED, > IDelta.DECREASE_ACCESS, > restrictions | this.currentDescriptorRestrictions, >+ 0, > typeMember.getModifiers(), > typeMember2.getModifiers(), > typeMember.getName(), >@@ -558,6 +562,7 @@ > IDelta.CHANGED, > IDelta.TYPE_VISIBILITY, > restrictions | this.currentDescriptorRestrictions, >+ 0, > typeMember.getModifiers(), > typeMember2.getModifiers(), > typeMember.getName(), >@@ -2369,12 +2374,13 @@ > if (restrictions != referenceRestrictions) { > if (!Flags.isFinal(access2)) { > if (RestrictionModifiers.isOverrideRestriction(restrictions) >- && !RestrictionModifiers.isOverrideRestriction(referenceRestrictions)) { >+ && !RestrictionModifiers.isOverrideRestriction(referenceRestrictions)) { > this.addDelta( > getElementType(method), > IDelta.ADDED, > IDelta.RESTRICTIONS, > restrictions, >+ referenceRestrictions, > access, > access2, > this.type1, >Index: src/org/eclipse/pde/api/tools/internal/comparator/Delta.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Delta.java,v >retrieving revision 1.18 >diff -u -r1.18 Delta.java >--- src/org/eclipse/pde/api/tools/internal/comparator/Delta.java 22 Jul 2010 19:31:37 -0000 1.18 >+++ src/org/eclipse/pde/api/tools/internal/comparator/Delta.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -28,6 +28,9 @@ > public static final int MODIFIERS_MASK = 0xFFFF; > public static final int NEW_MODIFIERS_OFFSET = 16; > >+ public static final int RESTRICTIONS_MASK = 0xFFFF; >+ public static final int PREVIOUS_RESTRICTIONS_OFFSET = 16; >+ > /** > * Writes the delta to the given {@link PrintWriter} > * @param delta >@@ -105,17 +108,17 @@ > * @param data > */ > public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, String typeName, String key, String data) { >- this(componentID, elementType, kind, flags, restrictions, oldModifiers, newModifiers, typeName, key, new String[] {data}); >+ this(componentID, elementType, kind, flags, restrictions, 0, oldModifiers, newModifiers, typeName, key, new String[] {data}); > } > >- public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int oldModifiers, int newModifiers, String typeName, String key, String[] datas) { >+ public Delta(String componentID, int elementType, int kind, int flags, int restrictions, int previousRestrictions, int oldModifiers, int newModifiers, String typeName, String key, String[] datas) { > this.componentID = componentID; > this.elementType = elementType; > this.kind = kind; > this.flags = flags; >- this.modifiers = (newModifiers & MODIFIERS_MASK) << 16 | (oldModifiers & MODIFIERS_MASK); >+ this.modifiers = (newModifiers & MODIFIERS_MASK) << NEW_MODIFIERS_OFFSET | (oldModifiers & MODIFIERS_MASK); > this.typeName = typeName == null ? Util.EMPTY_STRING : typeName; >- this.restrictions = restrictions; >+ this.restrictions = (previousRestrictions & RESTRICTIONS_MASK) << PREVIOUS_RESTRICTIONS_OFFSET | (restrictions & RESTRICTIONS_MASK); > this.key = key; > this.datas = datas; > } >@@ -304,12 +307,17 @@ > return this.modifiers & MODIFIERS_MASK; > } > /* (non-Javadoc) >- * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getRestrictions() >+ * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getCurrentRestrictions() > */ >- public int getRestrictions() { >- return this.restrictions; >+ public int getCurrentRestrictions() { >+ return (this.restrictions & RESTRICTIONS_MASK); >+ } >+ /* (non-Javadoc) >+ * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getPreviousRestrictions() >+ */ >+ public int getPreviousRestrictions() { >+ return (this.restrictions >>> PREVIOUS_RESTRICTIONS_OFFSET); > } >- > /* (non-Javadoc) > * @see org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta#getTypeName() > */ >Index: src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java,v >retrieving revision 1.14 >diff -u -r1.14 DeltaXmlVisitor.java >--- src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java 9 Mar 2009 19:41:34 -0000 1.14 >+++ src/org/eclipse/pde/api/tools/internal/comparator/DeltaXmlVisitor.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -73,7 +73,7 @@ > deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPATIBLE, Boolean.toString(DeltaProcessor.isCompatible(delta))); > deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_OLD_MODIFIERS, Integer.toString(delta.getOldModifiers())); > deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS, Integer.toString(delta.getNewModifiers())); >- deltaElement.setAttribute(IApiXmlConstants.ATTR_RESTRICTIONS, Integer.toString(delta.getRestrictions())); >+ deltaElement.setAttribute(IApiXmlConstants.ATTR_RESTRICTIONS, Integer.toString(delta.getCurrentRestrictions())); > String apiComponentID = delta.getComponentVersionId(); > if (apiComponentID != null) { > deltaElement.setAttribute(IApiXmlConstants.ATTR_NAME_COMPONENT_ID, apiComponentID); >Index: src/org/eclipse/pde/api/tools/internal/comparator/Messages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java,v >retrieving revision 1.29 >diff -u -r1.29 Messages.java >--- src/org/eclipse/pde/api/tools/internal/comparator/Messages.java 3 Dec 2009 15:29:15 -0000 1.29 >+++ src/org/eclipse/pde/api/tools/internal/comparator/Messages.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008, 2009 IBM Corporation and others. >+ * Copyright (c) 2008, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -418,10 +418,10 @@ > case IDelta.SYNCHRONIZED_TO_NON_SYNCHRONIZED : > return 74; > case IDelta.NON_FINAL_TO_FINAL : >- if (RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) { >+ if (RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions())) { > return 81; > } >- if (RestrictionModifiers.isOverrideRestriction(delta.getRestrictions())) { >+ if (RestrictionModifiers.isOverrideRestriction(delta.getCurrentRestrictions())) { > return 82; > } > return 83; >Index: src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java,v >retrieving revision 1.6 >diff -u -r1.6 BundleComponent.java >--- src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java 13 Apr 2010 15:53:12 -0000 1.6 >+++ src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java 9 Sep 2010 17:47:50 -0000 >@@ -327,7 +327,7 @@ > version = ver != null ? new Version(ver) : null; > } > catch (NumberFormatException nfe) { >- version = null; >+ // ignore > } > ManifestElement[] name = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, (String)manifest.get(Constants.BUNDLE_SYMBOLICNAME)); > if(name.length < 1) { >Index: src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java,v >retrieving revision 1.56 >diff -u -r1.56 ApiComparator.java >--- src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java 26 May 2010 21:01:26 -0000 1.56 >+++ src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java 9 Sep 2010 17:47:50 -0000 >@@ -84,6 +84,7 @@ > IDelta.CHANGED, > IDelta.MAJOR_VERSION, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > 0, > null, >@@ -101,6 +102,7 @@ > IDelta.CHANGED, > IDelta.MINOR_VERSION, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > 0, > null, >@@ -348,6 +350,7 @@ > IDelta.REMOVED, > IDelta.EXECUTION_ENVIRONMENT, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > 0, > null, >@@ -365,6 +368,7 @@ > IDelta.ADDED, > IDelta.EXECUTION_ENVIRONMENT, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > 0, > null, >@@ -481,6 +485,7 @@ > IDelta.ADDED, > reexporter == null ? IDelta.TYPE : IDelta.REEXPORTED_TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > typeDescriptor2.getModifiers(), > typeName, >@@ -503,6 +508,7 @@ > IDelta.REMOVED, > IDelta.API_TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -517,6 +523,7 @@ > IDelta.ADDED, > IDelta.TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -537,6 +544,7 @@ > IDelta.REMOVED, > IDelta.API_TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -837,6 +845,7 @@ > IDelta.REMOVED, > IDelta.TYPE, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > 0, > typeName, >@@ -869,6 +878,7 @@ > IDelta.REMOVED, > reexported ? IDelta.REEXPORTED_API_TYPE : IDelta.API_TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -886,6 +896,7 @@ > IDelta.CHANGED, > IDelta.TYPE_VISIBILITY, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -1000,6 +1011,7 @@ > IDelta.REMOVED, > IDelta.REEXPORTED_TYPE, > RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > 0, > typeName, >@@ -1027,6 +1039,7 @@ > IDelta.REMOVED, > IDelta.REEXPORTED_API_TYPE, > elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > typeDescriptor.getModifiers(), > typeDescriptor2.getModifiers(), > typeName, >@@ -1082,6 +1095,7 @@ > IDelta.ADDED, > IDelta.TYPE, > elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > type.getModifiers(), > typeName, >@@ -1144,6 +1158,7 @@ > IDelta.ADDED, > IDelta.REEXPORTED_TYPE, > elementDescription != null ? elementDescription.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS, >+ RestrictionModifiers.NO_RESTRICTIONS, > 0, > typeDescriptor.getModifiers(), > typeName, >Index: src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java,v >retrieving revision 1.49 >diff -u -r1.49 DeltaProcessor.java >--- src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java 3 Dec 2009 15:29:15 -0000 1.49 >+++ src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -173,7 +173,7 @@ > * @return true if compatible, false otherwise > */ > private static boolean isMethodCompatible(IDelta delta) { >- int restrictions = delta.getRestrictions(); >+ int restrictions = delta.getCurrentRestrictions(); > if (RestrictionModifiers.isReferenceRestriction(restrictions)) { > return true; > } >@@ -189,7 +189,10 @@ > switch(delta.getFlags()) { > case IDelta.TYPE_PARAMETER : > case IDelta.RESTRICTIONS : >- return !Util.isVisible(delta.getNewModifiers()); >+ if (Util.isVisible(delta.getNewModifiers())) { >+ return RestrictionModifiers.isExtendRestriction(delta.getPreviousRestrictions()); >+ } >+ return true; > } > break; > case IDelta.CHANGED : >@@ -219,7 +222,7 @@ > * @return true if compatible, false otherwise > */ > private static boolean isFieldCompatible(IDelta delta) { >- int restrictions = delta.getRestrictions(); >+ int restrictions = delta.getCurrentRestrictions(); > if (RestrictionModifiers.isReferenceRestriction(restrictions)) { > return true; > } >@@ -230,7 +233,7 @@ > switch(delta.getFlags()) { > case IDelta.VALUE : > if (Flags.isProtected(oldModifiers)) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > if (Flags.isPublic(oldModifiers)) { > return false; >@@ -249,7 +252,7 @@ > switch(delta.getFlags()) { > case IDelta.TYPE : > if (Flags.isProtected(newModifiers)) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > return !Util.isVisible(newModifiers); > case IDelta.TYPE_ARGUMENT : >@@ -260,7 +263,7 @@ > case IDelta.VALUE : > case IDelta.FINAL_TO_NON_FINAL_STATIC_CONSTANT : > if (Flags.isProtected(newModifiers)) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > if (Flags.isPublic(newModifiers)) { > return false; >@@ -268,7 +271,7 @@ > // not visible > return true; > case IDelta.DECREASE_ACCESS : >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > break; > case IDelta.ADDED : >@@ -286,7 +289,7 @@ > * @return true if compatible, false otherwise > */ > private static boolean isConstructorCompatible(IDelta delta) { >- int restrictions = delta.getRestrictions(); >+ int restrictions = delta.getCurrentRestrictions(); > if (RestrictionModifiers.isReferenceRestriction(restrictions)) { > return true; > } >@@ -380,7 +383,7 @@ > if (Util.isVisible(newModifiers)) { > if (Flags.isAbstract(newModifiers)) { > // case where the implementation is provided and the class cannot be instantiated by the client >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > } > return true; >@@ -400,15 +403,15 @@ > return false; > } > if (Flags.isProtected(delta.getOldModifiers())) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > return true; > case IDelta.CONSTRUCTOR : > case IDelta.API_CONSTRUCTOR : > if (Util.isVisible(delta.getOldModifiers())) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()) >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()) > && (Flags.isProtected(delta.getOldModifiers()) || >- RestrictionModifiers.isInstantiateRestriction(delta.getRestrictions())); >+ RestrictionModifiers.isInstantiateRestriction(delta.getCurrentRestrictions())); > } > return true; > case IDelta.TYPE_PARAMETER : >@@ -420,7 +423,7 @@ > switch(delta.getFlags()) { > case IDelta.NON_ABSTRACT_TO_ABSTRACT : > if (Util.isVisible(delta.getNewModifiers())) { >- return RestrictionModifiers.isInstantiateRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isInstantiateRestriction(delta.getCurrentRestrictions()); > } > return true; > case IDelta.TYPE_CONVERSION : >@@ -430,11 +433,11 @@ > return !Util.isVisible(delta.getNewModifiers()); > case IDelta.NON_FINAL_TO_FINAL: > if (Util.isVisible(delta.getNewModifiers())) { >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > return true; > case IDelta.DECREASE_ACCESS : >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > break; > } >@@ -481,10 +484,10 @@ > case IDelta.ADDED : > switch(delta.getFlags()) { > case IDelta.FIELD : >- return RestrictionModifiers.isImplementRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isImplementRestriction(delta.getCurrentRestrictions()); > case IDelta.METHOD : > case IDelta.SUPER_INTERFACE_WITH_METHODS : >- return RestrictionModifiers.isImplementRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isImplementRestriction(delta.getCurrentRestrictions()); > case IDelta.TYPE_PARAMETER : > return false; > case IDelta.RESTRICTIONS : >@@ -508,7 +511,7 @@ > case IDelta.TYPE_CONVERSION : > return false; > case IDelta.DECREASE_ACCESS : >- return RestrictionModifiers.isExtendRestriction(delta.getRestrictions()); >+ return RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions()); > } > break; > } >Index: src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java,v >retrieving revision 1.30 >diff -u -r1.30 IDelta.java >--- src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java 22 Jul 2010 19:31:37 -0000 1.30 >+++ src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -942,11 +942,18 @@ > public String[] getArguments(); > > /** >- * Returns the delta's restrictions. >+ * Returns the delta's current restrictions. > * >- * @return the delta's restrictions >+ * @return the delta's current restrictions > */ >- public int getRestrictions(); >+ public int getCurrentRestrictions(); >+ >+ /** >+ * Returns the delta's previous restrictions. >+ * >+ * @return the delta's previous restrictions >+ */ >+ public int getPreviousRestrictions(); > > /** > * Returns the delta's new modifiers. This corresponds to the new modifiers of the affected element. >Index: src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java,v >retrieving revision 1.16 >diff -u -r1.16 ExcludeListDeltaVisitor.java >--- src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java 22 Jul 2010 19:31:37 -0000 1.16 >+++ src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java 9 Sep 2010 17:47:50 -0000 >@@ -146,7 +146,7 @@ > break; > } > } >- } else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) { >+ } else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getCurrentRestrictions())) { > if ((this.flags & CHECK_DEPRECATION) != 0) { > switch(delta.getFlags()) { > case IDelta.DEPRECATION : >#P org.eclipse.pde.api.tools.tests >Index: src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityMethodTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityMethodTests.java,v >retrieving revision 1.13 >diff -u -r1.13 ClassCompatibilityMethodTests.java >--- src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityMethodTests.java 7 Mar 2009 00:07:01 -0000 1.13 >+++ src/org/eclipse/pde/api/tools/builder/tests/compatibility/ClassCompatibilityMethodTests.java 9 Sep 2010 17:47:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008, 2009 IBM Corporation and others. >+ * Copyright (c) 2008, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -56,6 +56,10 @@ > */ > public static Test suite() { > return buildTestSuite(ClassCompatibilityMethodTests.class); >+// junit.framework.TestSuite suite = new junit.framework.TestSuite(); >+// suite.addTest(new ClassCompatibilityMethodTests("testAddNooverrideRemoveNoextendI")); >+// suite.addTest(new ClassCompatibilityMethodTests("testAddNooverrideRemoveNoextendF")); >+// return suite; > } > > /* (non-Javadoc) >@@ -107,6 +111,21 @@ > xRemoveTwoPublicAPIMethods(false); > } > >+ public void testAddNooverrideRemoveNoextendI() throws Exception { >+ xAddNooverrideRemoveNoextendI(true); >+ } >+ >+ public void testAddNooverrideRemoveNoextendF() throws Exception { >+ xAddNooverrideRemoveNoextendI(false); >+ } >+ >+ /** >+ * Tests the removal of a public methods from an API class - incremental. >+ */ >+ private void xAddNooverrideRemoveNoextendI(boolean incremental) throws Exception { >+ IPath filePath = WORKSPACE_CLASSES_PACKAGE_A.append("AddNooverrideRemoveNoextend.java"); >+ performCompatibilityTest(filePath, incremental); >+ } > /** > * Tests the removal of a public methods from an API class - incremental. > */ >Index: src/org/eclipse/pde/api/tools/comparator/tests/ClassDeltaTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/ClassDeltaTests.java,v >retrieving revision 1.44 >diff -u -r1.44 ClassDeltaTests.java >--- src/org/eclipse/pde/api/tools/comparator/tests/ClassDeltaTests.java 26 May 2010 21:05:07 -0000 1.44 >+++ src/org/eclipse/pde/api/tools/comparator/tests/ClassDeltaTests.java 9 Sep 2010 17:47:51 -0000 >@@ -1334,7 +1334,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Has no extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Has no extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1362,7 +1362,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertFalse("Extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1458,7 +1458,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1482,7 +1482,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1595,7 +1595,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1693,7 +1693,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1721,7 +1721,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1749,7 +1749,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1772,7 +1772,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1834,7 +1834,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1857,7 +1857,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2140,7 +2140,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2209,7 +2209,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2383,7 +2383,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2473,7 +2473,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > // implicit restrictions >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2497,7 +2497,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2544,7 +2544,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2590,7 +2590,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("No extend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2613,7 +2613,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -2637,7 +2637,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -2660,7 +2660,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -2683,8 +2683,8 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >- assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); >+ assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -2707,8 +2707,8 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.REMOVED, child.getKind()); >- assertFalse("Is extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >- assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getRestrictions())); >+ assertFalse("Is extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); >+ assertTrue("Not instantiate restrictions", RestrictionModifiers.isInstantiateRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.CONSTRUCTOR, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -3024,7 +3024,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); >- assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -3308,7 +3308,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); >- assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.ANNOTATION_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -3330,7 +3330,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); >- assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -3352,7 +3352,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); >- assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No @noextend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >Index: src/org/eclipse/pde/api/tools/comparator/tests/FieldDeltaTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/FieldDeltaTests.java,v >retrieving revision 1.38 >diff -u -r1.38 FieldDeltaTests.java >--- src/org/eclipse/pde/api/tools/comparator/tests/FieldDeltaTests.java 12 Aug 2009 14:21:32 -0000 1.38 >+++ src/org/eclipse/pde/api/tools/comparator/tests/FieldDeltaTests.java 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -541,7 +541,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertTrue("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.VALUE, child.getFlags()); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -724,7 +724,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertTrue("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.VALUE, child.getFlags()); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -930,7 +930,7 @@ > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); >- assertTrue("Wrong restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Wrong restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertTrue("Wrong modifier", Flags.isProtected(child.getNewModifiers())); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1324,7 +1324,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1391,14 +1391,14 @@ > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertEquals("Wrong flag", IDelta.VALUE, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > child = allLeavesDeltas[1]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1421,7 +1421,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1444,7 +1444,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1467,14 +1467,14 @@ > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertEquals("Wrong flag", IDelta.VALUE, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > child = allLeavesDeltas[1]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1497,7 +1497,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1520,7 +1520,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1543,7 +1543,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1566,7 +1566,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1589,7 +1589,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.TYPE, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.FIELD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >Index: src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java,v >retrieving revision 1.20 >diff -u -r1.20 InterfaceDeltaTests.java >--- src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java 12 Aug 2009 14:21:32 -0000 1.20 >+++ src/org/eclipse/pde/api/tools/comparator/tests/InterfaceDeltaTests.java 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -363,7 +363,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Should be compatible", DeltaProcessor.isCompatible(child)); >@@ -386,7 +386,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Should not be compatible", !DeltaProcessor.isCompatible(child)); >@@ -409,7 +409,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Should be compatible", DeltaProcessor.isCompatible(child)); >@@ -432,7 +432,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Implement restrictions", !RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Implement restrictions", !RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -455,7 +455,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Method Add not compatible", DeltaProcessor.isCompatible(child)); >@@ -483,7 +483,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Method Add not compatible", !DeltaProcessor.isCompatible(child)); >@@ -511,7 +511,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Method Add compatible", DeltaProcessor.isCompatible(child)); >@@ -539,7 +539,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -567,7 +567,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -590,7 +590,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -613,13 +613,13 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > child = allLeavesDeltas[1]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertTrue("Not implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -664,13 +664,13 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); > child = allLeavesDeltas[1]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.TYPE_MEMBER, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -693,7 +693,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getRestrictions())); >+ assertFalse("Is implement restrictions", RestrictionModifiers.isImplementRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.FIELD, child.getFlags()); > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >Index: src/org/eclipse/pde/api/tools/comparator/tests/MethodDeltaTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/MethodDeltaTests.java,v >retrieving revision 1.47 >diff -u -r1.47 MethodDeltaTests.java >--- src/org/eclipse/pde/api/tools/comparator/tests/MethodDeltaTests.java 26 May 2010 21:05:07 -0000 1.47 >+++ src/org/eclipse/pde/api/tools/comparator/tests/MethodDeltaTests.java 9 Sep 2010 17:47:51 -0000 >@@ -94,7 +94,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -122,7 +122,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -150,7 +150,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -178,7 +178,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -206,7 +206,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -583,7 +583,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.NON_FINAL_TO_FINAL, child.getFlags()); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); >@@ -1208,7 +1208,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1232,7 +1232,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("No extend restrictions", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1256,7 +1256,7 @@ > assertEquals("Wrong size", 1, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -1857,7 +1857,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.INCREASE_ACCESS, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @noreferece restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1881,7 +1881,7 @@ > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); > assertTrue("Not protected", Flags.isProtected(child.getNewModifiers())); >- assertTrue("Not @extend restriction", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not @extend restriction", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1948,7 +1948,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1971,7 +1971,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -1994,7 +1994,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2017,7 +2017,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.CONSTRUCTOR_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2040,7 +2040,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.NON_STATIC_TO_STATIC, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2063,7 +2063,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.STATIC_TO_NON_STATIC, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2086,7 +2086,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2109,7 +2109,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2132,7 +2132,7 @@ > assertEquals("Wrong kind", IDelta.CHANGED, child.getKind()); > assertEquals("Wrong flag", IDelta.DECREASE_ACCESS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getRestrictions())); >+ assertTrue("Not @reference restriction", RestrictionModifiers.isReferenceRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2265,7 +2265,7 @@ > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); > assertTrue("Not visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getRestrictions())); >+ assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertFalse("Is compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2348,7 +2348,7 @@ > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); > assertEquals("Wrong flag", IDelta.RESTRICTIONS, child.getFlags()); > assertFalse("Is visible", Util.isVisible(child.getNewModifiers())); >- assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getRestrictions())); >+ assertTrue("Not @override restriction", RestrictionModifiers.isOverrideRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong element type", IDelta.METHOD_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > } >@@ -2828,6 +2828,6 @@ > assertEquals("Wrong element type", IDelta.INTERFACE_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >- assertTrue("Not noextend", RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Not noextend", RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > } > } >Index: src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java,v >retrieving revision 1.18 >diff -u -r1.18 RestrictionsDeltaTests.java >--- src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java 26 May 2010 21:05:07 -0000 1.18 >+++ src/org/eclipse/pde/api/tools/comparator/tests/RestrictionsDeltaTests.java 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2009 IBM Corporation and others. >+ * Copyright (c) 2007, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -58,7 +58,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -85,7 +85,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >@@ -112,7 +112,7 @@ > assertEquals("Wrong size", 2, allLeavesDeltas.length); > IDelta child = allLeavesDeltas[0]; > assertEquals("Wrong kind", IDelta.ADDED, child.getKind()); >- assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getRestrictions())); >+ assertTrue("Extend restrictions", !RestrictionModifiers.isExtendRestriction(child.getCurrentRestrictions())); > assertEquals("Wrong flag", IDelta.METHOD, child.getFlags()); > assertEquals("Wrong element type", IDelta.CLASS_ELEMENT_TYPE, child.getElementType()); > assertTrue("Not compatible", DeltaProcessor.isCompatible(child)); >Index: test-builder/baseline/bundle.a/src/a/classes/methods/AddNooverrideRemoveNoextend.java >=================================================================== >RCS file: test-builder/baseline/bundle.a/src/a/classes/methods/AddNooverrideRemoveNoextend.java >diff -N test-builder/baseline/bundle.a/src/a/classes/methods/AddNooverrideRemoveNoextend.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ test-builder/baseline/bundle.a/src/a/classes/methods/AddNooverrideRemoveNoextend.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,20 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package a.classes.methods; >+ >+/** >+ * @noextend This class is not intended to be subclassed by clients. >+ */ >+public class AddNooverrideRemoveNoextend { >+ >+ public void methodOne() { >+ } >+} >Index: test-builder/compat/class/methods/AddNooverrideRemoveNoextend.java >=================================================================== >RCS file: test-builder/compat/class/methods/AddNooverrideRemoveNoextend.java >diff -N test-builder/compat/class/methods/AddNooverrideRemoveNoextend.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ test-builder/compat/class/methods/AddNooverrideRemoveNoextend.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,20 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package a.classes.methods; >+ >+public class AddNooverrideRemoveNoextend { >+ >+ /** >+ * @nooverride This method is not intended to be re-implemented or extended by clients. >+ */ >+ public void methodOne() { >+ } >+} >#P org.eclipse.pde.api.tools.ui >Index: src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java,v >retrieving revision 1.9 >diff -u -r1.9 ActionMessages.java >--- src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java 22 Oct 2009 15:57:58 -0000 1.9 >+++ src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008, 2009 IBM Corporation and others. >+ * Copyright (c) 2008, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -55,7 +55,8 @@ > public static String PropertyKindKey; > public static String PropertyNewModifiersKey; > public static String PropertyOldModifiersKey; >- public static String PropertyRestrictionsKey; >+ public static String PropertyCurrentRestrictionsKey; >+ public static String PropertyPreviousRestrictionsKey; > public static String PropertyTypeNameKey; > > public static String MessageCategory; >Index: src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java,v >retrieving revision 1.5 >diff -u -r1.5 DeltaSession.java >--- src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java 30 Nov 2009 15:54:33 -0000 1.5 >+++ src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2009 IBM Corporation and others. >+ * Copyright (c) 2009, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -55,7 +55,8 @@ > private static final Object ID_KIND = "IDelta.Kind"; //$NON-NLS-1$ > private static final Object ID_NEW_MODIFIERS = "IDelta.NewModifiers"; //$NON-NLS-1$ > private static final Object ID_OLD_MODIFIERS = "IDelta.OldModifiers"; //$NON-NLS-1$ >- private static final Object ID_RESTRICTIONS = "IDelta.Restrictions"; //$NON-NLS-1$ >+ private static final Object ID_CURRENT_RESTRICTIONS = "IDelta.CurrentRestrictions"; //$NON-NLS-1$ >+ private static final Object ID_PREVIOUS_RESTRICTIONS = "IDelta.PreviousRestrictions"; //$NON-NLS-1$ > private static final Object ID_TYPENAME = "IDelta.TypeName"; //$NON-NLS-1$ > > // categories >@@ -70,7 +71,8 @@ > public static final String P_KIND = ActionMessages.PropertyKindKey; > public static final String P_NEW_MODIFIERS = ActionMessages.PropertyNewModifiersKey; > public static final String P_OLD_MODIFIERS = ActionMessages.PropertyOldModifiersKey; >- public static final String P_RESTRICTIONS = ActionMessages.PropertyRestrictionsKey; >+ public static final String P_CURRENT_RESTRICTIONS = ActionMessages.PropertyCurrentRestrictionsKey; >+ public static final String P_PREVIOUS_RESTRICTIONS = ActionMessages.PropertyPreviousRestrictionsKey; > public static final String P_TYPENAME = ActionMessages.PropertyTypeNameKey; > > private static List Descriptors; >@@ -102,7 +104,11 @@ > propertyDescriptor.setCategory(P_INFO_CATEGORY); > Descriptors.add(propertyDescriptor); > >- propertyDescriptor = new PropertyDescriptor(ID_RESTRICTIONS, P_RESTRICTIONS); >+ propertyDescriptor = new PropertyDescriptor(ID_CURRENT_RESTRICTIONS, P_CURRENT_RESTRICTIONS); >+ propertyDescriptor.setCategory(P_INFO_CATEGORY); >+ Descriptors.add(propertyDescriptor); >+ >+ propertyDescriptor = new PropertyDescriptor(ID_PREVIOUS_RESTRICTIONS, P_PREVIOUS_RESTRICTIONS); > propertyDescriptor.setCategory(P_INFO_CATEGORY); > Descriptors.add(propertyDescriptor); > >@@ -210,18 +216,25 @@ > } > if (ID_OLD_MODIFIERS.equals(propKey)) { > return getDisplayedModifiers(delta.getOldModifiers()); >- } >- if (ID_RESTRICTIONS.equals(propKey)) { >- int restrictions = delta.getRestrictions(); >- StringBuffer buffer = new StringBuffer(RestrictionModifiers.getRestrictionText(restrictions)); >- buffer.append(" (0x").append(Integer.toHexString(restrictions)).append(')'); //$NON-NLS-1$ >- return String.valueOf(buffer); >+ } >+ if (ID_CURRENT_RESTRICTIONS.equals(propKey)) { >+ int restrictions = delta.getCurrentRestrictions(); >+ return getDisplayRestrictions(restrictions); >+ } >+ if (ID_PREVIOUS_RESTRICTIONS.equals(propKey)) { >+ int restrictions = delta.getPreviousRestrictions(); >+ return getDisplayRestrictions(restrictions); > } > if (ID_TYPENAME.equals(propKey)) { > return delta.getTypeName(); > } > return null; > } >+ private Object getDisplayRestrictions(int restrictions) { >+ StringBuffer buffer = new StringBuffer(RestrictionModifiers.getRestrictionText(restrictions)); >+ buffer.append(" (0x").append(Integer.toHexString(restrictions)).append(')'); //$NON-NLS-1$ >+ return String.valueOf(buffer); >+ } > public boolean isPropertySet(Object id) { > return false; > } >Index: src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties,v >retrieving revision 1.10 >diff -u -r1.10 actionmessages.properties >--- src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties 22 Oct 2009 15:57:58 -0000 1.10 >+++ src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties 9 Sep 2010 17:47:51 -0000 >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2008, 2009 IBM Corporation and others. >+# Copyright (c) 2008, 2010 IBM Corporation and others. > # All rights reserved. This program and the accompanying materials > # are made available under the terms of the Eclipse Public License v1.0 > # which accompanies this distribution, and is available at >@@ -47,7 +47,8 @@ > PropertyKindKey=kind > PropertyNewModifiersKey=new modifiers > PropertyOldModifiersKey=old modifiers >-PropertyRestrictionsKey=restrictions >+PropertyCurrentRestrictionsKey=current restrictions >+PropertyPreviousRestrictionsKey=previous restrictions > PropertyTypeNameKey=type name > > MessageCategory=Message
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 324076
: 178540