Examples of out()


Examples of org.jboss.aesh.terminal.Shell.out()

    private void rmDir(Resource r, CommandInvocation commandInvocation) throws InterruptedException {
        Shell shell = commandInvocation.getShell();
        if (r.exists()) {
            if (r.isDirectory()) {
                if (interactive) {
                    shell.out().println("remove directory '" + r.getName() + "' ? (y/n)");
                    CommandOperation operation = commandInvocation.getInput();
                    if (operation.getInputKey() == Key.y) {
                        r.delete();
                    }
                } else {
View Full Code Here

Examples of org.jboss.aesh.terminal.Shell.out()

                } else {
                    r.delete();
                }

                if (verbose) {
                    shell.out().println("removed directory: '" + r.getName() + "'");
                }
            }
        }
    }
View Full Code Here

Examples of org.jboss.aesh.terminal.Shell.out()

    public CommandResult execute(CommandInvocation commandInvocation) throws IOException {

        Shell shell = commandInvocation.getShell();

        if (help || arguments == null || arguments.isEmpty()) {
            shell.out().println(commandInvocation.getHelpInfo("echo"));
            return CommandResult.SUCCESS;
        }

        String stdout = "";
        for (String s : arguments) {
View Full Code Here

Examples of org.jboss.aesh.terminal.Shell.out()

        for (String s : arguments) {
            stdout += s + " ";
        }
        stdout = stdout.trim();

        shell.out().println(stdout);

        return CommandResult.SUCCESS;
    }

}
View Full Code Here

Examples of org.jboss.forge.addon.ui.output.UIOutput.out()

                  + " > "
                  + new TerminalString(name, new TerminalColor(enabled ? Color.CYAN : Color.RED,
                           Color.DEFAULT)).toString() + " - " + metadata.getDescription());
      }
      UIOutput output = uiContext.getProvider().getOutput();
      PrintStream out = output.out();
      out.println(Parser.formatDisplayList(display.toArray(new String[display.size()]),
               terminalSize.getHeight(), terminalSize.getWidth()));

      return Results.success();
   }
View Full Code Here

Examples of org.jboss.forge.addon.ui.output.UIOutput.out()

         {
            try
            {
               if (color.getValue())
               {
                  highlighter.byFileName(resource.getName(), resource.getContents(), output.out());
               }
               else
               {
                  output.out().println(resource.getContents());
               }
View Full Code Here

Examples of org.jboss.forge.addon.ui.output.UIOutput.out()

               {
                  highlighter.byFileName(resource.getName(), resource.getContents(), output.out());
               }
               else
               {
                  output.out().println(resource.getContents());
               }
            }
            catch (UnsupportedOperationException uoe)
            {
               output.err().println("cat: " + resource.getName() + ": " + uoe.getMessage());
View Full Code Here

Examples of org.jboss.forge.addon.ui.output.UIOutput.out()

   {
      UIProvider provider = context.getUIContext().getProvider();
      UIOutput output = provider.getOutput();
      UIPrompt prompt = context.getPrompt();
      boolean answer = prompt.promptBoolean("Do you love Forge 2?");
      output.out().println("You answered: " + answer);
      return null;
   }

}
View Full Code Here

Examples of org.jboss.forge.addon.ui.output.UIOutput.out()

      try
      {
         updateFurnaceVersion(project);
         project.getFacet(PackagingFacet.class).createBuilder().addArguments("clean", "install")
                  .runTests(false)
                  .build(output.out(), output.err());
      }
      catch (BuildException e)
      {
         return Results.fail("Unable to execute project build", e);
      }
View Full Code Here

Examples of org.jcsp.lang.Any2OneChannel.out()

    public void run() {
        System.out.println("MeetingAccessClient has started");
        final Any2OneChannel events = Channel.createAny2One();
        final CSProcess[] network = {
                new AccessClientCapability(events.in()),
                new AccessClientUserInterface(events.out())
        };
        new Parallel(network).run();
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.