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

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


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


               switch (entry.getKey())
               {
               case CREATED:
                  for (String resourceName : entry.getValue())
                  {
                     output.out().println("Created  " + resourceName);
                  }
                  break;
               case DELETED:
                  for (String resourceName : entry.getValue())
                  {
View Full Code Here

                  }
                  break;
               case DELETED:
                  for (String resourceName : entry.getValue())
                  {
                     output.out().println("Deleted  " + resourceName);
                  }
                  break;
               case MODIFIED:
                  for (String resourceName : entry.getValue())
                  {
View Full Code Here

                  }
                  break;
               case MODIFIED:
                  for (String resourceName : entry.getValue())
                  {
                     output.out().println("Modified " + resourceName);
                  }

                  break;
               }
            }
View Full Code Here

         executor.submit(new Runnable()
         {
            @Override
            public void run()
            {
               Streams.write(process.getInputStream(), output.out());
            }
         });
         // Read std err
         executor.submit(new Runnable()
         {
View Full Code Here

               if (resource.exists())
               {
                  final PipedOutputStream stdin = new PipedOutputStream();
                  BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));

                  PrintStream stdout = new UncloseablePrintStream(output.out());
                  PrintStream stderr = new UncloseablePrintStream(output.err());

                  Settings settings = new SettingsBuilder()
                           .inputStream(new PipedInputStream(stdin))
                           .outputStream(stdout)
View Full Code Here

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

}
View Full Code Here

         builder.addArguments("-P" + profile.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

    }

    public PrintStream getOut() {
        UIOutput output = getOutput();
        if (output != null) {
            return output.out();
        } else {
            return System.out;
        }
    }
}
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.