use of org.eclipse.ceylon.common.tool.ScriptToolModel in project ceylon by eclipse.
the class DocBuilder method getDescription.
public static String getDescription(ToolModel<?> model) {
if (model instanceof ScriptToolModel) {
return invokeScript((ScriptToolModel<?>) model, "--_print-description");
}
AnnotatedToolModel<?> amodel = (AnnotatedToolModel<?>) model;
ResourceBundle toolBundle = getToolBundle(model);
String msg = msg(toolBundle, "description");
if (msg.isEmpty()) {
Description description = amodel.getToolClass().getAnnotation(Description.class);
if (description != null) {
msg = description.value();
}
}
return msg;
}
use of org.eclipse.ceylon.common.tool.ScriptToolModel in project ceylon by eclipse.
the class DocBuilder method getSummaryValue.
public static String getSummaryValue(ToolModel<?> model) {
if (model instanceof ScriptToolModel) {
return invokeScript((ScriptToolModel<?>) model, "--_print-summary");
}
if (model instanceof PluginToolModel) {
return ((PluginToolModel<?>) model).getToolSummary();
}
ResourceBundle toolBundle = getToolBundle(model);
String msg = msg(toolBundle, "summary");
if (msg.isEmpty()) {
Summary summary = getSummary(model);
if (summary != null) {
msg = summary.value();
}
}
return msg;
}
Aggregations