Search in sources :

Example 1 with PluginToolModel

use of org.eclipse.ceylon.common.tool.PluginToolModel 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;
}
Also used : Summary(org.eclipse.ceylon.common.tool.Summary) ResourceBundle(java.util.ResourceBundle) ScriptToolModel(org.eclipse.ceylon.common.tool.ScriptToolModel) PluginToolModel(org.eclipse.ceylon.common.tool.PluginToolModel)

Aggregations

ResourceBundle (java.util.ResourceBundle)1 PluginToolModel (org.eclipse.ceylon.common.tool.PluginToolModel)1 ScriptToolModel (org.eclipse.ceylon.common.tool.ScriptToolModel)1 Summary (org.eclipse.ceylon.common.tool.Summary)1