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 108164 Details for
Bug 230830
[select] Search doesn't find annotated local variable declaration with error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug230830_001.txt (text/plain), 4.30 KB, created by
David Audel
on 2008-07-23 03:22:27 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-07-23 03:22:27 EDT
Size:
4.30 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java,v >retrieving revision 1.62 >diff -u -r1.62 ResolveTests_1_5.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 16 Jul 2008 09:08:18 -0000 1.62 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java 22 Jul 2008 12:27:41 -0000 >@@ -2704,4 +2704,75 @@ > elements > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=230830 >+public void test0117() throws Exception { >+ this.workingCopies = new ICompilationUnit[2]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Resolve/src/test/Test.java", >+ "package test;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " public void foo() {\n" + >+ " @A(n=) String str;\n" + >+ " }\n" + >+ "}"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Resolve/src/test/A.java", >+ "package test;\n" + >+ "\n" + >+ "public @interface A {\n" + >+ " public String n();\n" + >+ "}"); >+ >+ >+ String str = this.workingCopies[0].getSource(); >+ int start = str.lastIndexOf("str"); >+ int length = "str".length(); >+ IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner); >+ >+ assertElementsEqual( >+ "Unexpected elements", >+ "str [in foo() [in Test [in [Working copy] Test.java [in test [in src [in Resolve]]]]]]", >+ elements >+ ); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=230830 >+public void test0118() throws Exception { >+ this.workingCopies = new ICompilationUnit[2]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Resolve/src/test/Test.java", >+ "package test;\n" + >+ "\n" + >+ "public class Test {\n" + >+ " public void foo() {\n" + >+ " @A(n=) String str;\n" + >+ " }\n" + >+ "}"); >+ >+ this.workingCopies[1] = getWorkingCopy( >+ "/Resolve/src/test/A.java", >+ "package test;\n" + >+ "\n" + >+ "public @interface A {\n" + >+ " public String n();\n" + >+ "}"); >+ >+ >+ String str = this.workingCopies[0].getSource(); >+ int start = str.lastIndexOf("str"); >+ int length = "str".length(); >+ IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner); >+ >+ if (elements != null && >+ elements.length > 0 && >+ elements[0] instanceof IAnnotatable) { >+ IAnnotation[] annotations = ((IAnnotatable)elements[0]).getAnnotations(); >+ assertAnnotationsEqual( >+ "@A(n=<null>)\n", >+ annotations); >+ } else { >+ assertTrue("Unexpected elements", false); >+ } >+} > } >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java,v >retrieving revision 1.196 >diff -u -r1.196 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 17 Jul 2008 09:57:30 -0000 1.196 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 22 Jul 2008 12:27:46 -0000 >@@ -168,6 +168,7 @@ > super(problemReporter); > this.reportSyntaxErrorIsRequired = false; > this.javadocParser.checkDocComment = true; >+ this.annotationRecoveryActivated = false; > if (storeExtraSourceEnds) { > this.storeSourceEnds = true; > this.sourceEnds = new HashtableOfObjectToInt(); >Index: codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java,v >retrieving revision 1.85 >diff -u -r1.85 AssistParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 27 Jun 2008 16:04:06 -0000 1.85 >+++ codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java 22 Jul 2008 12:27:47 -0000 >@@ -80,7 +80,6 @@ > > setMethodsFullRecovery(false); > setStatementsRecovery(false); >- this.annotationRecoveryActivated = false; > } > public abstract char[] assistIdentifier(); > public int bodyEnd(AbstractMethodDeclaration method){
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 230830
: 108164