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 45566 Details for
Bug 148742
[5.0][content assist] Annotation content assist not working in all cases for parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch001.txt (text/plain), 5.68 KB, created by
David Audel
on 2006-06-30 04:50:59 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
David Audel
Created:
2006-06-30 04:50:59 EDT
Size:
5.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.157 >diff -u -r1.157 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 21 Apr 2006 12:48:26 -0000 1.157 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 30 Jun 2006 08:53:20 -0000 >@@ -207,6 +207,16 @@ > new CompletionOnFieldType((TypeReference)orphan, true), 0); > return; > } >+ >+ if(orphan instanceof Annotation) { >+ TypeDeclaration fakeType = >+ new CompletionOnAnnotationOfType( >+ FAKE_TYPE_NAME, >+ this.compilationUnit.compilationResult(), >+ (Annotation)orphan); >+ currentElement.parent.add(fakeType, 0); >+ return; >+ } > } > } > >Index: buildnotes_jdt-core.html >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v >retrieving revision 1.5338 >diff -u -r1.5338 buildnotes_jdt-core.html >--- buildnotes_jdt-core.html 29 Jun 2006 16:36:48 -0000 1.5338 >+++ buildnotes_jdt-core.html 30 Jun 2006 08:53:19 -0000 >@@ -52,7 +52,9 @@ > <h2>What's new in this drop</h2> > > <h3>Problem Reports Fixed</h3> >-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=117302">117302</a> >+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=148742">148742</a> >+[5.0][content assist] Annotation content assist not working in all cases for parameters >+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=117302">117302</a> > Clean build of large project gives unresolved type errors > <br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=147875">147875</a> > [1.5][compiler] NPE when initializing annotations of a binary field >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java,v >retrieving revision 1.12 >diff -u -r1.12 AnnotationCompletionParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java 29 Mar 2006 03:50:23 -0000 1.12 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java 30 Jun 2006 08:53:24 -0000 >@@ -712,6 +712,7 @@ > String expectedReplacedSource = "MyAnn"; > String expectedUnitDisplayString = > "public class X {\n" + >+ " @<CompleteOnType:MyAnn>\n" + > " public X() {\n" + > " }\n" + > " void foo() {\n" + >@@ -727,29 +728,6 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "MyAnn"; >- expectedReplacedSource = "MyAnn"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " @<CompleteOnType:MyAnn>\n" + >- " }\n" + >- "}\n"; >- >- checkMethodParse( >- str.toCharArray(), >- cursorLocation, >- expectedCompletionNodeToString, >- expectedParentNodeToString, >- expectedUnitDisplayString, >- completionIdentifier, >- expectedReplacedSource, >- "full ast"); > } > public void test0024(){ > String str = >@@ -4645,4 +4623,67 @@ > expectedReplacedSource, > "diet ast"); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=148742 >+public void test0125(){ >+ String str = >+ "public interface X {\n" + >+ " public void test(@TestAnnotation int testParam);\n" + >+ "}"; >+ >+ >+ String completeBehind = "@TestAnnotation"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "@<CompleteOnType:TestAnnotation>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "TestAnnotation"; >+ String expectedReplacedSource = "TestAnnotation"; >+ String expectedUnitDisplayString = >+ "public interface X {\n" + >+ " @<CompleteOnType:TestAnnotation>\n" + >+ " public void test() {\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkDietParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "diet ast"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=148742 >+public void test0126(){ >+ String str = >+ "public abstract class X {\n" + >+ " public abstract void test(@TestAnnotation int testParam);\n" + >+ "}"; >+ >+ >+ String completeBehind = "@TestAnnotation"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "@<CompleteOnType:TestAnnotation>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "TestAnnotation"; >+ String expectedReplacedSource = "TestAnnotation"; >+ String expectedUnitDisplayString = >+ "public abstract class X {\n" + >+ " @<CompleteOnType:TestAnnotation>\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public abstract void test();\n" + >+ "}\n"; >+ >+ checkDietParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "diet ast"); >+} > }
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 148742
: 45566