diff options
| author | Tomasz Zarna | 2012-07-05 13:51:47 +0000 |
|---|---|---|
| committer | Srikanth | 2012-07-05 13:51:47 +0000 |
| commit | c7c0f45382aa459a248601386682edbbcff78c8b (patch) | |
| tree | b4fd31b5a12165c92fd2ac31685ce5276e08ad33 | |
| parent | 46bdd6036153580a7889ceb7993a8f8a6300be85 (diff) | |
| download | eclipse.jdt.core-c7c0f45382aa459a248601386682edbbcff78c8b.tar.gz eclipse.jdt.core-c7c0f45382aa459a248601386682edbbcff78c8b.tar.xz eclipse.jdt.core-c7c0f45382aa459a248601386682edbbcff78c8b.zip | |
Fixed bug 381567: [search] Unexpected results from SearchEngine#search
6 files changed, 399 insertions, 342 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java index c45d50f8d7..bf0958e983 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java @@ -1224,4 +1224,70 @@ public class JavaSearchBugsTests2 extends AbstractJavaSearchTests { deleteProject("P"); } } + // search for constructor declarations in javadoc + public void testBug381567a() throws CoreException { + try { + IJavaProject p = createJavaProject("P", new String[] { "src" }, + new String[] {"JCL_LIB"}, "bin"); + createFolder("/P/src/b381567"); + createFile("/P/src/b381567/A.java", + "package b381567;\n" + + "/**\n" + + "* {@link B#equals(java.lang.Object)}\n" + + "*/\n" + + "public class A {\n" + + " A() {}\n" + + "}"); + createFile("/P/src/b381567/B.java", + "package b381567;\n" + + "public class B {\n" + + "}"); + waitUntilIndexesReady(); + IJavaSearchScope scope = SearchEngine + .createJavaSearchScope(new IJavaElement[] { p }, IJavaSearchScope.SOURCES); + SearchPattern pattern = SearchPattern.createPattern("*", CONSTRUCTOR, DECLARATIONS, SearchPattern.R_PATTERN_MATCH); + this.resultCollector.showInsideDoc(); + + search(pattern, scope, this.resultCollector); + + assertSearchResults("src/b381567/A.java b381567.A() [A] EXACT_MATCH OUTSIDE_JAVADOC"); + } finally { + deleteProject("P"); + } + } + // search for all constructor occurrences (declarations and references) in javadoc + public void testBug381567b() throws CoreException { + try { + IJavaProject p = createJavaProject("P", new String[] { "src" }, + new String[] {"JCL_LIB"}, "bin"); + createFolder("/P/src/b381567"); + createFile("/P/src/b381567/A.java", + "package b381567;\n" + + "class A {\n" + + " A(Exception ex) {}\n" + + " class B { \n" + + " /**\n" + + " * Link {@link #A(Exception)} OK\n" + + " */\n" + + " public B(String str) {}\n" + + " }\n" + + "}" + ); + waitUntilIndexesReady(); + IMethod[] methods = getCompilationUnit("/P/src/b381567/A.java") + .getType("A").getMethods(); + assertEquals("Invalid number of methods", 1, methods.length); + assertTrue(methods[0].isConstructor()); + IJavaSearchScope scope = SearchEngine + .createJavaSearchScope(new IJavaElement[] { p }); + this.resultCollector.showInsideDoc(); + + search(methods[0], ALL_OCCURRENCES, scope); + + assertSearchResults("src/b381567/A.java b381567.A(Exception) [A] EXACT_MATCH OUTSIDE_JAVADOC\n" + + "src/b381567/A.java b381567.A$B(String) [A(Exception)] EXACT_MATCH INSIDE_JAVADOC"); + } finally { + deleteProject("P"); + } + } } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props index bf60bb29e6..a2e9a35bb5 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props @@ -1,333 +1,323 @@ -###############################################################################
-# Copyright (c) 2012 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
-###############################################################################
-,opt=,
-;opt=;
-AbstractMethodDeclaration=MethodDeclaration
-AdditionalBound1=AdditionalBound1
-AdditionalBound=AdditionalBound
-AdditionalBoundList1=AdditionalBoundList1
-AdditionalBoundList=AdditionalBoundList
-AdditiveExpression=Expression
-AdditiveExpression_NotName=Expression
-AllocationHeader=AllocationHeader
-AndExpression=Expression
-AndExpression_NotName=Expression
-Annotation=Annotation
-AnnotationMethodHeader=AnnotationMethodHeader
-AnnotationMethodHeaderDefaultValueopt=MethodHeaderDefaultValue
-AnnotationMethodHeaderName=MethodHeaderName
-AnnotationName=AnnotationName
-AnnotationTypeBody=AnnotationTypeBody
-AnnotationTypeDeclaration=AnnotationTypeDeclaration
-AnnotationTypeDeclarationHeader=AnnotationTypeDeclarationHeader
-AnnotationTypeDeclarationHeaderName=AnnotationTypeDeclarationHeaderName
-AnnotationTypeMemberDeclaration=AnnotationTypeMemberDeclaration
-AnnotationTypeMemberDeclarations=AnnotationTypeMemberDeclarations
-AnnotationTypeMemberDeclarationsopt=AnnotationTypeMemberDeclarations
-ArgumentList=ArgumentList
-ArgumentListopt=ArgumentList
-Arguments=Arguments
-Argumentsopt=Argumentsopt
-ArrayAccess=ArrayAccess
-ArrayCreationHeader=ArrayCreationHeader
-ArrayCreationWithArrayInitializer=ArrayCreationWithArrayInitializer
-ArrayCreationWithoutArrayInitializer=ArrayCreationWithoutArrayInitializer
-ArrayInitializer=ArrayInitializer
-ArrayType=ArrayType
-ArrayTypeWithTypeArgumentsName=ArrayTypeWithTypeArgumentsName
-AssertStatement=AssertStatement
-Assignment=Assignment
-AssignmentExpression=Expression
-AssignmentExpression_NotName=Expression
-AssignmentOperator=AssignmentOperator
-Block=Block
-BlockStatement=BlockStatement
-BlockStatements=BlockStatements
-BlockStatementsopt=BlockStatements
-BooleanLiteral=BooleanLiteral
-BreakStatement=BreakStatement
-CastExpression=CastExpression
-CatchClause=CatchClause
-CatchFormalParameter=FormalParameter
-CatchHeader=CatchHeader
-CatchType=CatchType
-Catches=Catches
-Catchesopt=Catches
-ClassBody=ClassBody
-ClassBodyDeclaration=ClassBodyDeclaration
-ClassBodyDeclarations=ClassBodyDeclarations
-ClassBodyDeclarationsopt=ClassBodyDeclarations
-ClassDeclaration=ClassDeclaration
-ClassHeader=ClassHeader
-ClassHeaderExtends=ClassHeaderExtends
-ClassHeaderExtendsopt=ClassHeaderExtends
-ClassHeaderImplements=ClassHeaderImplements
-ClassHeaderImplementsopt=ClassHeaderImplements
-ClassHeaderName1=ClassHeaderName
-ClassHeaderName=ClassHeaderName
-ClassInstanceCreationExpression=ClassInstanceCreationExpression
-ClassInstanceCreationExpressionName=ClassInstanceCreationExpressionName
-ClassMemberDeclaration=ClassMemberDeclaration
-ClassOrInterface=Type
-ClassOrInterfaceType=Type
-ClassType=ClassType
-ClassTypeElt=ClassType
-ClassTypeList=ClassTypeList
-CompilationUnit=CompilationUnit
-ConditionalAndExpression=Expression
-ConditionalAndExpression_NotName=Expression
-ConditionalExpression=Expression
-ConditionalExpression_NotName=Expression
-ConditionalOrExpression=Expression
-ConditionalOrExpression_NotName=Expression
-ConstantDeclaration=ConstantDeclaration
-ConstantExpression=ConstantExpression
-ConstructorDeclaration=ConstructorDeclaration
-ConstructorHeader=ConstructorDeclaration
-ConstructorHeaderName=ConstructorHeaderName
-ContinueStatement=ContinueStatement
-CreateInitializer=CreateInitializer
-DefaultValue=DefaultValue
-Diet=Diet
-DimWithOrWithOutExpr=Dimension
-DimWithOrWithOutExprs=Dimensions
-Dims=Dimensions
-DimsLoop=Dimensions
-Dimsopt=Dimensions
-DoStatement=DoStatement
-EmptyStatement=EmptyStatement
-EnhancedForStatement=EnhancedForStatement
-EnhancedForStatementHeader=EnhancedForStatementHeader
-EnhancedForStatementHeaderInit=EnhancedForStatementHeaderInit
-EnhancedForStatementNoShortIf=EnhancedForStatementNoShortIf
-EnterCompilationUnit=EnterCompilationUnit
-EnterInstanceCreationArgumentList=EnterInstanceCreationArgumentList
-EnterMemberValue=EnterMemberValue
-EnterMemberValueArrayInitializer=EnterMemberValueArrayInitializer
-EnterVariable=EnterVariable
-EnumBody=EnumBody
-EnumBodyDeclarationsopt=EnumBodyDeclarationsopt
-EnumConstant=EnumConstant
-EnumConstantHeader=EnumConstantHeader
-EnumConstantHeaderName=EnumConstantHeaderName
-EnumConstants=EnumConstants
-EnumDeclaration=EnumDeclaration
-EnumDeclarations=EnumDeclarations
-EnumHeader=EnumHeader
-EnumHeaderName=EnumHeaderName
-EqualityExpression=Expression
-EqualityExpression_NotName=Expression
-ExclusiveOrExpression=Expression
-ExclusiveOrExpression_NotName=Expression
-ExitMemberValue=ExitMemberValue
-ExitTryBlock=ExitTryBlock
-ExitVariableWithInitialization=ExitVariableWithInitialization
-ExitVariableWithoutInitialization=ExitVariableWithoutInitialization
-ExplicitConstructorInvocation=ExplicitConstructorInvocation
-Expression=Expression
-ExpressionStatement=Statement
-Expression_NotName=Expression
-Expressionopt=Expression
-FieldAccess=FieldAccess
-FieldDeclaration=FieldDeclaration
-Finally=Finally
-FloatingPointType=FloatingPointType
-ForInit=ForInit
-ForInitopt=ForInit
-ForStatement=ForStatement
-ForStatementNoShortIf=ForStatement
-ForUpdate=ForUpdate
-ForUpdateopt=ForUpdate
-ForceNoDiet=ForceNoDiet
-FormalParameter=FormalParameter
-FormalParameterList=FormalParameterList
-FormalParameterListopt=FormalParameterList
-GenericMethodDeclaration=GenericMethodDeclaration
-GenericType=GenericType
-Goal=Goal
-Header1=Header1
-Header2=Header2
-Header=Header
-IfThenElseStatement=IfStatement
-IfThenElseStatementNoShortIf=IfStatement
-IfThenStatement=IfStatement
-ImportDeclaration=ImportDeclaration
-ImportDeclarations=ImportDeclarations
-InclusiveOrExpression=Expression
-InclusiveOrExpression_NotName=Expression
-Initializer=Initializer
-InsideCastExpression=InsideCastExpression
-InsideCastExpressionLL1=InsideCastExpression
-InsideCastExpressionWithQualifiedGenerics=InsideCastExpression
-InstanceofExpression=Expression
-InstanceofExpression_NotName=Expression
-IntegralType=IntegralType
-InterfaceBody=InterfaceBody
-InterfaceDeclaration=InterfaceDeclaration
-InterfaceHeader=InterfaceHeader
-InterfaceHeaderExtends=InterfaceHeaderExtends
-InterfaceHeaderExtendsopt=InterfaceHeaderExtends
-InterfaceHeaderName1=InterfaceHeaderName
-InterfaceHeaderName=InterfaceHeaderName
-InterfaceMemberDeclaration=InterfaceMemberDeclaration
-InterfaceMemberDeclarations=InterfaceMemberDeclarations
-InterfaceMemberDeclarationsopt=InterfaceMemberDeclarations
-InterfaceType=InterfaceType
-InterfaceTypeList=InterfaceTypeList
-InternalCompilationUnit=CompilationUnit
-InvalidArrayInitializerAssignement=ArrayInitializerAssignment
-InvalidConstructorDeclaration=InvalidConstructorDeclaration
-InvalidInitializer=InvalidInitializer
-Label=Label
-LabeledStatement=LabeledStatement
-LabeledStatementNoShortIf=LabeledStatement
-Literal=Literal
-LocalVariableDeclaration=LocalVariableDeclaration
-LocalVariableDeclarationStatement=LocalVariableDeclarationStatement
-MarkerAnnotation=MarkerAnnotation
-MemberValue=MemberValue
-MemberValueArrayInitializer=MemberValueArrayInitializer
-MemberValuePair=MemberValuePair
-MemberValuePairs=MemberValuePairs
-MemberValuePairsopt=MemberValuePairsopt
-MemberValues=MemberValues
-MethodBody=MethodBody
-MethodDeclaration=MethodDeclaration
-MethodHeader=MethodDeclaration
-MethodHeaderExtendedDims=MethodHeaderExtendedDims
-MethodHeaderName=MethodHeaderName
-MethodHeaderRightParen=)
-MethodHeaderThrowsClause=MethodHeaderThrowsClause
-MethodHeaderThrowsClauseopt=MethodHeaderThrowsClause
-MethodInvocation=MethodInvocation
-Modifier=Modifier
-Modifiers=Modifiers
-Modifiersopt=Modifiers
-MultiplicativeExpression=Expression
-MultiplicativeExpression_NotName=Expression
-Name=Name
-NestedMethod=NestedMethod
-NestedType=NestedType
-NormalAnnotation=NormalAnnotation
-NumericType=NumericType
-OneDimLoop=Dimension
-OnlySynchronized=OnlySynchronized
-OnlyTypeArguments=TypeArguments
-OnlyTypeArgumentsForCastExpression=TypeArguments
-OpenBlock=OpenBlock
-PackageComment=PackageComment
-PackageDeclaration=PackageDeclaration
-PackageDeclarationName=PackageDeclarationName
-PostDecrementExpression=PostDecrementExpression
-PostIncrementExpression=PostIncrementExpression
-PostfixExpression=Expression
-PostfixExpression_NotName=Expression
-PreDecrementExpression=PreDecrementExpression
-PreIncrementExpression=PreIncrementExpression
-Primary=Expression
-PrimaryNoNewArray=Expression
-PrimitiveType=PrimitiveType
-PushLPAREN=(
-PushLeftBrace=PushLeftBrace
-PushModifiers=PushModifiers
-PushModifiersForHeader=PushModifiersForHeader
-PushPosition=PushPosition
-PushRPAREN=)
-PushRealModifiers=PushRealModifiers
-QualifiedClassBodyopt=ClassBody
-QualifiedEnterAnonymousClassBody=EnterAnonymousClassBody
-QualifiedName=QualifiedName
-RecoveryMethodHeader=MethodHeader
-RecoveryMethodHeaderName=MethodHeaderName
-ReduceImports=ReduceImports
-ReferenceType1=ReferenceType1
-ReferenceType2=ReferenceType2
-ReferenceType3=ReferenceType3
-ReferenceType=ReferenceType
-RelationalExpression=Expression
-RelationalExpression_NotName=Expression
-Resource=Resource
-ResourceSpecification=ResourceSpecification
-Resources=Resources
-RestoreDiet=RestoreDiet
-ReturnStatement=ReturnStatement
-ShiftExpression=Expression
-ShiftExpression_NotName=Expression
-SimpleName=SimpleName
-SingleMemberAnnotation=SingleMemberAnnotation
-SingleMemberAnnotationMemberValue=MemberValue
-SingleStaticImportDeclaration=SingleStaticImportDeclaration
-SingleStaticImportDeclarationName=SingleStaticImportDeclarationName
-SingleTypeImportDeclaration=SingleTypeImportDeclaration
-SingleTypeImportDeclarationName=SingleTypeImportDeclarationName
-Statement=Statement
-StatementExpression=Expression
-StatementExpressionList=StatementExpressionList
-StatementNoShortIf=Statement
-StatementWithoutTrailingSubstatement=Statement
-StaticImportOnDemandDeclaration=StaticImportOnDemandDeclaration
-StaticImportOnDemandDeclarationName=StaticImportOnDemandDeclarationName
-StaticInitializer=StaticInitializer
-StaticOnly=StaticOnly
-SwitchBlock=SwitchBlock
-SwitchBlockStatement=SwitchBlockStatement
-SwitchBlockStatements=SwitchBlockStatements
-SwitchLabel=SwitchLabel
-SwitchLabels=SwitchLabels
-SwitchStatement=SwitchStatement
-SynchronizedStatement=SynchronizedStatement
-ThrowStatement=ThrowStatement
-TrailingSemiColon=;
-TryBlock=Block
-TryStatement=TryStatement
-TryStatementWithResources=TryStatementWithResources
-Type=Type
-TypeArgument1=TypeArgument1
-TypeArgument2=TypeArgument2
-TypeArgument3=TypeArgument3
-TypeArgument=TypeArgument
-TypeArgumentList1=TypeArgumentList1
-TypeArgumentList2=TypeArgumentList2
-TypeArgumentList3=TypeArgumentList3
-TypeArgumentList=TypeArgumentList
-TypeArguments=TypeArguments
-TypeDeclaration=TypeDeclaration
-TypeDeclarations=TypeDeclarations
-TypeImportOnDemandDeclaration=TypeImportOnDemandDeclaration
-TypeImportOnDemandDeclarationName=TypeImportOnDemandDeclarationName
-TypeParameter1=TypeParameter1
-TypeParameter=TypeParameter
-TypeParameterHeader=TypeParameter
-TypeParameterList1=TypeParameterList1
-TypeParameterList=TypeParameterList
-TypeParameters=TypeParameters
-UnaryExpression=Expression
-UnaryExpressionNotPlusMinus=Expression
-UnaryExpressionNotPlusMinus_NotName=Expression
-UnaryExpression_NotName=Expression
-UnionType=UnionType
-UnqualifiedClassBodyopt=ClassBody
-UnqualifiedEnterAnonymousClassBody=EnterAnonymousClassBody
-VariableDeclarator=VariableDeclarator
-VariableDeclaratorId=VariableDeclaratorId
-VariableDeclarators=VariableDeclarators
-VariableInitializer=VariableInitializer
-VariableInitializers=VariableInitializers
-WhileStatement=WhileStatement
-WhileStatementNoShortIf=WhileStatement
-Wildcard1=Wildcard1
-Wildcard2=Wildcard2
-Wildcard3=Wildcard3
-Wildcard=Wildcard
-WildcardBounds1=WildcardBounds1
-WildcardBounds2=WildcardBounds2
-WildcardBounds3=WildcardBound3
-WildcardBounds=WildcardBounds
\ No newline at end of file +,opt=, +;opt=; +AbstractMethodDeclaration=MethodDeclaration +AdditionalBound1=AdditionalBound1 +AdditionalBound=AdditionalBound +AdditionalBoundList1=AdditionalBoundList1 +AdditionalBoundList=AdditionalBoundList +AdditiveExpression=Expression +AdditiveExpression_NotName=Expression +AllocationHeader=AllocationHeader +AndExpression=Expression +AndExpression_NotName=Expression +Annotation=Annotation +AnnotationMethodHeader=AnnotationMethodHeader +AnnotationMethodHeaderDefaultValueopt=MethodHeaderDefaultValue +AnnotationMethodHeaderName=MethodHeaderName +AnnotationName=AnnotationName +AnnotationTypeBody=AnnotationTypeBody +AnnotationTypeDeclaration=AnnotationTypeDeclaration +AnnotationTypeDeclarationHeader=AnnotationTypeDeclarationHeader +AnnotationTypeDeclarationHeaderName=AnnotationTypeDeclarationHeaderName +AnnotationTypeMemberDeclaration=AnnotationTypeMemberDeclaration +AnnotationTypeMemberDeclarations=AnnotationTypeMemberDeclarations +AnnotationTypeMemberDeclarationsopt=AnnotationTypeMemberDeclarations +ArgumentList=ArgumentList +ArgumentListopt=ArgumentList +Arguments=Arguments +Argumentsopt=Argumentsopt +ArrayAccess=ArrayAccess +ArrayCreationHeader=ArrayCreationHeader +ArrayCreationWithArrayInitializer=ArrayCreationWithArrayInitializer +ArrayCreationWithoutArrayInitializer=ArrayCreationWithoutArrayInitializer +ArrayInitializer=ArrayInitializer +ArrayType=ArrayType +ArrayTypeWithTypeArgumentsName=ArrayTypeWithTypeArgumentsName +AssertStatement=AssertStatement +Assignment=Assignment +AssignmentExpression=Expression +AssignmentExpression_NotName=Expression +AssignmentOperator=AssignmentOperator +Block=Block +BlockStatement=BlockStatement +BlockStatements=BlockStatements +BlockStatementsopt=BlockStatements +BooleanLiteral=BooleanLiteral +BreakStatement=BreakStatement +CastExpression=CastExpression +CatchClause=CatchClause +CatchFormalParameter=FormalParameter +CatchHeader=CatchHeader +CatchType=CatchType +Catches=Catches +Catchesopt=Catches +ClassBody=ClassBody +ClassBodyDeclaration=ClassBodyDeclaration +ClassBodyDeclarations=ClassBodyDeclarations +ClassBodyDeclarationsopt=ClassBodyDeclarations +ClassDeclaration=ClassDeclaration +ClassHeader=ClassHeader +ClassHeaderExtends=ClassHeaderExtends +ClassHeaderExtendsopt=ClassHeaderExtends +ClassHeaderImplements=ClassHeaderImplements +ClassHeaderImplementsopt=ClassHeaderImplements +ClassHeaderName1=ClassHeaderName +ClassHeaderName=ClassHeaderName +ClassInstanceCreationExpression=ClassInstanceCreationExpression +ClassInstanceCreationExpressionName=ClassInstanceCreationExpressionName +ClassMemberDeclaration=ClassMemberDeclaration +ClassOrInterface=Type +ClassOrInterfaceType=Type +ClassType=ClassType +ClassTypeElt=ClassType +ClassTypeList=ClassTypeList +CompilationUnit=CompilationUnit +ConditionalAndExpression=Expression +ConditionalAndExpression_NotName=Expression +ConditionalExpression=Expression +ConditionalExpression_NotName=Expression +ConditionalOrExpression=Expression +ConditionalOrExpression_NotName=Expression +ConstantDeclaration=ConstantDeclaration +ConstantExpression=ConstantExpression +ConstructorDeclaration=ConstructorDeclaration +ConstructorHeader=ConstructorDeclaration +ConstructorHeaderName=ConstructorHeaderName +ContinueStatement=ContinueStatement +CreateInitializer=CreateInitializer +DefaultValue=DefaultValue +Diet=Diet +DimWithOrWithOutExpr=Dimension +DimWithOrWithOutExprs=Dimensions +Dims=Dimensions +DimsLoop=Dimensions +Dimsopt=Dimensions +DoStatement=DoStatement +EmptyStatement=EmptyStatement +EnhancedForStatement=EnhancedForStatement +EnhancedForStatementHeader=EnhancedForStatementHeader +EnhancedForStatementHeaderInit=EnhancedForStatementHeaderInit +EnhancedForStatementNoShortIf=EnhancedForStatementNoShortIf +EnterCompilationUnit=EnterCompilationUnit +EnterInstanceCreationArgumentList=EnterInstanceCreationArgumentList +EnterMemberValue=EnterMemberValue +EnterMemberValueArrayInitializer=EnterMemberValueArrayInitializer +EnterVariable=EnterVariable +EnumBody=EnumBody +EnumBodyDeclarationsopt=EnumBodyDeclarationsopt +EnumConstant=EnumConstant +EnumConstantHeader=EnumConstantHeader +EnumConstantHeaderName=EnumConstantHeaderName +EnumConstants=EnumConstants +EnumDeclaration=EnumDeclaration +EnumDeclarations=EnumDeclarations +EnumHeader=EnumHeader +EnumHeaderName=EnumHeaderName +EqualityExpression=Expression +EqualityExpression_NotName=Expression +ExclusiveOrExpression=Expression +ExclusiveOrExpression_NotName=Expression +ExitMemberValue=ExitMemberValue +ExitTryBlock=ExitTryBlock +ExitVariableWithInitialization=ExitVariableWithInitialization +ExitVariableWithoutInitialization=ExitVariableWithoutInitialization +ExplicitConstructorInvocation=ExplicitConstructorInvocation +Expression=Expression +ExpressionStatement=Statement +Expression_NotName=Expression +Expressionopt=Expression +FieldAccess=FieldAccess +FieldDeclaration=FieldDeclaration +Finally=Finally +FloatingPointType=FloatingPointType +ForInit=ForInit +ForInitopt=ForInit +ForStatement=ForStatement +ForStatementNoShortIf=ForStatement +ForUpdate=ForUpdate +ForUpdateopt=ForUpdate +ForceNoDiet=ForceNoDiet +FormalParameter=FormalParameter +FormalParameterList=FormalParameterList +FormalParameterListopt=FormalParameterList +GenericMethodDeclaration=GenericMethodDeclaration +GenericType=GenericType +Goal=Goal +Header1=Header1 +Header2=Header2 +Header=Header +IfThenElseStatement=IfStatement +IfThenElseStatementNoShortIf=IfStatement +IfThenStatement=IfStatement +ImportDeclaration=ImportDeclaration +ImportDeclarations=ImportDeclarations +InclusiveOrExpression=Expression +InclusiveOrExpression_NotName=Expression +Initializer=Initializer +InsideCastExpression=InsideCastExpression +InsideCastExpressionLL1=InsideCastExpression +InsideCastExpressionWithQualifiedGenerics=InsideCastExpression +InstanceofExpression=Expression +InstanceofExpression_NotName=Expression +IntegralType=IntegralType +InterfaceBody=InterfaceBody +InterfaceDeclaration=InterfaceDeclaration +InterfaceHeader=InterfaceHeader +InterfaceHeaderExtends=InterfaceHeaderExtends +InterfaceHeaderExtendsopt=InterfaceHeaderExtends +InterfaceHeaderName1=InterfaceHeaderName +InterfaceHeaderName=InterfaceHeaderName +InterfaceMemberDeclaration=InterfaceMemberDeclaration +InterfaceMemberDeclarations=InterfaceMemberDeclarations +InterfaceMemberDeclarationsopt=InterfaceMemberDeclarations +InterfaceType=InterfaceType +InterfaceTypeList=InterfaceTypeList +InternalCompilationUnit=CompilationUnit +InvalidArrayInitializerAssignement=ArrayInitializerAssignment +InvalidConstructorDeclaration=InvalidConstructorDeclaration +InvalidInitializer=InvalidInitializer +Label=Label +LabeledStatement=LabeledStatement +LabeledStatementNoShortIf=LabeledStatement +Literal=Literal +LocalVariableDeclaration=LocalVariableDeclaration +LocalVariableDeclarationStatement=LocalVariableDeclarationStatement +MarkerAnnotation=MarkerAnnotation +MemberValue=MemberValue +MemberValueArrayInitializer=MemberValueArrayInitializer +MemberValuePair=MemberValuePair +MemberValuePairs=MemberValuePairs +MemberValuePairsopt=MemberValuePairsopt +MemberValues=MemberValues +MethodBody=MethodBody +MethodDeclaration=MethodDeclaration +MethodHeader=MethodDeclaration +MethodHeaderExtendedDims=MethodHeaderExtendedDims +MethodHeaderName=MethodHeaderName +MethodHeaderRightParen=) +MethodHeaderThrowsClause=MethodHeaderThrowsClause +MethodHeaderThrowsClauseopt=MethodHeaderThrowsClause +MethodInvocation=MethodInvocation +Modifier=Modifier +Modifiers=Modifiers +Modifiersopt=Modifiers +MultiplicativeExpression=Expression +MultiplicativeExpression_NotName=Expression +Name=Name +NestedMethod=NestedMethod +NestedType=NestedType +NormalAnnotation=NormalAnnotation +NumericType=NumericType +OneDimLoop=Dimension +OnlySynchronized=OnlySynchronized +OnlyTypeArguments=TypeArguments +OnlyTypeArgumentsForCastExpression=TypeArguments +OpenBlock=OpenBlock +PackageComment=PackageComment +PackageDeclaration=PackageDeclaration +PackageDeclarationName=PackageDeclarationName +PostDecrementExpression=PostDecrementExpression +PostIncrementExpression=PostIncrementExpression +PostfixExpression=Expression +PostfixExpression_NotName=Expression +PreDecrementExpression=PreDecrementExpression +PreIncrementExpression=PreIncrementExpression +Primary=Expression +PrimaryNoNewArray=Expression +PrimitiveType=PrimitiveType +PushLPAREN=( +PushLeftBrace=PushLeftBrace +PushModifiers=PushModifiers +PushModifiersForHeader=PushModifiersForHeader +PushPosition=PushPosition +PushRPAREN=) +PushRealModifiers=PushRealModifiers +QualifiedClassBodyopt=ClassBody +QualifiedEnterAnonymousClassBody=EnterAnonymousClassBody +QualifiedName=QualifiedName +RecoveryMethodHeader=MethodHeader +RecoveryMethodHeaderName=MethodHeaderName +ReduceImports=ReduceImports +ReferenceType1=ReferenceType1 +ReferenceType2=ReferenceType2 +ReferenceType3=ReferenceType3 +ReferenceType=ReferenceType +RelationalExpression=Expression +RelationalExpression_NotName=Expression +Resource=Resource +ResourceSpecification=ResourceSpecification +Resources=Resources +RestoreDiet=RestoreDiet +ReturnStatement=ReturnStatement +ShiftExpression=Expression +ShiftExpression_NotName=Expression +SimpleName=SimpleName +SingleMemberAnnotation=SingleMemberAnnotation +SingleMemberAnnotationMemberValue=MemberValue +SingleStaticImportDeclaration=SingleStaticImportDeclaration +SingleStaticImportDeclarationName=SingleStaticImportDeclarationName +SingleTypeImportDeclaration=SingleTypeImportDeclaration +SingleTypeImportDeclarationName=SingleTypeImportDeclarationName +Statement=Statement +StatementExpression=Expression +StatementExpressionList=StatementExpressionList +StatementNoShortIf=Statement +StatementWithoutTrailingSubstatement=Statement +StaticImportOnDemandDeclaration=StaticImportOnDemandDeclaration +StaticImportOnDemandDeclarationName=StaticImportOnDemandDeclarationName +StaticInitializer=StaticInitializer +StaticOnly=StaticOnly +SwitchBlock=SwitchBlock +SwitchBlockStatement=SwitchBlockStatement +SwitchBlockStatements=SwitchBlockStatements +SwitchLabel=SwitchLabel +SwitchLabels=SwitchLabels +SwitchStatement=SwitchStatement +SynchronizedStatement=SynchronizedStatement +ThrowStatement=ThrowStatement +TrailingSemiColon=; +TryBlock=Block +TryStatement=TryStatement +TryStatementWithResources=TryStatementWithResources +Type=Type +TypeArgument1=TypeArgument1 +TypeArgument2=TypeArgument2 +TypeArgument3=TypeArgument3 +TypeArgument=TypeArgument +TypeArgumentList1=TypeArgumentList1 +TypeArgumentList2=TypeArgumentList2 +TypeArgumentList3=TypeArgumentList3 +TypeArgumentList=TypeArgumentList +TypeArguments=TypeArguments +TypeDeclaration=TypeDeclaration +TypeDeclarations=TypeDeclarations +TypeImportOnDemandDeclaration=TypeImportOnDemandDeclaration +TypeImportOnDemandDeclarationName=TypeImportOnDemandDeclarationName +TypeParameter1=TypeParameter1 +TypeParameter=TypeParameter +TypeParameterHeader=TypeParameter +TypeParameterList1=TypeParameterList1 +TypeParameterList=TypeParameterList +TypeParameters=TypeParameters +UnaryExpression=Expression +UnaryExpressionNotPlusMinus=Expression +UnaryExpressionNotPlusMinus_NotName=Expression +UnaryExpression_NotName=Expression +UnionType=UnionType +UnqualifiedClassBodyopt=ClassBody +UnqualifiedEnterAnonymousClassBody=EnterAnonymousClassBody +VariableDeclarator=VariableDeclarator +VariableDeclaratorId=VariableDeclaratorId +VariableDeclarators=VariableDeclarators +VariableInitializer=VariableInitializer +VariableInitializers=VariableInitializers +WhileStatement=WhileStatement +WhileStatementNoShortIf=WhileStatement +Wildcard1=Wildcard1 +Wildcard2=Wildcard2 +Wildcard3=Wildcard3 +Wildcard=Wildcard +WildcardBounds1=WildcardBounds1 +WildcardBounds2=WildcardBounds2 +WildcardBounds3=WildcardBound3 +WildcardBounds=WildcardBounds diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java index 2a87b52959..15155e4116 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2012 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 @@ -86,7 +86,7 @@ public abstract class SearchParticipant { * Returns a displayable name of this search participant. * <p> * This method should be re-implemented in subclasses that need to - * display a meaningfull name. + * display a meaningful name. * </p> * * @return the displayable name of this search participant @@ -135,14 +135,14 @@ public abstract class SearchParticipant { /** * Locates the matches in the given documents using the given search pattern - * and search scope, and reports them to the givenn search requestor. This + * and search scope, and reports them to the given search requestor. This * method is called by the search engine once it has search documents * matching the given pattern in the given search scope. * <p> * Note that a participant (e.g. a JSP participant) can pre-process the contents of the given documents, * create its own documents whose contents are Java compilation units and delegate the match location * to the default participant (see {@link SearchEngine#getDefaultSearchParticipant()}). Passing its own - * {@link SearchRequestor} this particpant can then map the match positions back to the original + * {@link SearchRequestor} this participant can then map the match positions back to the original * contents, create its own matches and report them to the original requestor. * </p><p> * Implementors of this method should check the progress monitor diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchRequestor.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchRequestor.java index 1bd1f043eb..72841e66f5 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchRequestor.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchRequestor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2012 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,7 @@ public abstract class SearchRequestor { /** * Notification sent after having completed the search action. * Typically, this would tell a search requestor collector that no more - * results will be forthcomping in this search. + * results will be forthcoming in this search. * <p> * The default implementation of this method does nothing. Subclasses * may override. diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorLocator.java index bcc0dd3677..8342e17612 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorLocator.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorLocator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2012 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 @@ -77,11 +77,12 @@ public int match(FieldDeclaration field, MatchingNodeSet nodeSet) { } //public int match(MethodDeclaration node, MatchingNodeSet nodeSet) - SKIP IT /** - * Special case for message send in javadoc comment. They can be in fact bound to a contructor. + * Special case for message send in javadoc comment. They can be in fact bound to a constructor. * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=83285" */ public int match(MessageSend msgSend, MatchingNodeSet nodeSet) { if ((msgSend.bits & ASTNode.InsideJavadoc) == 0) return IMPOSSIBLE_MATCH; + if (!this.pattern.findReferences) return IMPOSSIBLE_MATCH; if (this.pattern.declaringSimpleName == null || CharOperation.equals(msgSend.selector, this.pattern.declaringSimpleName)) { return nodeSet.addMatch(msgSend, this.pattern.mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH); } diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java index d8beb8c6de..0a9a458f76 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java @@ -548,7 +548,7 @@ IMethod createBinaryMethodHandle(IType type, char[] methodSelector, char[][] arg } /* * Create method handle. - * Store occurences for create handle to retrieve possible duplicate ones. + * Store occurrences for create handle to retrieve possible duplicate ones. */ private IJavaElement createMethodHandle(IType type, String methodName, String[] parameterTypeSignatures) { IMethod methodHandle = type.getMethod(methodName, parameterTypeSignatures); |
