Fixed some checkstyle and javadoc warnings and added a few new IO unit

tests.
This commit is contained in:
Willem Cazander 2013-04-29 01:04:24 +02:00
parent ed1732a625
commit edbe6bb737
39 changed files with 581 additions and 111 deletions

View file

@ -24,6 +24,7 @@
package org.x4o.xml.eld.doc;
import java.io.File;
import java.io.IOException;
import org.x4o.xml.element.ElementAttributeHandler;
import org.x4o.xml.element.ElementBindingHandler;
@ -45,10 +46,19 @@ public class EldDocGenerator {
private X4OLanguageContext context = null;
/**
* Creates an EldDocGenerator for this langauge context.
* @param context The language context to generate doc for.
*/
public EldDocGenerator(X4OLanguageContext context) {
this.context=context;
}
/**
* Writes the language documentation to the base path.
* @param basePath The path to write to documentation to.
* @throws ElementException Is thrown when error is done.
*/
public void writeDoc(File basePath) throws ElementException {
EldDocHtmlWriter writer = new EldDocHtmlWriter();
try {
@ -97,8 +107,8 @@ public class EldDocGenerator {
}
}
} catch (Exception e) {
throw new ElementException(e); // todo rm
} catch (IOException e) {
throw new ElementException(e);
}
}
}

View file

@ -45,7 +45,11 @@ public class X4OWriteLanguageDocExecutor {
private String languageVersion = null;
private File basePath;
static public void main(String argu[]) {
/**
* Config and executes this language task.
* @param argu The command line arguments.
*/
public static void main(String[] argu) {
X4OWriteLanguageDocExecutor languageSchema = new X4OWriteLanguageDocExecutor();
List<String> arguList = Arrays.asList(argu);
Iterator<String> arguIterator = arguList.iterator();
@ -87,6 +91,9 @@ public class X4OWriteLanguageDocExecutor {
}
}
/**
* Executes this language task.
*/
public void execute() throws ElementException {
X4ODriver<?> driver = X4ODriverManager.getX4ODriver(getLanguageName());
X4OLanguageContext context = driver.createLanguageContext(getLanguageVersion());