CommandLineOptions.java revision 800
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
public class CommandLineOptions {
static class Option {
char option;
description = descr;
}
}
}
}
public CommandLineOptions() {
options.add(new Option('e', null, "Economical - consumes less disk space. It does not generate hyper text cross reference files offline, but will do so on demand - which could be sightly slow."));
options.add(new Option('c', "/path/to/ctags", "Path to Exuberant Ctags from http://ctags.sf.net by default takes the Exuberant Ctags in PATH."));
options.add(new Option('R', "/path/to/configuration", "Read configuration from the specified file"));
options.add(new Option('W', "/path/to/configuration", "Write the current configuration to the specified file (so that the web application can use the same configuration"));
options.add(new Option('U', "host:port", "Send the current configuration to the specified address (This is most likely the web-app configured with ConfigAddress)"));
options.add(new Option('P', null, "Generate a project for each of the top-level directories in source root"));
options.add(new Option('p', "/path/to/default/project", "This is the path to the project that should be selected by default in the web application. You should strip off the source root."));
options.add(new Option('Q', ON_OFF, "Turn on/off quick context scan. By default only the first 32k of a file is scanned, and a '[..all..]' link is inserted if the file is bigger. Activating this may slow the server down (Note: this is setting only affects the web application)"));
options.add(new Option('n', null, "Do not generate indexes, but process all other command line options"));
options.add(new Option('h', "/path/to/repository", "Generate history cache for the specified repos (absolute path from source root)"));
options.add(new Option('D', null, "Store history cache in a Derby database (needs derby.jar in classpath)"));
options.add(new Option('L', "path", "Path to the subdirectory in the web-application containing the requested stylesheet. The following factory-defaults exist: \"default\", \"offwhite\" and \"polished\""));
options.add(new Option('l', ON_OFF, "Turn on/off locking of the Lucene database during index generation"));
options.add(new Option('O', ON_OFF, "Turn on/off the optimization of the index database as part of the indexing step"));
options.add(new Option('w', "webapp-context", "Context of webapp. Default is /source. If you specify a different name, make sure to rename source.war to that name."));
options.add(new Option('A', "ext:analyzer", "Files with the named extension should be analyzed with the specified class"));
options.add(new Option('d', "/path/to/data/root", "The directory where OpenGrok stores the generated data"));
options.add(new Option('T', "number", "The number of threads to use for index generation. By default the number of threads will be set to the number of available CPUs"));
}
public String getCommandString() {
}
}
}
public String getCommandUsage(char c) {
if (o.option == c) {
return o.getUsage();
}
}
return null;
}
return;
}
}
}
}
}
}
}
}
}
/**
* Not intended for normal use, but for the JUnit test suite to validate
* that all options contains a description :-)
*
* @return an iterator to iterate through all of the command line options
*/
}
/**
* Print out a manual page on standard out. Used for building manual page.
*
* @param argv argument vector. not used.
*/
@SuppressWarnings("PMD.SystemPrintln")
try {
} catch (IOException exp) {
}
}
}