Package org.jboss.forge.addon.ui.output

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


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

               {
                  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

   {
      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

      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

      }
      else
      {
         Shell provider = context.getProvider();
         UIOutput output = provider.getOutput();
         output.out().println(listMany(newResource.listResources(), context));
         result = Results.success();
      }
      return result;
   }
View Full Code Here

   public Result execute(ShellContext shellContext) throws Exception
   {
      Shell provider = shellContext.getProvider();
      UIOutput output = provider.getOutput();
      FileResource<?> currentResource = provider.getCurrentResource();
      output.out().println(currentResource.getFullyQualifiedName());
      return Results.success();
   }

}
View Full Code Here

      builder.quiet(quiet.getValue());

      try
      {
         builder.build(output.out(), output.err());
      }
      catch (Exception e)
      {
         return Results.fail(e.getMessage(), e);
      }
View Full Code Here

      {
         return Results.fail(e.getMessage(), e);
      }
      finally
      {
         output.out().flush();
         output.err().flush();
      }

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

         result = Results.fail(resourceList.get(0).getName() + ": No such file or directory");
      }
      else
      {
         UIOutput output = shell.getOutput();
         output.out().println(listMany(resourceList, shell));
         result = Results.success();
      }
      return result;
   }
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.