Search in sources :

Example 6 with CeylonHelpTool

use of org.eclipse.ceylon.common.tools.help.CeylonHelpTool in project ceylon by eclipse.

the class HelpToolTests method testHelpDoc.

@Test
public void testHelpDoc() {
    ToolModel<CeylonHelpTool> model = pluginLoader.loadToolModel("help");
    Assert.assertNotNull(model);
    CeylonHelpTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("doc"));
    tool.run();
}
Also used : CeylonHelpTool(org.eclipse.ceylon.common.tools.help.CeylonHelpTool) Test(org.junit.Test)

Example 7 with CeylonHelpTool

use of org.eclipse.ceylon.common.tools.help.CeylonHelpTool in project ceylon by eclipse.

the class HelpToolTests method testHelpImportJar.

@Test
public void testHelpImportJar() {
    ToolModel<CeylonHelpTool> model = pluginLoader.loadToolModel("help");
    Assert.assertNotNull(model);
    CeylonHelpTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("import-jar"));
    tool.run();
}
Also used : CeylonHelpTool(org.eclipse.ceylon.common.tools.help.CeylonHelpTool) Test(org.junit.Test)

Example 8 with CeylonHelpTool

use of org.eclipse.ceylon.common.tools.help.CeylonHelpTool in project ceylon by eclipse.

the class Usage method printOptions.

private void printOptions(String option) throws Exception {
    // Call the help tool to generate the usage
    out.flush();
    // TODO Because the help tool doesn't understand subcommands
    // it is unable to help about options to subcommands
    // Can't call rootTool.bootstrap() because that would replace the
    // rootTool's toolName, which we need when printing option suggestions
    CeylonHelpTool r = new CeylonHelpTool();
    r.setToolLoader(rootTool.getPluginLoader());
    r.setOptions(option != null ? option : "");
    r.run();
}
Also used : CeylonHelpTool(org.eclipse.ceylon.common.tools.help.CeylonHelpTool)

Example 9 with CeylonHelpTool

use of org.eclipse.ceylon.common.tools.help.CeylonHelpTool in project ceylon by eclipse.

the class HelpToolTests method testHelpDocTool.

@Test
public void testHelpDocTool() {
    ToolModel<CeylonHelpTool> model = pluginLoader.loadToolModel("help");
    Assert.assertNotNull(model);
    CeylonHelpTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("doc-tool"));
    tool.run();
}
Also used : CeylonHelpTool(org.eclipse.ceylon.common.tools.help.CeylonHelpTool) Test(org.junit.Test)

Aggregations

CeylonHelpTool (org.eclipse.ceylon.common.tools.help.CeylonHelpTool)9 Test (org.junit.Test)6 StringWriter (java.io.StringWriter)1 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1