Author: alexsmirnov
Date: 2010-05-25 19:55:03 -0400 (Tue, 25 May 2010)
New Revision: 17243
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManagerImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManagerImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagWithModel.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/FileManager.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Generator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManager.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManager.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/AptBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/FreeMarkerRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/BehaviorClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ConverterClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/EventSourceInterfaceGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ValidatorClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/ListenerTagHandlerGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FacesConfigGenerator.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/processors/AnnotationProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/BehaviorClassGeneratorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ConverterClassGeneratorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ValidatorClassGeneratorTest.java
Log:
CODING IN PROGRESS - issue RF-8568: Improve FreeMarker generator.
https://jira.jboss.org/browse/RF-8568
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkWriter.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -25,6 +25,8 @@
package org.richfaces.cdk;
+import org.richfaces.cdk.model.ComponentLibrary;
+
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
@@ -32,5 +34,5 @@
*/
public interface CdkWriter {
- public void render() throws CdkException;
+ public void render(ComponentLibrary library) throws CdkException;
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/FileManager.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/FileManager.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/FileManager.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -35,12 +35,33 @@
*/
public interface FileManager {
+ /**
+ * <p class="changed_added_4_0">Get existing file or
directory.</p>
+ * @param path
+ * @return
+ * @throws FileNotFoundException
+ */
public File getFile(String path) throws FileNotFoundException;
+ /**
+ * <p class="changed_added_4_0">Get collection of all source files
for this manager.</p>
+ * @return collection of files explicitly included for processing.
+ */
public Iterable<File> getFiles();
+ /**
+ * <p class="changed_added_4_0">Create new file in output
folder.</p>
+ * @param path relative path to output file.
+ * @param lastModified time of last modification of model.
+ * @return file descriptor or null if file exists and its modification time is later
then <code>lastModified</code> parameter.
+ * @throws IOException
+ */
public Writer createOutput(String path, long lastModified) throws IOException;
+ /**
+ * <p class="changed_added_4_0">Return collection of all folders
included in this manager instance.</p>
+ * @return
+ */
public abstract Iterable<File> getFolders();
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Generator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Generator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Generator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -99,11 +99,11 @@
}
public void addOutputFolder(Outputs type, File outputFolder) {
- this.outputFolders.put(type, new OutputFileManager(outputFolder));
+ this.outputFolders.put(type, new OutputFileManagerImpl(outputFolder));
}
public void addSources(Sources type, Iterable<File> files, Iterable<File>
folders) {
- this.sources.put(type, new SourceFileManager(files, folders));
+ this.sources.put(type, new SourceFileManagerImpl(files, folders));
}
public void setOptions(Map<String, String> options) {
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -23,6 +23,8 @@
package org.richfaces.cdk;
+import org.richfaces.cdk.model.ComponentLibrary;
+
/**
* <p class="changed_added_4_0">
* That class builds JSF library model from different sources. It acts as
@@ -44,9 +46,10 @@
/**
* Generate all types of files from library model.
+ * @param library TODO
*
* @throws CdkException
*/
- public void generate() throws CdkException;
+ public void generate(ComponentLibrary library) throws CdkException;
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManager.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManager.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManager.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -23,106 +23,11 @@
package org.richfaces.cdk;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Collections;
-
/**
- * <p class="changed_added_4_0">
- * </p>
- *
+ * <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
- *
+ *
*/
-public class OutputFileManager implements FileManager {
+public interface OutputFileManager extends FileManager {
- private final Iterable<File> folders;
- private final File folder;
-
- public OutputFileManager(File folder) {
- this.folder = folder;
- this.folders = Collections.singleton(folder);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#createFile(java.lang.String)
- */
- @Override
- public Writer createOutput(String path, long lastModified) throws IOException {
- if (null == path) {
- throw new NullPointerException();
- }
-
-
- if (null == folder) {
- throw new FileNotFoundException("No output folder set for file " +
path);
- }
-
- if (folder.exists() && !folder.isDirectory()) {
- throw new IOException("Output folder " + folder + " not is
directory.");
- }
-
- // Strip leading '/'
- if (path.startsWith(File.separator)) {
- path = path.substring(1);
- }
-
- File outputFile = new File(folder, path);
-
- if (outputFile.exists()) {
- if (lastModified > 0 && outputFile.lastModified() >
lastModified) {
- return null;
- } else {
- outputFile.delete();
- }
- }
-
- // Create file folder.
- outputFile.getParentFile().mkdirs();
- outputFile.createNewFile();
-
- return new FileWriter(outputFile);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#getFile(java.lang.String)
- */
- @Override
- public File getFile(String path) throws FileNotFoundException {
- File file = new File(folder, path);
- if (file.exists()) {
- return file;
- }
- throw new FileNotFoundException(path);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#getFiles()
- */
- @Override
- public Iterable<File> getFiles() {
- // TODO - list all files in folder.
- return Collections.emptySet();
- }
-
- /**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @return the folders
- */
- @Override
- public Iterable<File> getFolders() {
- return this.folders;
- }
-
}
Copied:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManagerImpl.java
(from rev 17238,
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManager.java)
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManagerImpl.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManagerImpl.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -0,0 +1,127 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Collections;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class OutputFileManagerImpl implements OutputFileManager {
+
+ private final Iterable<File> folders;
+ private final File folder;
+
+ public OutputFileManagerImpl(File folder) {
+ this.folder = folder;
+ this.folders = Collections.singleton(folder);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#createFile(java.lang.String)
+ */
+ @Override
+ public Writer createOutput(String path, long lastModified) throws IOException {
+ if (null == path) {
+ throw new NullPointerException("Output file path is null");
+ }
+
+ if (null == folder) {
+ throw new FileNotFoundException("No output folder set for file " +
path);
+ }
+
+ if (folder.exists() && !folder.isDirectory()) {
+ throw new IOException("Output folder " + folder + " not is
directory.");
+ }
+
+ // Strip leading '/'
+ if (path.startsWith(File.separator)) {
+ path = path.substring(1);
+ }
+
+ File outputFile = new File(folder, path);
+
+ if (outputFile.exists()) {
+ if (lastModified > 0 && outputFile.lastModified() >
lastModified) {
+ return null;
+ } else {
+ outputFile.delete();
+ }
+ }
+
+ // Create file folder.
+ outputFile.getParentFile().mkdirs();
+ outputFile.createNewFile();
+
+ return new FileWriter(outputFile);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#getFile(java.lang.String)
+ */
+ @Override
+ public File getFile(String path) throws FileNotFoundException {
+ File file = new File(folder, path);
+ if (file.exists()) {
+ return file;
+ }
+ throw new FileNotFoundException(path);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#getFiles()
+ */
+ @Override
+ public Iterable<File> getFiles() {
+ // TODO - list all files in folder.
+ return Collections.emptySet();
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @return the folders
+ */
+ @Override
+ public Iterable<File> getFolders() {
+ return this.folders;
+ }
+
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/OutputFileManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManager.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManager.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManager.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -23,93 +23,11 @@
package org.richfaces.cdk;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.Writer;
-
/**
- * <p class="changed_added_4_0">
- * </p>
- *
+ * <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
+ *
*/
-public class SourceFileManager implements FileManager {
+public interface SourceFileManager extends FileManager {
- private final Iterable<File> sources;
- private final Iterable<File> folders;
-
- public SourceFileManager(Iterable<File> sources, Iterable<File> folders)
{
- this.sources = sources;
- this.folders = folders;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#createFile(java.lang.String)
- */
-
- @Override
- public Writer createOutput(String path, long lastModified) throws IOException {
- throw new UnsupportedOperationException("Cannot create file in source
folder");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#getFile(java.lang.String)
- */
-
- @Override
- public File getFile(String path) throws FileNotFoundException {
- String platformPath;
-
- if (File.separatorChar == '/') {
- platformPath = path;
- } else {
- platformPath = path.replace('/', File.separatorChar);
- }
-
- if (null != folders) {
- for (File folder : folders) {
- if (folder.exists() && folder.isDirectory()) {
- File configFile = new File(folder, platformPath);
- if (configFile.exists()) {
- return configFile;
- }
- }
- }
- }
- if (null != sources) {
- for (File file : sources) {
- if (file.getAbsolutePath().endsWith(platformPath)) {
- return file;
- }
- }
- }
- throw new FileNotFoundException(path);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.cdk.FileManager#getFiles()
- */
-
- @Override
- public Iterable<File> getFiles() {
- return sources;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- *
- * @return the folders
- */
- @Override
- public Iterable<File> getFolders() {
- return this.folders;
- }
-
}
Copied:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManagerImpl.java
(from rev 17238,
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManager.java)
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManagerImpl.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManagerImpl.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -0,0 +1,115 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ */
+public class SourceFileManagerImpl implements SourceFileManager,FileManager {
+
+ private final Iterable<File> sources;
+ private final Iterable<File> folders;
+
+ public SourceFileManagerImpl(Iterable<File> sources, Iterable<File>
folders) {
+ this.sources = sources;
+ this.folders = folders;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#createFile(java.lang.String)
+ */
+
+ @Override
+ public Writer createOutput(String path, long lastModified) throws IOException {
+ throw new UnsupportedOperationException("Cannot create file in source
folder");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#getFile(java.lang.String)
+ */
+
+ @Override
+ public File getFile(String path) throws FileNotFoundException {
+ String platformPath;
+
+ if (File.separatorChar == '/') {
+ platformPath = path;
+ } else {
+ platformPath = path.replace('/', File.separatorChar);
+ }
+
+ if (null != folders) {
+ for (File folder : folders) {
+ if (folder.exists() && folder.isDirectory()) {
+ File configFile = new File(folder, platformPath);
+ if (configFile.exists()) {
+ return configFile;
+ }
+ }
+ }
+ }
+ if (null != sources) {
+ for (File file : sources) {
+ if (file.getAbsolutePath().endsWith(platformPath)) {
+ return file;
+ }
+ }
+ }
+ throw new FileNotFoundException(path);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.richfaces.cdk.FileManager#getFiles()
+ */
+
+ @Override
+ public Iterable<File> getFiles() {
+ return sources;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ *
+ * @return the folders
+ */
+ @Override
+ public Iterable<File> getFolders() {
+ return this.folders;
+ }
+
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/SourceFileManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/AptBuilder.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/AptBuilder.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/AptBuilder.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -33,6 +33,7 @@
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.LibraryBuilder;
import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.model.ComponentLibrary;
import com.google.inject.Inject;
@@ -63,11 +64,11 @@
}
@Override
- public void generate() throws CdkException {
+ public void generate(ComponentLibrary library) throws CdkException {
if (0 == log.getErrorCount()) {
// processing over, generate files.
for (CdkWriter generator : generators) {
- generator.render();
+ generator.render(library);
}
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -107,7 +107,7 @@
} else if (0 == log.getErrorCount()) {
// processing over, generate files.
log.debug("Generate output files");
- builder.generate();
+ builder.generate(library);
}
return false;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/FreeMarkerRenderer.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/FreeMarkerRenderer.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/FreeMarkerRenderer.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -32,12 +32,12 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
+import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ModelElementBase;
import org.richfaces.cdk.model.Trackable;
import freemarker.template.Configuration;
-import freemarker.template.Template;
import freemarker.template.TemplateException;
/**
@@ -47,32 +47,23 @@
*/
public abstract class FreeMarkerRenderer<C> implements CdkWriter {
- protected final ComponentLibrary library;
private final Configuration configuration;
- private final Template template;
-
private final FileManager output;
- public FreeMarkerRenderer(Configuration configuration, ComponentLibrary library,
FileManager output) {
+ public FreeMarkerRenderer(Configuration configuration, FileManager output) {
this.configuration = configuration;
- this.library = library;
this.output = output;
-
- try {
- template = configuration.getTemplate(getTemplateName());
- } catch (IOException e) {
- throw new CdkException(e);
- }
}
- public void generate(C c) throws CdkException {
+ public void generate(ComponentLibrary library,C c) throws CdkException {
try {
- Writer out = getOutput(c);
-
- template.process(c, out);
- out.close();
+ Writer out = getOutput(library, c);
+ if(null != out){
+ configuration.getTemplate(getTemplateName()).process(c, out);
+ out.close();
+ }
} catch (IOException e) {
throw new CdkException(e);
} catch (TemplateException e) {
@@ -80,23 +71,22 @@
}
}
- protected Writer getOutput(C c) throws CdkException {
+ protected Writer getOutput(ComponentLibrary library, C c) throws CdkException {
long lastModified = Long.MIN_VALUE;
if (c instanceof Trackable) {
Trackable trackuble = (Trackable) c;
-
lastModified = trackuble.lastModified();
}
try {
- return output.createOutput(getOutputFile(c), lastModified);
+ return output.createOutput(getOutputFileName(c), lastModified);
} catch (IOException e) {
throw new CdkException(e);
}
}
- protected String getOutputFile(C c) throws CdkException {
+ protected String getOutputFileName(C c) throws CdkException {
if (c instanceof ModelElementBase) {
ModelElementBase modelElement = (ModelElementBase) c;
return modelElement.getTargetClass().getName().replace('.',
File.separatorChar) + ".java";
@@ -104,6 +94,10 @@
throw new CdkException("Unknown model object " + c);
}
}
+
+ protected String getJavaFileName(ClassName targetClass){
+ return targetClass.getName().replace('.', File.separatorChar) +
".java";
+ }
protected abstract String getTemplateName();
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/BehaviorClassGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/BehaviorClassGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/BehaviorClassGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -44,17 +44,17 @@
public class BehaviorClassGenerator extends FreeMarkerRenderer<BehaviorModel>
implements CdkWriter {
@Inject
- public BehaviorClassGenerator(Configuration configuration, ComponentLibrary library,
+ public BehaviorClassGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<BehaviorModel> models = library.getBehaviors();
for (BehaviorModel model : models) {
if (model.isGenerate()) {
- this.generate(model);
+ this.generate(library, model);
}
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -48,16 +48,16 @@
public class ComponentClassGenerator extends FreeMarkerRenderer<ComponentModel>
implements CdkWriter {
@Inject
- public ComponentClassGenerator(Configuration configuration, ComponentLibrary library,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ public ComponentClassGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<ComponentModel> models = library.getComponents();
for (ComponentModel model : models) {
if (model.isGenerate()) {
- this.generate(model);
+ this.generate(library, model);
}
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ConverterClassGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ConverterClassGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ConverterClassGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -44,17 +44,17 @@
public class ConverterClassGenerator extends FreeMarkerRenderer<ConverterModel>
implements CdkWriter {
@Inject
- public ConverterClassGenerator(Configuration configuration, ComponentLibrary
library,
+ public ConverterClassGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<ConverterModel> models = library.getConverters();
for (ConverterModel model : models) {
if (model.isGenerate()) {
- this.generate(model);
+ this.generate(library, model);
}
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/EventSourceInterfaceGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/EventSourceInterfaceGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/EventSourceInterfaceGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -45,23 +45,23 @@
public class EventSourceInterfaceGenerator extends FreeMarkerRenderer<EventModel>
implements CdkWriter {
@Inject
- public EventSourceInterfaceGenerator(Configuration configuration, ComponentLibrary
library,
+ public EventSourceInterfaceGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<EventModel> models = library.getEvents();
for (EventModel model : models) {
if (model.isGenerateSource()) {
- this.generate(model);
+ this.generate(library, model);
}
}
}
@Override
- protected String getOutputFile(EventModel c) throws CdkException {
+ protected String getOutputFileName(EventModel c) throws CdkException {
return c.getSourceInterface().getName().replace('.', File.separatorChar)
+ ".java";
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ValidatorClassGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ValidatorClassGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ValidatorClassGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -44,16 +44,16 @@
public class ValidatorClassGenerator extends FreeMarkerRenderer<ValidatorModel>
implements CdkWriter {
@Inject
- public ValidatorClassGenerator(Configuration configuration, ComponentLibrary library,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ public ValidatorClassGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<ValidatorModel> models = library.getValidators();
for (ValidatorModel model : models) {
if (model.isGenerate()) {
- this.generate(model);
+ this.generate(library, model);
}
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/ListenerTagHandlerGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/ListenerTagHandlerGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/ListenerTagHandlerGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -44,33 +44,30 @@
* @author akolonitsky
* @since Jan 20, 2010
*/
-public class ListenerTagHandlerGenerator extends FreeMarkerRenderer<TagModel>
implements CdkWriter {
+public class ListenerTagHandlerGenerator extends
FreeMarkerRenderer<TagWithModel<EventModel>> implements CdkWriter {
@Inject
- public ListenerTagHandlerGenerator(Configuration configuration, ComponentLibrary
library,
+ public ListenerTagHandlerGenerator(Configuration configuration,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
- super(configuration, library, output);
+ super(configuration, output);
}
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
Collection<EventModel> models = library.getEvents();
for (EventModel model : models) {
for (TagModel tag : model.getTags()) {
if ((TagType.All.equals(tag.getType()) ||
TagType.Facelets.equals(tag.getType())) && tag.isGenerate()) {
- process(model,tag);
+ generate(library,new TagWithModel<EventModel>(tag, model));
}
}
}
}
- protected void process(EventModel model, TagModel tag) {
-
- }
@Override
- protected String getOutputFile(TagModel c) throws CdkException {
- return c.getTargetClass().getName().replace('.', File.separatorChar) +
".java";
+ protected String getOutputFileName(TagWithModel<EventModel> c) throws
CdkException {
+ return c.getTag().getTargetClass().getName().replace('.',
File.separatorChar) + ".java";
}
@Override
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -48,7 +48,7 @@
private TagHandlerGeneratorVisitor tagHandlerGeneratorVisitor;
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
library.accept(tagHandlerGeneratorVisitor,null);
}
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagWithModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagWithModel.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagWithModel.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.generate.java.taghandler;
+
+import org.richfaces.cdk.model.TagModel;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class TagWithModel<M> {
+
+ private final TagModel tag;
+
+ private final M model;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param tag
+ * @param model
+ */
+ public TagWithModel(TagModel tag, M model) {
+ this.tag = tag;
+ this.model = model;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the tag
+ */
+ public TagModel getTag() {
+ return this.tag;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the model
+ */
+ public M getModel() {
+ return this.model;
+ }
+
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagWithModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -31,7 +31,6 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Generator;
import org.richfaces.cdk.Output;
import org.richfaces.cdk.Outputs;
import org.richfaces.cdk.model.ComponentLibrary;
@@ -44,18 +43,14 @@
*/
public class TaglibWriter implements CdkWriter {
- @Inject
- private ComponentLibrary library;
@Inject
@Output(Outputs.RESOURCES)
private FileManager output;
- @Inject
- private Generator generator;
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
TaglibGeneratorVisitor visitor = new TaglibGeneratorVisitor();
library.accept(visitor,library);
@@ -68,7 +63,7 @@
OutputFormat format1 = OutputFormat.createPrettyPrint();
format1.setIndentSize(4);
- XMLWriter writer = new XMLWriter(getOutput(), format1);
+ XMLWriter writer = new XMLWriter(getOutput(library), format1);
writer.write(document);
writer.close();
} catch (IOException e) {
@@ -76,7 +71,7 @@
}
}
- protected Writer getOutput() throws CdkException {
+ protected Writer getOutput(ComponentLibrary library) throws CdkException {
try {
return output.createOutput("META-INF/" +
library.getTaglib().getShortName() + ".taglib.xml", library.lastModified());
} catch (IOException e) {
@@ -84,14 +79,7 @@
}
}
- public ComponentLibrary getLibrary() {
- return library;
- }
- public void setLibrary(ComponentLibrary library) {
- this.library = library;
- }
-
public void setOutput(FileManager output) {
this.output = output;
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -53,7 +53,6 @@
* @author asmirnov(a)exadel.com
*/
public class RendererClassGenerator implements CdkWriter {
- private ComponentLibrary library;
private FileManager output;
private Logger log;
private TemplateVisitorFactory<RendererClassVisitor> visitorFactory;
@@ -69,17 +68,15 @@
* @param visitorFactory
*/
@Inject
- public RendererClassGenerator(ComponentLibrary library,
- @Output(Outputs.JAVA_CLASSES) FileManager output, Logger log,
+ public RendererClassGenerator((a)Output(Outputs.JAVA_CLASSES) FileManager output,
Logger log,
TemplateVisitorFactory<RendererClassVisitor> visitorFactory,
FreeMarkerRenderer renderer) {
- this.library = library;
this.output = output;
this.log = log;
this.visitorFactory = visitorFactory;
this.renderer = renderer;
}
-
- private ComponentModel findComponentByRenderer(RendererModel renderer) {
+
+ private ComponentModel findComponentByRenderer(RendererModel renderer,
ComponentLibrary library) {
return library.getComponentModel(renderer.getFamily());
}
@@ -89,14 +86,14 @@
* @see org.richfaces.cdk.CdkWriter#render(org.richfaces.cdk.model.ComponentLibrary
)
*/
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
for (RenderKitModel renderKit : library.getRenderKits()) {
for (RendererModel renderer : renderKit.getRenderers()) {
Template template = renderer.getTemplate();
if (null != template) {
- Collection<PropertyBase> attributes =
ModelSet.<PropertyBase>create();
+ Collection<PropertyBase> attributes =
ModelSet.<PropertyBase> create();
- ComponentModel component = findComponentByRenderer(renderer);
+ ComponentModel component = findComponentByRenderer(renderer,
library);
if (component != null) {
attributes.addAll(component.getAttributes());
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FacesConfigGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FacesConfigGenerator.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FacesConfigGenerator.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -54,8 +54,6 @@
@Inject
private JAXB jaxbBinding;
- @Inject
- private ComponentLibrary library;
@Inject @Output(Outputs.RESOURCES)
private FileManager outputFileManager;
@@ -74,7 +72,7 @@
* )
*/
@Override
- public void render() throws CdkException {
+ public void render(ComponentLibrary library) throws CdkException {
// TODO - check modification time.
try {
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -151,7 +151,7 @@
expect(log.getErrorCount()).andReturn(0);
log.debug((CharSequence) anyObject());
expectLastCall().asStub();
- builder.generate();
+ builder.generate(library);
expectLastCall();
replay(log, element, roundEnv, builder, validator, cdkProcessor);
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/processors/AnnotationProcessorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/processors/AnnotationProcessorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/processors/AnnotationProcessorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -36,7 +36,7 @@
import org.richfaces.cdk.LibraryBuilder;
import org.richfaces.cdk.Logger;
import org.richfaces.cdk.Source;
-import org.richfaces.cdk.SourceFileManager;
+import org.richfaces.cdk.SourceFileManagerImpl;
import org.richfaces.cdk.SourceImpl;
import org.richfaces.cdk.Sources;
import org.richfaces.cdk.annotations.JsfComponent;
@@ -111,7 +111,7 @@
sourceFiles.add(getJavaFile(src));
}
binder.bind(FileManager.class).annotatedWith(new
SourceImpl(Sources.JAVA_SOURCES)).toInstance(
- new SourceFileManager(sourceFiles, this.testSourceDirectory));
+ new SourceFileManagerImpl(sourceFiles, this.testSourceDirectory));
} catch (Exception e) {
throw new RuntimeException(e);
}
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/BehaviorClassGeneratorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/BehaviorClassGeneratorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/BehaviorClassGeneratorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -72,7 +72,7 @@
ComponentLibrary library = new ComponentLibrary();
library.getBehaviors().add(behavior);
- generator.generate(behavior);
+ generator.generate(library,behavior);
log.debug(outputWriter.toString());
verify(output);
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -145,7 +145,7 @@
library.getComponents().add(component);
- generator.generate(component);
+ generator.generate(library,component);
log.debug(outputWriter.toString());
verify(output);
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ConverterClassGeneratorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ConverterClassGeneratorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ConverterClassGeneratorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -73,7 +73,7 @@
ComponentLibrary library = new ComponentLibrary();
library.getConverters().add(converter);
- generator.generate(converter);
+ generator.generate(library,converter);
log.debug(outputWriter.toString());
verify(output);
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ValidatorClassGeneratorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ValidatorClassGeneratorTest.java 2010-05-25
23:49:09 UTC (rev 17242)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ValidatorClassGeneratorTest.java 2010-05-25
23:55:03 UTC (rev 17243)
@@ -72,7 +72,7 @@
ComponentLibrary library = new ComponentLibrary();
library.getValidators().add(validator);
- generator.generate(validator);
+ generator.generate(library,validator);
log.debug(outputWriter.toString());
verify(output);