public void run(){
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String currLine = null;
Classifier classifier = new Classifier();
TokenArrayList tokens = null;
// MvcDoc mvcdoc = new MvcDoc();
if (autogen.booleanValue()){
for(ConfigVersion version: configFinder.getVersions().values()){
ConfigLocation loc = version.getLatestVersion();
// DebugInfo.debug(loc.toString());
if (!loc.isFromJAR()){
// Wasn't in a jar, so try to generate
// DebugInfo.debug("Config is not from JAR - generating: " + loc.getConfigName());
generateFromConfig(version);
}
aggregateManager.mergeDefinitions(defManager);
}
System.out.println("DONE");
try {
if (docdir.length() > 0){
if (workspace.length() > 0)
docGenerator.dumpDocumentation(workspace.toString() + "/" + docdir.toString());
else
docGenerator.dumpDocumentation(docdir.toString());
}
} catch (IOException e) {
System.err.println(e.toString());
e.printStackTrace();
System.exit(1);
}
System.exit(0);
}
System.out.println("\nmvw generator - enter the name of a Model View Whatever config\n");
System.out.println("Enter ? for a list of configs...\n\n");
while(true){
try{
String s = in.readLine();
if (s == null)
return;
currLine = s.trim();
if (currLine.length() == 0)
continue;
tokens = classifier.classify(currLine, false);
if (tokens.size() == 0)
continue;
ConfigVersion currConfig = configFinder.getConfig(tokens.nth(0).getValue());