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 54137 Details for
Bug 139621
[javadoc][assist] No Javadoc completions if there's no member below
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 4.50 KB, created by
Frederic Fusier
on 2006-11-19 14:54:37 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-11-19 14:54:37 EST
Size:
4.50 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.16 >diff -u -r1.16 JavadocBugsCompletionModelTest.java >--- src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 2 Oct 2006 17:36:31 -0000 1.16 >+++ src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java 19 Nov 2006 19:47:07 -0000 >@@ -798,6 +798,44 @@ > } > > /** >+ * @bug 139621: [javadoc][assist] No Javadoc completions if there's no member below >+ * @test Ensure that completion happens in an orphan javadoc (ie. a javadoc comment not attached to a declaration >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=139621" >+ */ >+public void testBug139621a() throws JavaModelException { >+ String source = >+ "package bugs.b139621;\n" + >+ "public class BasicTestBugs {\n" + >+ " /**\n" + >+ " * This method returns an object\n" + >+ " * @see Obj\n" + >+ " */\n" + >+ "}\n"; >+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj"); >+ assertSortedResults( >+ "Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" >+ ); >+} >+public void testBug139621b() throws JavaModelException { >+ String source = >+ "package bugs.b139621;\n" + >+ "/**\n" + >+ " * This method returns an object\n" + >+ " * @see Test\n" + >+ " */\n" + >+ "public class BasicTestBugs {\n" + >+ " /**\n" + >+ " * This method returns an object\n" + >+ " * @see Obj\n" + >+ " */\n" + >+ "}\n"; >+ completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj"); >+ assertSortedResults( >+ "Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}" >+ ); >+} >+ >+/** > * Bug 144866: [assist][javadoc] Wrong completion inside @value tag > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=144866" > */ >#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.164 >diff -u -r1.164 CompletionParser.java >--- codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 16 Nov 2006 17:53:30 -0000 1.164 >+++ codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java 19 Nov 2006 19:47:21 -0000 >@@ -1770,6 +1770,21 @@ > popElement(K_SELECTOR_INVOCATION_TYPE); > super.consumeClassBodyopt(); > } >+/* (non-Javadoc) >+ * @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeClassDeclaration() >+ */ >+protected void consumeClassDeclaration() { >+ if (this.astPtr >= 0 && this.astStack[this.astPtr] instanceof TypeDeclaration) { >+ TypeDeclaration typeDeclaration = (TypeDeclaration) this.astStack[this.astPtr]; >+ this.javadoc = null; >+ checkComment(); >+ if (this.javadoc != null && this.cursorLocation > this.javadoc.sourceStart && this.cursorLocation < this.javadoc.sourceEnd) { >+ // completion is in an orphan javadoc comment => replace type declaration one with it to allow completion resolution >+ typeDeclaration.javadoc = this.javadoc; >+ } >+ } >+ super.consumeClassDeclaration(); >+} > protected void consumeClassHeaderName1() { > super.consumeClassHeaderName1(); > >Index: buildnotes_jdt-core.html >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v >retrieving revision 1.5552 >diff -u -r1.5552 buildnotes_jdt-core.html >--- buildnotes_jdt-core.html 17 Nov 2006 21:51:55 -0000 1.5552 >+++ buildnotes_jdt-core.html 19 Nov 2006 19:47:15 -0000 >@@ -53,7 +53,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=164946">164946</a> >+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=139621">139621</a> >+[javadoc][assist] No Javadoc completions if there's no member below >+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=164946">164946</a> > Spaces in control statements > <br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=163807">163807</a> > JDT fails to compile legal Java source files
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 139621
: 54137 |
54249
|
54257