PT #156965730: Get Javadoc from JDT LS or eclipse client via sts/javadoc
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016 Pivotal, Inc.
|
||||
* Copyright (c) 2016, 2018 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -63,6 +63,21 @@ public class Renderables {
|
||||
return htmlBlob(buffer -> buffer.raw(html));
|
||||
}
|
||||
|
||||
public static Renderable mdBlob(String md) {
|
||||
return new Renderable() {
|
||||
|
||||
@Override
|
||||
public void renderAsMarkdown(StringBuilder buffer) {
|
||||
buffer.append(md);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAsHtml(HtmlBuffer buffer) {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static Renderable concat(Renderable... pieces) {
|
||||
return concat(ImmutableList.copyOf(pieces));
|
||||
}
|
||||
@@ -96,6 +111,25 @@ public class Renderables {
|
||||
};
|
||||
}
|
||||
|
||||
public static Renderable inlineSnippet(Renderable text) {
|
||||
return new Renderable() {
|
||||
|
||||
@Override
|
||||
public void renderAsMarkdown(StringBuilder buffer) {
|
||||
buffer.append("`");
|
||||
text.renderAsMarkdown(buffer);
|
||||
buffer.append("`");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAsHtml(HtmlBuffer buffer) {
|
||||
buffer.raw("<pre>");
|
||||
text.renderAsHtml(buffer);
|
||||
buffer.raw("</pre>");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static Renderable paragraph(Renderable text) {
|
||||
return new Renderable() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user