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

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


         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
         {
            if(color.getValue()) {
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

         executor.submit(new Runnable()
         {
            @Override
            public void run()
            {
               Streams.write(process.getErrorStream(), output.err());
            }
         });
         executor.shutdown();
         int returnCode = process.waitFor();
         if (returnCode == 0)
View Full Code Here

               {
                  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)
                           .outputStreamError(stderr)
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

            javaClass.addMethod().setName(endName).setReturnTypeVoid().setPublic()
                     .setBody(fieldName + ".end();");

            if (javaClass.hasSyntaxErrors())
            {
               output.err().println("Modified Java class contains syntax errors:");
               for (SyntaxError error : javaClass.getSyntaxErrors())
               {
                  output.err().print(error.getDescription());
               }
            }
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.