Lines 386-392
Link Here
|
386 |
|
386 |
|
387 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
387 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
388 |
public void test018() throws JavaModelException { |
388 |
public void test018() throws JavaModelException { |
389 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
389 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2/p3"); //$NON-NLS-1$ |
390 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
390 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
391 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
391 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
392 |
assertNotNull(classFile); |
392 |
assertNotNull(classFile); |
Lines 397-403
Link Here
|
397 |
IMethod method = methods[i]; |
397 |
IMethod method = methods[i]; |
398 |
String javadoc = method.getAttachedJavadoc(monitor); |
398 |
String javadoc = method.getAttachedJavadoc(monitor); |
399 |
assertNotNull("Should have a javadoc", javadoc); |
399 |
assertNotNull("Should have a javadoc", javadoc); |
400 |
assertTrue("Wrong doc", javadoc.indexOf(method.getElementName()) != -1); |
400 |
final String selector = method.getElementName(); |
|
|
401 |
assertTrue("Wrong doc", javadoc.indexOf(selector) != -1); |
401 |
} |
402 |
} |
402 |
} |
403 |
} |
|
|
404 |
|
405 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
406 |
public void test019() throws JavaModelException { |
407 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2/p3"); //$NON-NLS-1$ |
408 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
409 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
410 |
assertNotNull(classFile); |
411 |
IType type = classFile.getType(); |
412 |
IMethod method = type.getMethod("bar5", new String[] {"Ljava.util.Map<TK;TV;>;", "I", "Ljava.util.Map<TK;TV;>;"}); //$NON-NLS-1$ |
413 |
assertTrue(method.exists()); |
414 |
String javadoc = method.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$ |
415 |
assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$ |
416 |
String[] names = method.getParameterNames(); |
417 |
assertNotNull("No names", names); |
418 |
assertEquals("Wrong size", 3, names.length); |
419 |
assertEquals("Wrong parameter name", "m", names[0]); |
420 |
assertEquals("Wrong parameter name", "j", names[1]); |
421 |
assertEquals("Wrong parameter name", "m2", names[2]); |
422 |
} |
403 |
} |
423 |
} |