added html rendering to java boot hovers
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
package org.springframework.tooling.boot.java.ls.jdt;
|
||||
|
||||
import org.eclipse.jdt.ui.text.java.hover.IJavaEditorTextHover;
|
||||
import org.eclipse.jface.text.IInformationControlCreator;
|
||||
import org.eclipse.jface.text.IRegion;
|
||||
import org.eclipse.jface.text.ITextHoverExtension;
|
||||
import org.eclipse.jface.text.ITextViewer;
|
||||
import org.eclipse.lsp4e.operations.hover.LSBasedHover;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
@@ -20,7 +22,7 @@ import org.eclipse.ui.IEditorPart;
|
||||
* @author Martin Lippert
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class SpringBootJavaHoverProvider implements IJavaEditorTextHover {
|
||||
public class SpringBootJavaHoverProvider implements IJavaEditorTextHover, ITextHoverExtension {
|
||||
|
||||
private LSBasedHover lsBasedHover;
|
||||
|
||||
@@ -42,4 +44,9 @@ public class SpringBootJavaHoverProvider implements IJavaEditorTextHover {
|
||||
public void setEditor(IEditorPart editor) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInformationControlCreator getHoverControlCreator() {
|
||||
return this.lsBasedHover.getHoverControlCreator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RequestMappingHoverProvider {
|
||||
while (keys.hasNext()) {
|
||||
String key = keys.next();
|
||||
if (doesMatch(annotation, key)) {
|
||||
hoverContent.add(Either.forLeft(key));
|
||||
hoverContent.add(Either.forLeft(key + " - [url of the mapping](http://localhost:8080/path)"));
|
||||
hoverContent.add(Either.forLeft(jsonObject.get(key).toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user