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

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


               {
                  final PipedOutputStream stdin = new PipedOutputStream();
                  BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));

                  PrintStream stdout = new UncloseablePrintStream(output.out());
                  PrintStream stderr = new UncloseablePrintStream(output.err());
                 
                  Shell currentShell = (Shell) uiContext.getProvider();
                  final TerminalSize terminalSize = currentShell.getConsole().getShell().getSize();
                  ForgeTerminal terminal = new ForgeTerminal(
                           new Terminal()
View Full Code Here


         dt.edit(fileResource.getUnderlyingResourceObject());
      }
      else
      {
         UIOutput output = context.getUIContext().getProvider().getOutput();
         output.warn(output.err(), "Cannot edit [" + resource.getFullyQualifiedName() + "].");
      }
   }

}
View Full Code Here

         builder.addArguments("-P" + profile.getValue());
      }

      try
      {
         builder.build(output.out(), output.err());
      }
      catch (BuildException e)
      {
         return Results.fail("Build failed.", e);
      }
View Full Code Here

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

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

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

         final Resource<?> resource = it.hasNext() ?
                  (new ResourcePathResolver(resourceFactory, currentResource, it.next()).resolve().get(0)) : currentResource;

         if (!resource.exists())
         {
            output.err().println("cat: " + resource.getName() + ": No such file or directory");
            result = Results.fail();
         }
         else
         {
            output.out().println(resource.getContents());
View Full Code Here

         {
            if ((resource instanceof DirectoryResource))
            {
               if (!recurse)
               {
                  output.err().println(
                           "rm: cannot remove '" + resource.getName()
                                    + "': Is a directory ");
               }
               else if (!resource.listResources().isEmpty() && !forceOption)
               {
View Full Code Here

                           "rm: cannot remove '" + resource.getName()
                                    + "': Is a directory ");
               }
               else if (!resource.listResources().isEmpty() && !forceOption)
               {
                  output.err().println(
                           "rm: directory '" + resource.getName()
                                    + "' not empty and cannot be deleted without '--force' '-f' option.");
               }
               else if (forceOption || prompt.promptBoolean("Delete '" + resource.getFullyQualifiedName() + "'?"))
               {
View Full Code Here

               }
               else if (forceOption || prompt.promptBoolean("Delete '" + resource.getFullyQualifiedName() + "'?"))
               {
                  if (!resource.delete(recurse))
                  {
                     output.err().println("rm: cannot remove ‘" + resource.getFullyQualifiedName()
                              + "’: Error occurred during deletion");
                  }
               }
            }
            else
View Full Code Here

            }
            else
            {
               if (!resource.delete(recurse))
               {
                  output.err().println("rm: cannot remove ‘" + resource.getFullyQualifiedName()
                           + "’: Error occurred during deletion");
               }
            }

         }
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.