Examples of promptBoolean()


Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

      Field<JavaClass> field = targetEntity.getField(fieldNameStr);
      String action = (field == null) ? "created" : "updated";
      if (field != null)
      {
         UIPrompt prompt = context.getPrompt();
         if (prompt.promptBoolean("Field '" + field.getName() + "' already exists. Do you want to overwrite it?"))
         {
            fieldOperations.removeField(targetEntity, field);
         }
         else
         {
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

      FieldSource<JavaClassSource> field = targetClass.getField(fieldNameStr);
      String action = (field == null) ? "created" : "updated";
      if (field != null)
      {
         UIPrompt prompt = context.getPrompt();
         if (prompt.promptBoolean("Field '" + field.getName() + "' already exists. Do you want to overwrite it?"))
         {
            fieldOperations.removeField(targetClass, field);
         }
         else
         {
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

               {
                  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() + "'?"))
               {
                  if (!resource.delete(recurse))
                  {
                     output.err().println("rm: cannot remove ‘" + resource.getFullyQualifiedName()
                              + "’: Error occurred during deletion");
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

         selectedFields.add(targetClass.getField(fieldString));
      }
      UIPrompt prompt = context.getPrompt();
      if (targetClass.hasMethodSignature("equals", Object.class))
      {
         if (prompt.promptBoolean("Class already has an equals method. Would you like it to be overwritten?"))
         {
            Refactory.createEquals(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
         }
      }
      else
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

      {
         Refactory.createEquals(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
      }
      if (targetClass.hasMethodSignature("hashcode"))
      {
         if (prompt.promptBoolean("Class already has a hashcode method. Would you like it to be overwritten?"))
         {
            Refactory.createHashCode(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
         }
      }
      else
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

      for(String fieldString : fields.getValue()) {
         selectedFields.add(targetClass.getField(fieldString));
      }
      UIPrompt prompt = context.getPrompt();
      if(targetClass.hasMethodSignature("equals", Object.class)) {
         if(prompt.promptBoolean("Class already has an equals method. Would you like it to be overwritten?")) {
            Refactory.createEquals(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
         }
      } else {
         Refactory.createEquals(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
      }
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

         }
      } else {
         Refactory.createEquals(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
      }
      if(targetClass.hasMethodSignature("hashcode")) {
         if(prompt.promptBoolean("Class already has a hashcode method. Would you like it to be overwritten?")) {
            Refactory.createHashCode(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
         }
      } else {
         Refactory.createHashCode(targetClass, selectedFields.toArray(new FieldSource<?>[selectedFields.size()]));
      }
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

               {
                  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() + "'?"))
               {
                  if (!resource.delete(recurse))
                  {
                     output.err().println("rm: cannot remove ‘" + resource.getFullyQualifiedName()
                              + "’: Error occurred during deletion");
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

      FieldSource<JavaClassSource> field = targetEntity.getField(fieldNameStr);
      String action = (field == null) ? "created" : "updated";
      if (field != null)
      {
         UIPrompt prompt = context.getPrompt();
         if (prompt.promptBoolean("Field '" + field.getName() + "' already exists. Do you want to overwrite it?"))
         {
            beanOperations.removeField(targetEntity, field);
         }
         else
         {
View Full Code Here

Examples of org.jboss.forge.addon.ui.input.UIPrompt.promptBoolean()

                templateContext.put("componentId", componentId);
                String componentClass = findComponentFQCN(component, selectedVersion);
                templateContext.put("componentClass", componentClass);

                UIPrompt prompt = context.getPrompt();
                if (!prompt.promptBoolean("File '" + outputFilePath + "' already exists. Do you want to overwrite it?")) {
                    return Results.fail("File '" + outputFilePath + "' already exists.");
                }

                fileResource.createNewFile();
                fileResource.setContents(template.process(templateContext));
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.