Examples of promptBoolean()


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()

      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()

      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()

   }
  
   private boolean promptToFixMethod(UIExecutionContext context, String methodName, String propertyName) {
      UIPrompt prompt = context.getPrompt();
      return prompt.promptBoolean("Method '" + methodName + "'already exists for property"
                + propertyName + " . Method is not following the selected pattern."
                + " Should it be fixed?");
     
   }
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()

   public Result execute(UIExecutionContext context) throws Exception
   {
      UIProvider provider = context.getUIContext().getProvider();
      UIOutput output = provider.getOutput();
      UIPrompt prompt = context.getPrompt();
      boolean answer = prompt.promptBoolean("Do you love Forge 2?");
      output.out().println("You answered: " + answer);
      return null;
   }

}
View Full Code Here

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()

               {
                  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()

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