|
Lines 86-91
Link Here
|
| 86 |
suite.addTest(new AttachedJavadocTests("testBug334652_3")); |
86 |
suite.addTest(new AttachedJavadocTests("testBug334652_3")); |
| 87 |
suite.addTest(new AttachedJavadocTests("testBug334652_4")); |
87 |
suite.addTest(new AttachedJavadocTests("testBug334652_4")); |
| 88 |
suite.addTest(new AttachedJavadocTests("testBug354766")); |
88 |
suite.addTest(new AttachedJavadocTests("testBug354766")); |
|
|
89 |
suite.addTest(new AttachedJavadocTests("testBug354766_2")); |
| 89 |
return suite; |
90 |
return suite; |
| 90 |
} |
91 |
} |
| 91 |
|
92 |
|
|
Lines 1004-1007
Link Here
|
| 1004 |
this.project.setRawClasspath(entries, null); |
1005 |
this.project.setRawClasspath(entries, null); |
| 1005 |
} |
1006 |
} |
| 1006 |
} |
1007 |
} |
|
|
1008 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=354766 |
| 1009 |
public void testBug354766_2() throws CoreException, IOException { |
| 1010 |
IClasspathEntry[] entries = this.project.getRawClasspath(); |
| 1011 |
|
| 1012 |
try { |
| 1013 |
IClasspathAttribute attribute = |
| 1014 |
JavaCore.newClasspathAttribute( |
| 1015 |
IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, |
| 1016 |
"jar:platform:/resource/AttachedJavadocProject/bug354766_doc.zip!/"); |
| 1017 |
IClasspathEntry newEntry = JavaCore.newLibraryEntry(new Path("/AttachedJavadocProject/bug354766.jar"), null, null, null, new IClasspathAttribute[] { attribute}, false); |
| 1018 |
this.project.setRawClasspath(new IClasspathEntry[]{newEntry}, null); |
| 1019 |
this.project.getResolvedClasspath(false); |
| 1020 |
|
| 1021 |
IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar")); |
| 1022 |
final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType(); |
| 1023 |
IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass;"}); |
| 1024 |
assertNotNull(method); |
| 1025 |
assertTrue("Does not exist", method.exists()); |
| 1026 |
|
| 1027 |
String javadoc = method.getAttachedJavadoc(null); |
| 1028 |
assertNotNull(javadoc); |
| 1029 |
assertEquals( |
| 1030 |
"Wrong contents", |
| 1031 |
"<H3>\r\n" + |
| 1032 |
"PublicAbstractClass.InnerFinalException</H3>\r\n" + |
| 1033 |
"<PRE>\r\n" + |
| 1034 |
"public <B>PublicAbstractClass.InnerFinalException</B>()</PRE>\r\n" + |
| 1035 |
"<DL>\r\n" + |
| 1036 |
"<DD>javadoc for InnerFinalException()\r\n" + |
| 1037 |
"<P>\r\n" + |
| 1038 |
"</DL>\r\n" + |
| 1039 |
"\r\n" + |
| 1040 |
"<!-- ============ METHOD DETAIL ========== -->\r\n" + |
| 1041 |
"\r\n", |
| 1042 |
javadoc); |
| 1043 |
} finally { |
| 1044 |
this.project.setRawClasspath(entries, null); |
| 1045 |
} |
| 1046 |
} |
| 1007 |
} |
1047 |
} |