congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Option.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.forge.shell.plugins.Option
constructor

Best Java code snippets using org.jboss.forge.shell.plugins.Option.<init> (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: org.jboss.forge/forge-shell

@DefaultCommand
public void rm(
    @Option(name = "recursive", shortName = "r", help = "recursively delete resources", flagOnly = true) final boolean recursive,
    @Option(name = "force", shortName = "f", help = "do not prompt to confirm operations", flagOnly = true) final boolean force,
    @Option(description = "path", required = true) final Resource<?>[] paths)
{
 for (Resource<?> resource : paths)
 {
   deleteResource(recursive, force, resource);
 }
}
origin: org.jboss.forge/forge-shell

@DefaultCommand
public void rename(
    @Option(description = "source", required = true) final Resource<?> source,
    @Option(description = "target", required = true) final String target,
    @Option(name = "force", shortName = "f", description = "force operation", flagOnly = true) final boolean force,
    final PipeOut out)
{
   Resource<?> directory = this.directory;
   rename(source, directory, target, force, out);
}
origin: org.jboss.forge/forge-javaee-impl

@DefaultCommand(help = "Add many custom field to an existing @Entity class")
public void newExpressionField(
    @Option(required = true, description = "The field descriptor") final String... fields)
{
 System.out.println(Arrays.asList(fields));
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "NotNull", help = "Adds @NotNull constraint on the specified property")
public void addNotNullConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor,
    @Option(name = "message") String message,
    @Option(name = "groups", type = JAVA_CLASS) String[] groups) throws FileNotFoundException
{
 final Annotation<JavaClass> constraintAnnotation = addConstraintOnProperty(property, onAccessor, NotNull.class);
 setConstraintMessage(constraintAnnotation, message);
 javaSourceFacet.saveJavaSource(constraintAnnotation.getOrigin());
 outputConstraintAdded(property, NotNull.class);
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "AssertTrue", help = "Adds @AssertTrue constraint on the specified property")
public void addAssertTrueConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor,
    @Option(name = "message") String message,
    @Option(name = "groups", type = JAVA_CLASS) String[] groups) throws FileNotFoundException
{
 final Annotation<JavaClass> constraintAnnotation = addConstraintOnProperty(property, onAccessor, AssertTrue.class);
 setConstraintMessage(constraintAnnotation, message);
 javaSourceFacet.saveJavaSource(constraintAnnotation.getOrigin());
 outputConstraintAdded(property, AssertTrue.class);
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "Past", help = "Adds @Past constraint on the specified property")
public void addPastConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor,
    @Option(name = "message") String message,
    @Option(name = "groups", type = JAVA_CLASS) String[] groups) throws FileNotFoundException
{
 final Annotation<JavaClass> constraintAnnotation = addConstraintOnProperty(property, onAccessor, Past.class);
 setConstraintMessage(constraintAnnotation, message);
 javaSourceFacet.saveJavaSource(constraintAnnotation.getOrigin());
 outputConstraintAdded(property, Past.class);
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "Future", help = "Adds @Future constraint on the specified property")
public void addFutureConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor,
    @Option(name = "message") String message,
    @Option(name = "groups", type = JAVA_CLASS) String[] groups) throws FileNotFoundException
{
 final Annotation<JavaClass> constraintAnnotation = addConstraintOnProperty(property, onAccessor, Future.class);
 setConstraintMessage(constraintAnnotation, message);
 javaSourceFacet.saveJavaSource(constraintAnnotation.getOrigin());
 outputConstraintAdded(property, Future.class);
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "Null", help = "Adds @Null constraint on the specified property")
public void addNullConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor,
    @Option(name = "message") String message,
    @Option(name = "groups", type = JAVA_CLASS) String[] groups) throws FileNotFoundException
{
 final Annotation<JavaClass> constraint = addConstraintOnProperty(property, onAccessor, Null.class);
 setConstraintMessage(constraint, message);
 javaSourceFacet.saveJavaSource(constraint.getOrigin());
 outputConstraintAdded(property, Null.class);
}
origin: org.jboss.forge/forge-shell

@DefaultCommand
public void run(
    @Option(description = "The starting resource to be listed",
         defaultValue = ".") final Resource<?> r,
    PipeOut out)
    throws IOException
{
 listResources(out, r);
}
origin: org.jboss.forge/forge-shell

  @DefaultCommand
  public void set(final PipeOut out,
      @Option(help = "The alias name to remove: E.g: 'mycommand'") final String[] aliases)
  {
   if ((aliases != null) && (aliases.length > 0))
   {
     for (String alias : aliases)
     {
      registry.removeAlias(alias);
     }
   }
  }
}
origin: org.jboss.forge/forge-javaee-impl

