[Title] Print help page if nativegen does not have any options.
authorho.namkoong <ho.namkoong@samsung.com>
Mon, 14 Jan 2013 08:22:17 +0000 (17:22 +0900)
committerho.namkoong <ho.namkoong@samsung.com>
Mon, 14 Jan 2013 08:22:17 +0000 (17:22 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#] 7053
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Idb959ae97d21e4e7d4fdc8a4982c5343445e7016

org.tizen.cli/src/org/tizen/cli/exec/gen/NativeMain.java

index f2b9fc4..25ae7a6 100644 (file)
@@ -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");