Merge branches 'master' and 'master' of github.com:spring-projects/sts4

This commit is contained in:
Kris De Volder
2016-12-12 15:23:55 -08:00
5 changed files with 39 additions and 13 deletions

View File

@@ -24,12 +24,14 @@ public class InformationTemplates {
public static Renderable createHover(PropertyInfo info) {
Deprecation deprecation = createDeprecation(info);
return InformationTemplates.createHover(info.getId(), info.getType(), info.getDefaultValue(), text(info.getDescription()), deprecation);
Renderable description = info.getDescription() == null ? null : text(info.getDescription());
return InformationTemplates.createHover(info.getId(), info.getType(), info.getDefaultValue(), description, deprecation);
}
public static Renderable createCompletionDocumentation(PropertyInfo info) {
Deprecation deprecation = createDeprecation(info);
return InformationTemplates.createCompletionDocumentation(text(info.getDescription()), info.getDefaultValue(), deprecation);
Renderable description = info.getDescription() == null ? null : text(info.getDescription());
return InformationTemplates.createCompletionDocumentation(description, info.getDefaultValue(), deprecation);
}
public static Renderable createHover(String id, String type, Object defaultValue, Renderable description, Deprecation deprecation) {

View File

@@ -1577,6 +1577,14 @@ public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest {
editor.assertNoHover("ggggg.kkkk");
}
@Test public void testEmptyDescriptionHover() throws Exception {
data("debug", "java.lang.String", null, null);
Editor editor = newEditor(
"debug=something\n"
);
editor.assertHoverExactText("debug", "[**debug** \n[java.lang.String](null)]");
}
@Override
protected SimpleLanguageServer newLanguageServer() {
BootPropertiesLanguageServer server = new BootPropertiesLanguageServer(md.getIndexProvider(), typeUtilProvider, javaProjectFinder);