From: ho.namkoong Date: Mon, 14 Jan 2013 08:22:17 +0000 (+0900) Subject: [Title] Print help page if nativegen does not have any options. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dc2c960afa0780f06eae41163e6b7c105461012;p=sdk%2Ftools%2Fcli.git [Title] Print help page if nativegen does not have any options. [Type] [Module] [Priority] [Jira#] [Redmine#] 7053 [Problem] [Cause] [Solution] [TestCase] Change-Id: Idb959ae97d21e4e7d4fdc8a4982c5343445e7016 --- diff --git a/org.tizen.cli/src/org/tizen/cli/exec/gen/NativeMain.java b/org.tizen.cli/src/org/tizen/cli/exec/gen/NativeMain.java index f2b9fc4..25ae7a6 100644 --- a/org.tizen.cli/src/org/tizen/cli/exec/gen/NativeMain.java +++ b/org.tizen.cli/src/org/tizen/cli/exec/gen/NativeMain.java @@ -45,6 +45,8 @@ import org.tizen.nativecommon.templateengine.model.TizenTemplate; public class NativeMain extends AbstractLauncher { + public boolean printHelp = false; + private static final String OPTION_PROJECTPATH = "path"; private static final String OPTION_PROJECTNAME = "name"; private static final String OPTION_SAMPLE = "sample"; @@ -70,12 +72,22 @@ public class NativeMain extends AbstractLauncher { public static void main(String[] args) throws Exception { final NativeMain instance = new NativeMain(); + + if(args.length == 0) { + instance.printHelp = true; + } + instance.run( args ); } @Override protected void execute(CommandLine cmdLine) throws Exception { + if(printHelp) { + printHelp(); + return; + } + final Prompter prompter = getPrompter(); logger.trace("get user input");