Don't display a top component when command line option is used

"marceloaleks" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Hello Ixô,

are you aware of ArgsProcessor ?

You can create your own option, for example :

Code:



import org.netbeans.spi.sendopts.Arg;
import org.netbeans.spi.sendopts.ArgsProcessor;
import org.netbeans.spi.sendopts.Env;

 public final class HelloOption implements ArgsProcessor {
 
    @Arg(shortName='h', longName="hello", defaultValue="Rio de Janeiro") public String optionArg;
 
   @Override
   public void process(Env env) {
     System.err.println("Hello " + optionArg);
   }


 }






And from command line, you will be able to pass --hello="something", or in test mode set it in your  project.properties :



Code:
run.args.extra= --locale pt:BR --hello="world"



Regards,

   Marcelo Aleksandravicius
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.