### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: search/org/eclipse/jdt/internal/core/search/matching/InternalFieldReferenceMatch.java =================================================================== RCS file: search/org/eclipse/jdt/internal/core/search/matching/InternalFieldReferenceMatch.java diff -N search/org/eclipse/jdt/internal/core/search/matching/InternalFieldReferenceMatch.java --- search/org/eclipse/jdt/internal/core/search/matching/InternalFieldReferenceMatch.java 17 Sep 2008 10:51:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 org.eclipse.jdt.internal.core.search.matching; - -import org.eclipse.core.resources.IResource; -import org.eclipse.jdt.core.*; -import org.eclipse.jdt.core.search.*; - -/** - * A method reference match that stores the local element - */ -public class InternalFieldReferenceMatch extends FieldReferenceMatch { - - IJavaElement localElement; - -public InternalFieldReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, boolean isReadAccess, boolean isWriteAccess, boolean insideDocComment, SearchParticipant participant, IResource resource) { - super(enclosingElement, accuracy, offset, length, isReadAccess, isWriteAccess, insideDocComment, participant, resource); -} - -/** - * Return the stored local element. - * - * @see org.eclipse.jdt.core.search.ReferenceMatch#getLocalElement() - */ -protected IJavaElement localElement() { - return this.localElement; -} - -/** - * Store the local element in the match. - * - * @param element The local element to be stored - */ -public void localElement(IJavaElement element) { - this.localElement = element; -} -} Index: search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java,v retrieving revision 1.46 diff -u -r1.46 PackageReferenceLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java 18 Sep 2008 15:24:57 -0000 1.46 +++ search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java 18 Feb 2009 12:32:38 -0000 @@ -16,6 +16,7 @@ import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.search.PackageReferenceMatch; import org.eclipse.jdt.core.search.SearchPattern; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.internal.compiler.ast.*; @@ -262,8 +263,8 @@ if (last > positions.length) last = positions.length; int sourceStart = (int) (positions[0] >>> 32); int sourceEnd = ((int) positions[last - 1]); - InternalPackageReferenceMatch packageReferenceMatch = locator.newPackageReferenceMatch(element, accuracy, sourceStart, sourceEnd-sourceStart+1, reference); - packageReferenceMatch.localElement(localElement); + PackageReferenceMatch packageReferenceMatch = locator.newPackageReferenceMatch(element, accuracy, sourceStart, sourceEnd-sourceStart+1, reference); + packageReferenceMatch.setLocalElement(localElement); this.match = packageReferenceMatch; locator.report(this.match); } Index: search/org/eclipse/jdt/internal/core/search/matching/InternalPackageReferenceMatch.java =================================================================== RCS file: search/org/eclipse/jdt/internal/core/search/matching/InternalPackageReferenceMatch.java diff -N search/org/eclipse/jdt/internal/core/search/matching/InternalPackageReferenceMatch.java --- search/org/eclipse/jdt/internal/core/search/matching/InternalPackageReferenceMatch.java 17 Sep 2008 10:51:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 org.eclipse.jdt.internal.core.search.matching; - -import org.eclipse.core.resources.IResource; -import org.eclipse.jdt.core.*; -import org.eclipse.jdt.core.search.*; - -/** - * A package reference match that stores the local element - */ -public class InternalPackageReferenceMatch extends PackageReferenceMatch { - - IJavaElement localElement; - -public InternalPackageReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, boolean insideDocComment, SearchParticipant participant, IResource resource) { - super(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource); -} - -/** - * Return the stored local element. - * - * @see org.eclipse.jdt.core.search.ReferenceMatch#getLocalElement() - */ -protected IJavaElement localElement() { - return this.localElement; -} - -/** - * Store the local element in the match. - * - * @param element The local element to be stored - */ -public void localElement(IJavaElement element) { - this.localElement = element; -} -} Index: search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java,v retrieving revision 1.86 diff -u -r1.86 MethodLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 18 Sep 2008 15:24:56 -0000 1.86 +++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 18 Feb 2009 12:32:38 -0000 @@ -333,8 +333,8 @@ reportDeclaration(methodBinding, locator, declPattern.knownMethods); } } else { - InternalMethodReferenceMatch methodReferenceMatch = locator.newMethodReferenceMatch(element, elementBinding, accuracy, -1, -1, false /*not constructor*/, false/*not synthetic*/, reference); - methodReferenceMatch.localElement(localElement); + MethodReferenceMatch methodReferenceMatch = locator.newMethodReferenceMatch(element, elementBinding, accuracy, -1, -1, false /*not constructor*/, false/*not synthetic*/, reference); + methodReferenceMatch.setLocalElement(localElement); this.match = methodReferenceMatch; if (this.pattern.findReferences && reference instanceof MessageSend) { IJavaElement focus = this.pattern.focus; Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java,v retrieving revision 1.321 diff -u -r1.321 MatchLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 18 Feb 2009 12:08:56 -0000 1.321 +++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 18 Feb 2009 12:32:38 -0000 @@ -1423,8 +1423,8 @@ if (enclosingBinding != null) { enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); } - InternalFieldReferenceMatch match = new InternalFieldReferenceMatch(enclosingElement, accuracy, offset, length, isReadAccess, isWriteAccess, insideDocComment, participant, resource); - match.localElement(localElement); + FieldReferenceMatch match = new FieldReferenceMatch(enclosingElement, accuracy, offset, length, isReadAccess, isWriteAccess, insideDocComment, participant, resource); + match.setLocalElement(localElement); return match; } @@ -1462,7 +1462,7 @@ return new LocalVariableReferenceMatch(enclosingElement, accuracy, offset, length, isReadAccess, isWriteAccess, insideDocComment, participant, resource); } -public InternalMethodReferenceMatch newMethodReferenceMatch( +public MethodReferenceMatch newMethodReferenceMatch( IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, @@ -1477,10 +1477,10 @@ if (enclosingBinding != null) enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding); boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0; - return new InternalMethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); + return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource); } -public InternalPackageReferenceMatch newPackageReferenceMatch( +public PackageReferenceMatch newPackageReferenceMatch( IJavaElement enclosingElement, int accuracy, int offset, @@ -1489,7 +1489,7 @@ SearchParticipant participant = getParticipant(); IResource resource = this.currentPossibleMatch.resource; boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0; - return new InternalPackageReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource); + return new PackageReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource); } public SearchMatch newTypeParameterReferenceMatch( Index: search/org/eclipse/jdt/internal/core/search/matching/InternalMethodReferenceMatch.java =================================================================== RCS file: search/org/eclipse/jdt/internal/core/search/matching/InternalMethodReferenceMatch.java diff -N search/org/eclipse/jdt/internal/core/search/matching/InternalMethodReferenceMatch.java --- search/org/eclipse/jdt/internal/core/search/matching/InternalMethodReferenceMatch.java 17 Sep 2008 10:51:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 org.eclipse.jdt.internal.core.search.matching; - -import org.eclipse.core.resources.IResource; -import org.eclipse.jdt.core.*; -import org.eclipse.jdt.core.search.*; - -/** - * A field reference match that stores the local element - */ -public class InternalMethodReferenceMatch extends MethodReferenceMatch { - - IJavaElement localElement; - -public InternalMethodReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, boolean constructor, boolean synthetic, boolean superInvocation, boolean insideDocComment, SearchParticipant participant, IResource resource) { - super(enclosingElement, accuracy, offset, length, constructor, synthetic, superInvocation, insideDocComment, participant, resource); -} - -/** - * Return the stored local element. - * - * @see org.eclipse.jdt.core.search.ReferenceMatch#getLocalElement() - */ -protected IJavaElement localElement() { - return this.localElement; -} - -/** - * Store the local element in the match. - * - * @param element The local element to be stored - */ -public void localElement(IJavaElement element) { - this.localElement = element; -} -} Index: search/org/eclipse/jdt/core/search/ReferenceMatch.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/ReferenceMatch.java,v retrieving revision 1.3 diff -u -r1.3 ReferenceMatch.java --- search/org/eclipse/jdt/core/search/ReferenceMatch.java 18 Feb 2009 09:21:46 -0000 1.3 +++ search/org/eclipse/jdt/core/search/ReferenceMatch.java 18 Feb 2009 12:32:37 -0000 @@ -22,6 +22,8 @@ */ public abstract class ReferenceMatch extends SearchMatch { + IJavaElement localElement; + /** * Creates a new reference match. * @@ -116,18 +118,17 @@ * @since 3.4 */ final public IJavaElement getLocalElement() { - return localElement(); + return this.localElement; } /** - * Return the stored local element. + * Store the local element in the match. * - * @see org.eclipse.jdt.core.search.ReferenceMatch#getLocalElement() + * @param element The local element to be stored * - * @noreference This method is not intended to be referenced by clients. - * @nooverride This method is not intended to be re-implemented or extended by clients. + * @since 3.5 */ -protected IJavaElement localElement() { - return null; +final public void setLocalElement(IJavaElement element) { + this.localElement = element; } } Index: search/org/eclipse/jdt/core/search/TypeReferenceMatch.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeReferenceMatch.java,v retrieving revision 1.23 diff -u -r1.23 TypeReferenceMatch.java --- search/org/eclipse/jdt/core/search/TypeReferenceMatch.java 17 Sep 2008 10:51:13 -0000 1.23 +++ search/org/eclipse/jdt/core/search/TypeReferenceMatch.java 18 Feb 2009 12:32:37 -0000 @@ -24,7 +24,6 @@ */ public class TypeReferenceMatch extends ReferenceMatch { - private IJavaElement localElement; private IJavaElement[] otherElements; /** @@ -84,26 +83,6 @@ } /** - * Return the stored local element. - * - * @see org.eclipse.jdt.core.search.ReferenceMatch#getLocalElement() - */ -protected IJavaElement localElement() { - return this.localElement; -} - -/** - * Sets the local element of this search match. - * - * @param element A more specific local element that corresponds to the match, - * or null if none - * @since 3.2 - */ -public final void setLocalElement(IJavaElement element) { - this.localElement = element; -} - -/** * Sets the other elements of this search match. * * @see #getOtherElements() Index: .settings/.api_filters =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/.settings/.api_filters,v retrieving revision 1.5 diff -u -r1.5 .api_filters --- .settings/.api_filters 27 Oct 2008 21:04:36 -0000 1.5 +++ .settings/.api_filters 18 Feb 2009 12:32:37 -0000 @@ -7,6 +7,14 @@ + + + + + + + +