use of org.eclipse.lsp4j.SignatureHelp in project eclipse.jdt.ls by eclipse.
the class SignatureHelpHandlerTest method testSignatureHelp_javadoc.
@Test
public void testSignatureHelp_javadoc() throws JavaModelException {
IPackageFragment pack1 = sourceFolder.createPackageFragment("test1", false, null);
StringBuilder buf = new StringBuilder();
buf.append("package test1;\n");
buf.append("public class E {\n");
buf.append("/**\n");
buf.append(" * @see String#substring()\n");
buf.append(" */\n");
buf.append(" public int test() {}\n");
buf.append("}\n");
ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
SignatureHelp help = getSignatureHelp(cu, 3, 25);
assertNotNull(help);
assertEquals(2, help.getSignatures().size());
assertTrue(help.getSignatures().get(help.getActiveSignature()).getLabel().matches("substring\\(\\w+ \\w+\\) : String"));
}
Aggregations