use of org.eclipse.che.jdt.JavadocFinder in project che by eclipse.
the class JavadocService method findJavadoc.
@GET
@Path("find")
@Produces("text/html")
public String findJavadoc(@QueryParam("fqn") String fqn, @QueryParam("projectpath") String projectPath, @QueryParam("offset") int offset) throws JavaModelException {
final IJavaProject project = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProject(projectPath);
final String urlPart = getUrlPart(projectPath);
return new JavadocFinder(urlPart).findJavadoc(project, fqn, offset);
}
use of org.eclipse.che.jdt.JavadocFinder in project che by eclipse.
the class JavadocService method get.
@GET
@Path("get")
@Produces("text/html")
public String get(@QueryParam("handle") String handle, @QueryParam("projectpath") String projectPath) {
final IJavaProject project = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProject(projectPath);
final String urlPart = getUrlPart(projectPath);
return new JavadocFinder(urlPart).findJavadoc4Handle(project, handle);
}
use of org.eclipse.che.jdt.JavadocFinder in project che by eclipse.
the class JavadocFromSourceTest method methodHandleWithParam.
@Test
public void methodHandleWithParam() throws JavaModelException, URISyntaxException, UnsupportedEncodingException {
JavadocFinder finder = new JavadocFinder("test");
String javadoc = finder.findJavadoc(project, "org.eclipse.che.test.MyClass", 1639);
assertThat(javadoc).isNotNull().contains("Method with param and exception");
}
Aggregations