Search in sources :

Example 6 with SelectionRange

use of org.eclipse.lsp4j.SelectionRange in project eclipse.jdt.ls by eclipse.

the class SelectionRangeHandlerTest method testJavadoc.

@Test
public void testJavadoc() throws CoreException {
    SelectionRange range = getSelectionRange("org.sample.Foo4", new Position(9, 31));
    assertTrue(validateSelectionRange(// text element
    range, // text element
    new Range(new Position(9, 4), new Position(9, 40)), // tag element
    new Range(new Position(9, 4), new Position(9, 40)), // javadoc
    new Range(new Position(8, 1), new Position(10, 4)), // method declaration
    new Range(new Position(8, 1), new Position(16, 2)), TYPE_DECL_RANGE, COMP_UNIT_RAGE));
}
Also used : SelectionRange(org.eclipse.lsp4j.SelectionRange) Position(org.eclipse.lsp4j.Position) Range(org.eclipse.lsp4j.Range) SelectionRange(org.eclipse.lsp4j.SelectionRange) Test(org.junit.Test) AbstractProjectsManagerBasedTest(org.eclipse.jdt.ls.core.internal.managers.AbstractProjectsManagerBasedTest)

Aggregations

Position (org.eclipse.lsp4j.Position)6 Range (org.eclipse.lsp4j.Range)6 SelectionRange (org.eclipse.lsp4j.SelectionRange)6 AbstractProjectsManagerBasedTest (org.eclipse.jdt.ls.core.internal.managers.AbstractProjectsManagerBasedTest)5 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)1 ITypeRoot (org.eclipse.jdt.core.ITypeRoot)1 JavaModelException (org.eclipse.jdt.core.JavaModelException)1 ASTNode (org.eclipse.jdt.core.dom.ASTNode)1 Comment (org.eclipse.jdt.core.dom.Comment)1 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)1 Javadoc (org.eclipse.jdt.core.dom.Javadoc)1