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

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


         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

         PackagingFacet facet = project.getFacet(PackagingFacet.class);
         BuildResult buildResult = facet.getBuildResult();
         if (!buildResult.isSuccess())
         {
            UIOutput output = uiContext.getProvider().getOutput();
            PrintStream err = output.err();
            output.error(err, String.format("Project '%s' has errors", project.getRoot()));
            for (BuildMessage message : buildResult.getMessages())
            {
               switch (message.getSeverity())
               {
View Full Code Here

      JavaSource<?> source = buildJavaSource(javaSourceFacet);
      JavaResource javaResource;
      if (source.hasSyntaxErrors())
      {
         UIOutput output = uiContext.getProvider().getOutput();
         PrintStream err = output.err();
         err.println("Syntax Errors:");
         for (SyntaxError error : source.getSyntaxErrors())
         {
            err.println(error);
         }
View Full Code Here

      SOURCETYPE source = buildJavaSource(javaSourceFacet);
      JavaResource javaResource;
      if (source.hasSyntaxErrors())
      {
         UIOutput output = uiContext.getProvider().getOutput();
         PrintStream err = output.err();
         err.println("Syntax Errors:");
         for (SyntaxError error : source.getSyntaxErrors())
         {
            err.println(error);
         }
View Full Code Here

         final Resource<?> resource = it.hasNext() ?
                  (new PathspecParser(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.