@Command(value = "Valid", help = "Adds @Valid constraint on the specified property")
public void addValidConstraint(
    @Option(name = "onProperty", completer = PropertyCompleter.class, required = true) String property,
    @Option(name = "onAccessor", flagOnly = true) boolean onAccessor) throws FileNotFoundException
{
 final Annotation<JavaClass> constraint = addConstraintOnProperty(property, onAccessor, Valid.class);
 javaSourceFacet.saveJavaSource(constraint.getOrigin());
 outputConstraintAdded(property, Valid.class);
}
origin: org.jboss.forge/forge-tracking

@DefaultCommand
public void setEnabled(@Option(name = "enabled", required = true) Boolean enabled)
{
 configuration.setProperty(ANALYTICS_ENABLED, enabled);
 getAnalyticsTracker().setEnabled(enabled);
}
origin: org.jboss.forge/forge-shell

@DefaultCommand
public void run(
    @Option(help = "The text to be echoed") final String[] tokens,
    final PipeOut out)
{
 if (tokens == null || tokens.length == 0)
 {
   return;
 }
 out.println(echo(shell, promptExpressionParser(shell, tokensToString(tokens))));
}
origin: org.jboss.forge/forge-dev-plugins

@Command("add-plugin")
public void addPlugin(
    @Option(description = "dependency identifier of plugin, ex: \"org.jboss.forge:forge-maven-plugin:1.0.0.Final\"",
         required = true) final Dependency gav,
    final PipeOut out)
{
 MavenPluginBuilder plugin = MavenPluginBuilder.create().setDependency(gav);
 if (!mavenPluginInstaller.isInstalled(project, plugin))
 {
   mavenPluginInstaller.install(project, plugin);
 }
}
origin: org.jboss.forge/forge-dev-plugins

@Command(value = "add-locale", help = "Adds another locale in this resource bundle")
public void addLocale(@Option(name = "locale", required = true) String locale)
{
 String baseName = "messages";
 if (propertiesFileResource != null)
 {
   baseName = getBaseBundleName(propertiesFileResource.getName());
 }
 final String baseBundleName = (baseName + "_" + locale + ".properties");
 PropertiesFileResource newFileResource = getOrCreate(baseBundleName);
 shell.setCurrentResource(newFileResource);
}
origin: org.jboss.forge/forge-javaee-impl

  @DefaultCommand
  public void list(@Option(required = false) String filter)
  {
   ServletFacet web = project.getFacet(ServletFacet.class);

   List<Resource<?>> resources = web.getResources();
   for (Resource<?> file : resources)
   {
     shell.println(file.getFullyQualifiedName());
   }
  }
}
origin: org.jboss.forge/forge-dev-plugins

@Command("set-artifactid")
public void setArtifactId(final PipeOut out,
    @Option(description = "the new artifactId; for example: \"forge-shell\"") final String artifactId)
{
 Assert.notNull(artifactId, "GroupId must not be empty");
 MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class);
 Model pom = mvn.getPOM();
 pom.setArtifactId(artifactId);
 mvn.setPOM(pom);
 out.println("Set artifactId [ " + artifactId + " ]");
}
origin: org.jboss.forge/forge-dev-plugins

@Command("set-name")
public void setName(final PipeOut out,
    @Option(description = "the new name; for example: \"UI-Layer\"") final String name)
{
 Assert.notNull(name, "Name must not be empty");
 MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class);
 Model pom = mvn.getPOM();
 pom.setName(name);
 mvn.setPOM(pom);
 out.println("Set name [ " + name + " ]");
}
origin: org.jboss.forge/forge-dev-plugins

@Command("set-groupid")
public void setGroupId(final PipeOut out,
    @Option(description = "the new groupId; for example: \"org.jboss.forge\"") final String groupId)
{
 Assert.notNull(groupId, "GroupId must not be empty");
 MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class);
 Model pom = mvn.getPOM();
 pom.setGroupId(groupId);
 mvn.setPOM(pom);
 out.println("Set groupId [ " + groupId + " ]");
}
origin: org.jboss.forge/forge-dev-plugins

@Command("set-version")
public void setVersion(final PipeOut out,
    @Option(description = "the new version; for example: \"1.0.0.Final\"") final String version)
{
 Assert.notNull(version, "GroupId must not be empty");
 MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class);
 Model pom = mvn.getPOM();
 pom.setVersion(version);
 mvn.setPOM(pom);
 out.println("Set version [ " + version + " ]");
}
org.jboss.forge.shell.pluginsOption<init>

Popular methods of Option

  • completer
  • defaultValue
  • description
  • flagOnly
  • help
  • name
  • required
  • shortName
  • type

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Notification (javax.management)
  • JOptionPane (javax.swing)
  • Option (scala)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now