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 67072 Details for
Bug 185576
[javadoc][assist] Type parameters should not be proposed while completing in @link or @see reference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
[patch]: proposed fix + test cases
b185576_on_top_v758.txt (text/plain), 3.51 KB, created by
Eric Jodet
on 2007-05-14 11:03:04 EDT
(
hide
)
Description:
[patch]: proposed fix + test cases
Filename:
MIME Type:
Creator:
Eric Jodet
Created:
2007-05-14 11:03:04 EDT
Size:
3.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.327 >diff -u -r1.327 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 26 Apr 2007 11:27:48 -0000 1.327 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 14 May 2007 14:53:22 -0000 >@@ -6499,7 +6499,7 @@ > > if (!skip && proposeType && scope.enclosingSourceType() != null) { > findNestedTypes(token, scope.enclosingSourceType(), scope, proposeAllMemberTypes, typesFound); >- if(!assistNodeIsConstructor && !assistNodeIsAnnotation) { >+ if((!assistNodeIsConstructor && !assistNodeIsAnnotation) && this.assistNodeInJavadoc == 0) { > // don't propose type parameters if the completion is a constructor ('new |') > findTypeParameters(token, scope); > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java,v >retrieving revision 1.21 >diff -u -r1.21 JavadocBugsCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 2 Mar 2007 14:38:41 -0000 1.21 >+++ src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 14 May 2007 14:53:35 -0000 >@@ -1058,4 +1058,50 @@ > completeInJavadoc("/Completion/src/bugs/b171031/BasicTestBugs.java", source, true, "@In", 1); > assertSortedResults(""); // should not have any proposal as > } >+ >+/** >+ * @bug 185576: [javadoc][assist] Type parameters should not be proposed while completing in @link or @see reference >+ * @test Do not include type params in Javadoc content assist proposals >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=185576" >+ */ >+public void testBug185576a() throws JavaModelException { >+ String source = >+ "package bugs.b185576;\n" + >+ "public class BasicTestBugs {\n" + >+ "/**\n" + >+ " * The return type {@link } and that is all.\n" + >+ " * @param <X>\n" + >+ " * @param t\n" + >+ " * @return something.\n" + >+ " */\n" + >+ " public <X> X foooo(X t)\n" + >+ " {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n"; >+ completeInJavadoc("/Completion/src/bugs/b185576/BasicTestBugs.java", source, true, "@link ", 1); >+ assertSortedResults(""); // should not have any proposal as >+} >+ >+public void testBug185576b() throws JavaModelException { >+ String source = >+ "package bugs.b185576;\n" + >+ "public class BasicTestBugs {\n" + >+ "/**\n" + >+ " * The return type {@link } and that is all.\n" + >+ " * @param <X>\n" + >+ " * @param t\n" + >+ " * @return something.\n" + >+ " */\n" + >+ " public <X> X foooo(X t)\n" + >+ " {\n" + >+ " return null;\n" + >+ " }\n" + >+ " public class X {}\n" + >+ "}\n"; >+ completeInJavadoc("/Completion/src/bugs/b185576/BasicTestBugs.java", source, true, "@link ", 1); >+ assertSortedResults( >+ "BasicTestBugs[TYPE_REF]{BasicTestBugs, bugs.b185576, Lbugs.b185576.BasicTestBugs;, null, null, [83, 83], 22}\n" + >+ "BasicTestBugs.X[TYPE_REF]{X, bugs.b185576, Lbugs.b185576.BasicTestBugs$X;, null, null, [83, 83], 22}"); >+} > }
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 185576
:
67072
|
67098