Examples of bail()


Examples of com.bbn.openmap.util.ArgParser.bail()

        Debug.init();

        ArgParser ap = new ArgParser("Wanderer");

        if (argv.length == 0) {
            ap.bail("", true);
        }

        String[] dirs = argv;

        Wanderer wanderer = new Wanderer(new TestWandererCallback());
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        ap.add("dimension",
                "Dimension of output image, add height and width arguments separated by a space",
                2);

        if (argv.length == 0) {
            ap.bail("Usage: java com.bbn.openmap.util.wanderer.SVG <dir> (-help for options)",
                    false);
        }

        ap.parse(argv);
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

                int width = Integer.parseInt(widthString);
                int height = Integer.parseInt(heightString);
                dim = new Dimension(width, height);
            } catch (NumberFormatException nfe) {
                String message = "Problem reading dimensions: " + nfe.getMessage();
                ap.bail(message, false);
            }
        }

        String[] dirs = ap.getRest();
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        Debug.init();

        ArgParser ap = new ArgParser("SLOC");

        if (argv.length == 0) {
            ap.bail("Counts ';' and '}' to sum up Source Lines Of Code\nUsage: java com.bbn.openmap.util.wanderer.SLOC <dir>",
                    false);
        }

        ap.parse(argv);
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        Debug.init();

        ArgParser ap = new ArgParser("Purge");

        if (argv.length == 0) {
            ap.bail("Wanders through directory tree pruning '~' files.\nUsage: java com.bbn.openmap.util.wanderer.Purge <dir>",
                    false);
        }

        Purge purge = new Purge(new String[] { ".#" }, new String[] { "~" });
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

                "Just print what would happen, don't really do anything.");
        ap.add("report",
                "Print out what didn't get copied, and what files exist only on the target side.");

        if (argv.length < 4) {
            ap.bail("", true);
        }

        ap.parse(argv);

        boolean verbose = false;
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        sourceDir = ap.getArgValues("source");
        if (sourceDir != null || sourceDir.length < 1) {
            if (verbose)
                Debug.output("Source directory is " + sourceDir[0]);
        } else {
            ap.bail("OneWaySync needs path to source directory", false);
        }

        String[] targetDir;
        targetDir = ap.getArgValues("target");
        if (targetDir != null || targetDir.length < 1) {
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        targetDir = ap.getArgValues("target");
        if (targetDir != null || targetDir.length < 1) {
            if (verbose)
                Debug.output("Target directory is " + targetDir[0]);
        } else {
            ap.bail("OneWaySync needs path to source directory", false);
        }

        OneWaySync cc = new OneWaySync(sourceDir[0], targetDir[0]);
        cc.setVerbose(verbose);
        cc.setFakeit(fakeit);
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

                ArgParser.TO_END);
        ap.add("verbose",
                "Announce all changes, failures will still be reported.");

        if (argv.length == 0) {
            ap.bail("", true);
        }

        ap.parse(argv);

        String[] dirs;
View Full Code Here

Examples of com.bbn.openmap.util.ArgParser.bail()

        ap.add("lower",
                "Change file and directory names to lower case. <path> <path> ...",
                ArgParser.TO_END);

        if (argv.length == 0) {
            ap.bail("", true);
        }

        ap.parse(argv);

        String[] dirs;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.