use of org.eclipse.lsp4j.Hover in project sts4 by spring-projects.
the class Editor method assertHoverText.
/**
* Verifies an expected textSnippet is contained in the hover text that is
* computed when hovering mouse at position at the end of first occurrence of
* a given string in the editor.
*/
public void assertHoverText(String afterString, String expectSnippet) throws Exception {
int pos = getRawText().indexOf(afterString);
if (pos >= 0) {
pos += afterString.length();
}
Hover hover = harness.getHover(doc, doc.toPosition(pos));
assertContains(expectSnippet, hoverString(hover));
}
Aggregations