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 206119 Details for
Bug 354766
Javadoc content does not appear in content assist info window for non-static inner class constructors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for R_3_7_maintenance
R37maintenance--354766-Javadoc-content-does-not-appe.patch (text/plain), 6.78 KB, created by
Ayushman Jain
on 2011-10-28 05:30:27 EDT
(
hide
)
Description:
patch for R_3_7_maintenance
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-10-28 05:30:27 EDT
Size:
6.78 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java >index d6643d7..cef66ef 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java >@@ -85,6 +85,8 @@ > suite.addTest(new AttachedJavadocTests("testBug334652_2")); > suite.addTest(new AttachedJavadocTests("testBug334652_3")); > suite.addTest(new AttachedJavadocTests("testBug334652_4")); >+ suite.addTest(new AttachedJavadocTests("testBug354766")); >+ suite.addTest(new AttachedJavadocTests("testBug354766_2")); > return suite; > } > >@@ -964,4 +966,82 @@ > this.project.setRawClasspath(entries, null); > } > } >+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=354766 >+ public void testBug354766() throws CoreException, IOException { >+ IClasspathEntry[] entries = this.project.getRawClasspath(); >+ >+ try { >+ IClasspathAttribute attribute = >+ JavaCore.newClasspathAttribute( >+ IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, >+ "jar:platform:/resource/AttachedJavadocProject/bug354766_doc.zip!/"); >+ IClasspathEntry newEntry = JavaCore.newLibraryEntry(new Path("/AttachedJavadocProject/bug354766.jar"), null, null, null, new IClasspathAttribute[] { attribute}, false); >+ this.project.setRawClasspath(new IClasspathEntry[]{newEntry}, null); >+ this.project.getResolvedClasspath(false); >+ >+ IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar")); >+ final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType(); >+ IMethod method = type.getMethod("foo", new String[0]); >+ assertNotNull(method); >+ assertTrue("Does not exist", method.exists()); >+ >+ String javadoc = method.getAttachedJavadoc(null); >+ assertNotNull(javadoc); >+ assertEquals( >+ "Wrong contents", >+ "<H3>\r\n" + >+ "foo</H3>\r\n" + >+ "<PRE>\r\n" + >+ "public void <B>foo</B>()</PRE>\r\n" + >+ "<DL>\r\n" + >+ "<DD>Test method\r\n" + >+ "<P>\r\n" + >+ "<DD><DL>\r\n" + >+ "</DL>\r\n" + >+ "</DD>\r\n" + >+ "</DL>\r\n", >+ javadoc); >+ } finally { >+ this.project.setRawClasspath(entries, null); >+ } >+ } >+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=354766 >+ public void testBug354766_2() throws CoreException, IOException { >+ IClasspathEntry[] entries = this.project.getRawClasspath(); >+ >+ try { >+ IClasspathAttribute attribute = >+ JavaCore.newClasspathAttribute( >+ IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, >+ "jar:platform:/resource/AttachedJavadocProject/bug354766_doc.zip!/"); >+ IClasspathEntry newEntry = JavaCore.newLibraryEntry(new Path("/AttachedJavadocProject/bug354766.jar"), null, null, null, new IClasspathAttribute[] { attribute}, false); >+ this.project.setRawClasspath(new IClasspathEntry[]{newEntry}, null); >+ this.project.getResolvedClasspath(false); >+ >+ IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar")); >+ final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType(); >+ IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass;"}); >+ assertNotNull(method); >+ assertTrue("Does not exist", method.exists()); >+ >+ String javadoc = method.getAttachedJavadoc(null); >+ assertNotNull(javadoc); >+ assertEquals( >+ "Wrong contents", >+ "<H3>\r\n" + >+ "PublicAbstractClass.InnerFinalException</H3>\r\n" + >+ "<PRE>\r\n" + >+ "public <B>PublicAbstractClass.InnerFinalException</B>()</PRE>\r\n" + >+ "<DL>\r\n" + >+ "<DD>javadoc for InnerFinalException()\r\n" + >+ "<P>\r\n" + >+ "</DL>\r\n" + >+ "\r\n" + >+ "<!-- ============ METHOD DETAIL ========== -->\r\n" + >+ "\r\n", >+ javadoc); >+ } finally { >+ this.project.setRawClasspath(entries, null); >+ } >+ } > } >diff --git a/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766.jar b/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766.jar >new file mode 100644 >index 0000000..1525655 >--- /dev/null >+++ b/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766.jar >Binary files differ >diff --git a/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766_doc.zip b/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766_doc.zip >new file mode 100644 >index 0000000..94fc921 >--- /dev/null >+++ b/org.eclipse.jdt.core.tests.model/workspace/AttachedJavadocProject/bug354766_doc.zip >Binary files differ >diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html >index ebee941..100cc60 100644 >--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html >+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html >@@ -79,7 +79,9 @@ > </li> > </ul> > <h3>Problem Reports Fixed</h3> >-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287164">287164</a> >+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=354766">354766</a> >+Javadoc content does not appear in content assist info window for non-static inner class constructors >+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287164">287164</a> > Report build path error if source folder has other source folder as output folder > <br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=359646">359646</a> > Formatter fails silently if Java source contains 0x8000000000000000L >diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java >index 1d22b01..be7b74b 100644 >--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java >+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java >@@ -376,13 +376,8 @@ > } > IType declaringType = this.type; > if (declaringType.isMember()) { >- int depth = 0; > // might need to remove a part of the signature corresponding to the synthetic argument > if (!Flags.isStatic(declaringType.getFlags())) { >- depth++; >- } >- if (depth != 0) { >- // depth is 1 > int indexOfOpeningParen = anchor.indexOf('('); > if (indexOfOpeningParen == -1) return null; > int index = indexOfOpeningParen; >@@ -390,6 +385,10 @@ > int indexOfComma = anchor.indexOf(',', index); > if (indexOfComma != -1) { > index = indexOfComma + 2; >+ >+ } else { >+ // no argument, but a synthetic argument >+ index = anchor.indexOf(')', index); > } > anchor = anchor.substring(0, indexOfOpeningParen) + anchor.substring(index); > }
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 354766
:
201749
|
201750
|
201751
|
201752
|
201753
|
201974
|
202006
|
202008
|
202020
|
206108
| 206119