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 202008 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]
Complement + regression test.
patch_354766_2.txt (text/plain), 4.21 KB, created by
Olivier Thomann
on 2011-08-23 10:55:21 EDT
(
hide
)
Description:
Complement + regression test.
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2011-08-23 10:55:21 EDT
Size:
4.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavadocContents.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java,v >retrieving revision 1.6 >diff -u -r1.6 JavadocContents.java >--- model/org/eclipse/jdt/internal/core/JavadocContents.java 19 Aug 2011 02:58:24 -0000 1.6 >+++ model/org/eclipse/jdt/internal/core/JavadocContents.java 23 Aug 2011 14:54:04 -0000 >@@ -378,13 +378,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 (only for constructor) > if (method.isConstructor() && !Flags.isStatic(declaringType.getFlags())) { >- depth++; >- } >- if (depth != 0) { >- // depth is 1 > int indexOfOpeningParen = anchor.indexOf('('); > if (indexOfOpeningParen == -1) { > // should not happen as this is a method signature >@@ -395,8 +390,11 @@ > int indexOfComma = anchor.indexOf(',', index); > if (indexOfComma != -1) { > index = indexOfComma + 2; >- anchor = anchor.substring(0, indexOfOpeningParen) + anchor.substring(index); >+ } else { >+ // no argument, but a synthetic argument >+ index = anchor.indexOf(')', index); > } >+ anchor = anchor.substring(0, indexOfOpeningParen) + anchor.substring(index); > } > } > return anchor + JavadocConstants.ANCHOR_PREFIX_END; >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java,v >retrieving revision 1.42 >diff -u -r1.42 AttachedJavadocTests.java >--- src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java 19 Aug 2011 02:58:24 -0000 1.42 >+++ src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java 23 Aug 2011 14:54:04 -0000 >@@ -86,6 +86,7 @@ > 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; > } > >@@ -1004,4 +1005,43 @@ > 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); >+ } >+ } > }
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