Run only the declarative hints unless something else is requested.
authorJan Lahoda <jlahoda@netbeans.org>
Mon, 24 Sep 2012 09:27:01 +0200
changeset 876cf176088c0fe
parent 875 d890cdbd7bec
child 877 0234448aa478
Run only the declarative hints unless something else is requested.
cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java
     1.1 --- a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java	Fri Sep 21 20:48:10 2012 +0200
     1.2 +++ b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Main.java	Mon Sep 24 09:27:01 2012 +0200
     1.3 @@ -285,16 +285,8 @@
     1.4                      return 1;
     1.5                  }
     1.6                  hints = findHints(sourceCP, binaryCP, parsed.valueOf(hint), hintSettings);
     1.7 -            } else if (settingsFromConfigFile == null) {
     1.8 -                hints = allHints(sourceCP, binaryCP, hintSettings);
     1.9              } else {
    1.10 -                assert settingsFromConfigFile != null;
    1.11 -                hints = readHints(sourceCP, binaryCP, hintSettings, settingsFromConfigFile.getBoolean("runDeclarative", true));
    1.12 -            }
    1.13 -
    1.14 -            if (!hints.iterator().hasNext()) {
    1.15 -                System.err.println("no hints specified");
    1.16 -                return 1;
    1.17 +                hints = readHints(sourceCP, binaryCP, hintSettings, settingsFromConfigFile != null ? settingsFromConfigFile.getBoolean("runDeclarative", true) : true);
    1.18              }
    1.19  
    1.20              if (parsed.has(config) && !parsed.has(hint)) {
    1.21 @@ -346,6 +338,11 @@
    1.22                  apply = true;
    1.23              }
    1.24              
    1.25 +            if (apply && !hints.iterator().hasNext()) {
    1.26 +                System.err.println("no hints specified");
    1.27 +                return 1;
    1.28 +            }
    1.29 +
    1.30              try {
    1.31                  MainLookup.register(new ClassPathProviderImpl(bootCP, compileCP, sourceCP));
    1.32                  MainLookup.register(new JavaPathRecognizer());