Author: Alex.Kolonitsky
Date: 2010-03-09 06:07:41 -0500 (Tue, 09 Mar 2010)
New Revision: 16538
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/BehaviorProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ProcessorBase.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/SourceUtilsProvider.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/TaskFactoryImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/ModelElementBaseTemplateModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/TagTemplateModel.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/ValidatorClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BeanModelBase.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassName.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/DescriptionGroup.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacesId.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Named.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.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/templatecompiler/RendererClassVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/TemplateVisitorFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java
Log:
fix checkstyle vilations
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/AptBuilder.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -25,16 +25,14 @@
package org.richfaces.cdk.apt;
-import java.util.Set;
-
-import javax.tools.JavaCompiler.CompilationTask;
-
+import com.google.inject.Inject;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.LibraryBuilder;
import org.richfaces.cdk.Logger;
-import com.google.inject.Inject;
+import javax.tools.JavaCompiler.CompilationTask;
+import java.util.Set;
/**
* <p class="changed_added_4_0">
@@ -69,8 +67,6 @@
for (CdkWriter generator : generators) {
generator.render();
}
-
- }
+ }
}
-
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/BehaviorProcessor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/BehaviorProcessor.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/BehaviorProcessor.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -26,12 +26,11 @@
import org.richfaces.cdk.CdkProcessingException;
import org.richfaces.cdk.annotations.JsfBehavior;
import org.richfaces.cdk.model.BehaviorModel;
-import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.FacesId;
import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.lang.model.element.TypeElement;
import javax.faces.view.facelets.BehaviorHandler;
+import javax.lang.model.element.TypeElement;
import java.lang.annotation.Annotation;
/**
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ProcessorBase.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ProcessorBase.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ProcessorBase.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -3,7 +3,6 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import org.richfaces.cdk.NamingConventions;
-import org.richfaces.cdk.util.Strings;
import org.richfaces.cdk.annotations.DisplayName;
import org.richfaces.cdk.annotations.Icon;
import org.richfaces.cdk.annotations.Tag;
@@ -13,13 +12,7 @@
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.MirroredTypeException;
-import javax.lang.model.type.MirroredTypesException;
-import javax.lang.model.type.TypeMirror;
-
import java.util.Collection;
-import java.util.List;
-import java.util.Map;
public abstract class ProcessorBase {
@@ -128,11 +121,11 @@
protected void setClassNames(TypeElement componentElement, ModelElementBase
modelElement,
String generatedClass, String baseClass) {
- if (componentElement.getModifiers().contains(Modifier.ABSTRACT)) {
- modelElement.setGenerate(true);
- }
- modelElement.setBaseClass(ClassName.parseName(baseClass));
- modelElement.setTargetClass(ClassName.parseName(generatedClass));
+ if (componentElement.getModifiers().contains(Modifier.ABSTRACT)) {
+ modelElement.setGenerate(true);
+ }
+ modelElement.setBaseClass(ClassName.parseName(baseClass));
+ modelElement.setTargetClass(ClassName.parseName(generatedClass));
}
protected Collection<Property> parseProperties(String attributesConfig) {
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/SourceUtilsProvider.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/SourceUtilsProvider.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/SourceUtilsProvider.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,13 +23,13 @@
package org.richfaces.cdk.apt;
-import javax.annotation.processing.ProcessingEnvironment;
-
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Provider;
import com.google.inject.Singleton;
+import javax.annotation.processing.ProcessingEnvironment;
+
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
@@ -50,7 +50,7 @@
* @param defaultUtils
*/
@Inject
- public SourceUtilsProvider(ReflectionUtils defaultUtils,Injector injector) {
+ public SourceUtilsProvider(ReflectionUtils defaultUtils, Injector injector) {
this.defaultUtils = defaultUtils;
this.utils = defaultUtils;
this.injector = injector;
@@ -68,7 +68,7 @@
* @param processingEnv the processingEnv to set
*/
public void setProcessingEnv(ProcessingEnvironment processingEnv) {
- if(null != processingEnv){
+ if (null != processingEnv) {
this.utils = new AptSourceUtils(processingEnv);
injector.injectMembers(this.utils);
} else {
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/TaskFactoryImpl.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/TaskFactoryImpl.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/TaskFactoryImpl.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,36 +23,21 @@
package org.richfaces.cdk.apt;
+import com.google.common.collect.ImmutableCollection;
+import com.google.common.collect.ImmutableList;
+import com.google.inject.Inject;
+import org.richfaces.cdk.*;
+
+import javax.annotation.processing.Processor;
+import javax.tools.*;
+import javax.tools.Diagnostic.Kind;
+import javax.tools.JavaCompiler.CompilationTask;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.Locale;
-import javax.annotation.processing.Processor;
-import javax.tools.Diagnostic;
-import javax.tools.DiagnosticListener;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.StandardLocation;
-import javax.tools.ToolProvider;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.JavaCompiler.CompilationTask;
-
-import org.richfaces.cdk.CdkClassLoader;
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Logger;
-import org.richfaces.cdk.Output;
-import org.richfaces.cdk.Source;
-import org.richfaces.cdk.Outputs;
-import org.richfaces.cdk.Sources;
-
-import com.google.common.collect.ImmutableCollection;
-import com.google.common.collect.ImmutableList;
-import com.google.inject.Inject;
-
/**
* <p class="changed_added_4_0">
* </p>
@@ -85,7 +70,8 @@
}
}
- private static final ImmutableCollection<String> COMPILER_OPTIONS =
ImmutableList.of("-proc:only","-implicit:class","-verbose");
+ private static final ImmutableCollection<String> COMPILER_OPTIONS =
+ ImmutableList.of("-proc:only", "-implicit:class",
"-verbose");
@Inject
private Logger log;
@@ -124,9 +110,10 @@
@Override
public CompilationTask get() throws AptException {
diagnosticListener = new DiagnosticListenerImplementation();
- Iterable<? extends JavaFileObject> sourceObjects =
getFileManager().getJavaFileObjectsFromFiles(sourceFolders.getFiles());
- CompilationTask task =
- getJavaCompiler().getTask(null, getFileManager(), diagnosticListener,
COMPILER_OPTIONS, null, sourceObjects);
+ Iterable<? extends JavaFileObject> sourceObjects = getFileManager()
+ .getJavaFileObjectsFromFiles(sourceFolders.getFiles());
+ CompilationTask task = getJavaCompiler()
+ .getTask(null, getFileManager(), diagnosticListener, COMPILER_OPTIONS,
null, sourceObjects);
task.setLocale(locale);
task.setProcessors(Collections.singleton(cdkProcessor));
return task;
@@ -143,7 +130,7 @@
}
fileManager.setLocation(StandardLocation.SOURCE_PATH,
sourceFolders.getFolders());
} catch (IOException e) {
- throw new CdkException("Cannot configure JavaFileManager for
compilator",e);
+ throw new CdkException("Cannot configure JavaFileManager for
compilator", e);
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -25,25 +25,19 @@
package org.richfaces.cdk.freemarker;
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.CdkWriter;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.LibraryVisitor;
-import org.richfaces.cdk.model.ModelElementBase;
-import org.richfaces.cdk.model.Trackable;
-import org.richfaces.cdk.model.Visitable;
-
import com.google.inject.Inject;
-
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
+import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.CdkWriter;
+import org.richfaces.cdk.FileManager;
+import org.richfaces.cdk.model.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.Writer;
+
/**
* <p class="changed_added_4_0">Base class for all output file buildes
that use FreeMarker as template engine.</p>
* @author asmirnov(a)exadel.com
@@ -60,7 +54,7 @@
private final FileManager output;
@Inject
- public FreeMarkerRenderer(Configuration configuration,ComponentLibrary library,
FileManager output) {
+ public FreeMarkerRenderer(Configuration configuration, ComponentLibrary library,
FileManager output) {
this.configuration = configuration;
this.library = library;
this.output = output;
@@ -126,7 +120,7 @@
ModelElementBase modelElement = (ModelElementBase) c;
return modelElement.getTargetClass().getName().replace('.',
File.separatorChar) + ".java";
} else {
- throw new CdkException("Unknown model object "+c);
+ throw new CdkException("Unknown model object " + c);
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/ModelElementBaseTemplateModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/ModelElementBaseTemplateModel.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/ModelElementBaseTemplateModel.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -25,25 +25,22 @@
package org.richfaces.cdk.freemarker;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-import org.richfaces.cdk.model.EventName;
-import org.richfaces.cdk.model.ModelElementBase;
-import org.richfaces.cdk.model.Property;
-
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
-
import freemarker.ext.beans.BeanModel;
import freemarker.ext.beans.BeansWrapper;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
+import org.richfaces.cdk.model.EventName;
+import org.richfaces.cdk.model.ModelElementBase;
+import org.richfaces.cdk.model.Property;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -119,9 +116,9 @@
Collection<Property> attributes = model.getAttributes();
Collection<PropertyModel> models = new
ArrayList<PropertyModel>(attributes.size());
for (Property entry : attributes) {
- if (entry.isGenerate() ) {
+ if (entry.isGenerate()) {
PropertyModel propertyModel = new PropertyModel(entry, wrapper);
- models.add(propertyModel);
+ models.add(propertyModel);
}
}
return wrapper.wrap(models);
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/TagTemplateModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/TagTemplateModel.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/TagTemplateModel.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -22,18 +22,20 @@
package org.richfaces.cdk.freemarker;
-import org.richfaces.cdk.model.*;
-
-import java.util.*;
-
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+import freemarker.ext.beans.BeanModel;
import freemarker.ext.beans.BeansWrapper;
-import freemarker.ext.beans.BeanModel;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-import com.google.common.base.Predicate;
+import org.richfaces.cdk.model.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
/**
* @author akolonitsky
* @since Feb 23, 2010
@@ -131,7 +133,7 @@
for (Property entry : attributes) {
if (entry.isGenerate() && entry.isBindingAttribute()) {
PropertyModel propertyModel = new PropertyModel(entry, wrapper);
- models.add(propertyModel);
+ models.add(propertyModel);
}
}
return wrapper.wrap(models);
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/BehaviorClassGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -22,9 +22,8 @@
package org.richfaces.cdk.generate.java;
-import java.io.File;
-
-import org.richfaces.cdk.CdkException;
+import com.google.inject.Inject;
+import freemarker.template.Configuration;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
import org.richfaces.cdk.Output;
@@ -34,10 +33,6 @@
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Visitable;
-import com.google.inject.Inject;
-
-import freemarker.template.Configuration;
-
/**
* @author akolonitsky
* @since Jan 21, 2010
@@ -49,7 +44,8 @@
* @see org.richfaces.cdk.CdkWriter#init(org.richfaces.cdk.CdkContext)
*/
@Inject
- public BehaviorClassGenerator(Configuration configuration, ComponentLibrary library,
@Output(Outputs.JAVA_CLASSES) FileManager output) {
+ public BehaviorClassGenerator(Configuration configuration, ComponentLibrary library,
+ @Output(Outputs.JAVA_CLASSES) FileManager output) {
super(configuration, library, output);
}
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -25,9 +25,8 @@
package org.richfaces.cdk.generate.java;
-import java.io.File;
-
-import org.richfaces.cdk.CdkException;
+import com.google.inject.Inject;
+import freemarker.template.Configuration;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
import org.richfaces.cdk.Output;
@@ -37,10 +36,6 @@
import org.richfaces.cdk.model.ComponentModel;
import org.richfaces.cdk.model.Visitable;
-import com.google.inject.Inject;
-
-import freemarker.template.Configuration;
-
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ConverterClassGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -22,9 +22,8 @@
package org.richfaces.cdk.generate.java;
-import java.io.File;
-
-import org.richfaces.cdk.CdkException;
+import com.google.inject.Inject;
+import freemarker.template.Configuration;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
import org.richfaces.cdk.Output;
@@ -34,10 +33,6 @@
import org.richfaces.cdk.model.ConverterModel;
import org.richfaces.cdk.model.Visitable;
-import com.google.inject.Inject;
-
-import freemarker.template.Configuration;
-
/**
* @author akolonitsky
* @since Jan 20, 2010
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ValidatorClassGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -22,9 +22,8 @@
package org.richfaces.cdk.generate.java;
-import java.io.File;
-
-import org.richfaces.cdk.CdkException;
+import com.google.inject.Inject;
+import freemarker.template.Configuration;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
import org.richfaces.cdk.Output;
@@ -34,10 +33,6 @@
import org.richfaces.cdk.model.ValidatorModel;
import org.richfaces.cdk.model.Visitable;
-import com.google.inject.Inject;
-
-import freemarker.template.Configuration;
-
/**
* @author akolonitsky
* @since Jan 15, 2010
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGenerator.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGenerator.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,25 +23,19 @@
package org.richfaces.cdk.generate.taglib;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Map;
-
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.CdkWriter;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Output;
-import org.richfaces.cdk.Outputs;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.LibraryVisitor;
-import org.richfaces.cdk.model.Visitable;
-
import com.google.inject.Inject;
-
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
+import org.richfaces.cdk.*;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.LibraryVisitor;
+import org.richfaces.cdk.model.Visitable;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+
/**
* <p class="changed_added_4_0">
* </p>
@@ -104,8 +98,8 @@
@Override
public Boolean visit(Visitable c, Writer output) throws CdkException {
TagGenerator<Visitable> tagGenerator = (TagGenerator<Visitable>)
tagGenerators.get(c.getClass());
- if(null != tagGenerator){
- tagGenerator.generate(c,output);
+ if (null != tagGenerator) {
+ tagGenerator.generate(c, output);
}
return false;
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -28,7 +28,6 @@
import org.richfaces.cdk.model.*;
import java.util.List;
-import java.util.Map;
/**
* @author akolonitsky
@@ -79,34 +78,36 @@
}
private String getTagName(ModelElementBase model) {
- return model.getTag().getName();
+ return model.getTag().getName();
}
public void visitConverter(ConverterModel model) {
TagModel tagModel = model.getTag();
if (null != tagModel) {
- Element tag = createTag(tagModel.getName());
- Element converter = tag.addElement("converter");
- converter.addElement("converter-id", model.getId().toString());
+ Element tag = createTag(tagModel.getName());
+ Element converter = tag.addElement("converter");
+ converter.addElement("converter-id", model.getId().toString());
- addTagHandler(converter, model.getTag());
- appendAttributs(tag, model);
+ addTagHandler(converter, model.getTag());
+ appendAttributs(tag, model);
+ }
+ }
- } }
-
/**
- * <tag>
- * <tag-name>formatValidator</tag-name>
- * <validator>
- * <validator-id></validator-id>
- * <handler-class></handler-class>
- * </validator>
+ * <pre>
+ * <tag>
+ * <tag-name>formatValidator</tag-name>
+ * <validator>
+ * <validator-id></validator-id>
+ * <handler-class></handler-class>
+ * </validator>
*
- * <attribute>
+ * <attribute>
* ...
- * </attribute>
- * </tag>
+ * </attribute>
+ * </tag>
+ * <pre>
*
* */
public void visitValidator(ValidatorModel model) {
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BeanModelBase.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BeanModelBase.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BeanModelBase.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -24,9 +24,7 @@
import java.util.Collection;
-import org.richfaces.cdk.util.ComparatorUtils;
-
/**
* This is the base class for all Java Bean-like JSF objects in the model.
* @author akolonitsky
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -93,12 +93,12 @@
@Override
public boolean same(BehaviorRenderer other) {
- if(null != getType() && null != other.getType()){
+ if (null != getType() && null != other.getType()) {
// Both types not null, compare them.
return getType().equals(other.getType());
}
// one or both types are null, compare classes.
- if(null != getRendererClass() &&
getRendererClass().equals(other.getRendererClass())){
+ if (null != getRendererClass() &&
getRendererClass().equals(other.getRendererClass())) {
return true;
}
return false;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassName.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassName.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassName.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,11 +23,10 @@
package org.richfaces.cdk.model;
-import java.io.Serializable;
-
+import com.google.common.collect.ImmutableMap;
import org.richfaces.cdk.util.Strings;
-import com.google.common.collect.ImmutableMap;
+import java.io.Serializable;
/**
* <p class="changed_added_4_0">
@@ -68,14 +67,6 @@
private String typeParameters;
/**
- * <p class="changed_added_4_0">Factory method to create class names.
For empty or null name, returns null</p>
- * @param name fully-cvalified class name
- * @return new class name instance or null.
- */
- public static ClassName parseName(String name){
- return Strings.isEmpty(name)?null:new ClassName(name);
- }
- /**
* <p class="changed_added_4_0"></p>
*
* @param cl
@@ -114,6 +105,15 @@
}
}
+ /**
+ * <p class="changed_added_4_0">Factory method to create class names.
For empty or null name, returns null</p>
+ * @param name fully-cvalified class name
+ * @return new class name instance or null.
+ */
+ public static ClassName parseName(String name) {
+ return Strings.isEmpty(name) ? null : new ClassName(name);
+ }
+
public static ClassName get(String name) {
if (name == null) {
return null;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -1,9 +1,9 @@
package org.richfaces.cdk.model;
+import org.richfaces.cdk.CdkException;
+
import java.util.Collection;
-import org.richfaces.cdk.CdkException;
-
/**
* That class represents JSF component in the CDK.
* That is mapped to faces-config "component" element.
@@ -62,8 +62,8 @@
@Override
public void merge(ComponentModel otherComponent) {
//merge facets, renderers, events ...
- ComponentLibrary.merge(getAttributes(),otherComponent.getAttributes());
- ComponentLibrary.merge(getFacets(),otherComponent.getFacets());
+ ComponentLibrary.merge(getAttributes(), otherComponent.getAttributes());
+ ComponentLibrary.merge(getFacets(), otherComponent.getFacets());
ComponentLibrary.merge(getEvents(), otherComponent.getEvents());
ComponentLibrary.merge(getRenderers(), otherComponent.getRenderers());
ComponentLibrary.merge(this, otherComponent);
@@ -72,7 +72,7 @@
@Override
public boolean same(ComponentModel other) {
- if(null != getType() && null != other.getType()){
+ if (null != getType() && null != other.getType()) {
// Both types not null, compare them.
return getType().equals(other.getType());
}
@@ -152,7 +152,7 @@
public FacetModel getOrCreateFacet(String name) {
FacetModel facet = getFacet(name);
- if(null == facet){
+ if (null == facet) {
facet = new FacetModel();
facet.setName(name);
facets.add(facet);
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -65,7 +65,7 @@
@Override
public void merge(ConverterModel other) {
- ComponentLibrary.merge(getAttributes(),other.getAttributes());
+ ComponentLibrary.merge(getAttributes(), other.getAttributes());
ComponentLibrary.merge(this, other);
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/DescriptionGroup.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/DescriptionGroup.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/DescriptionGroup.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -69,7 +69,9 @@
*
* @author asmirnov(a)exadel.com
*/
- @XmlType(name = "iconType", namespace =
ComponentLibrary.FACES_CONFIG_NAMESPACE,propOrder={"smallIcon","largeIcon"})
+ @XmlType(name = "iconType",
+ namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE,
+ propOrder = {"smallIcon", "largeIcon"})
public static final class Icon {
private String largeIcon;
private String smallIcon;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacesId.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacesId.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacesId.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,10 +23,10 @@
package org.richfaces.cdk.model;
+import org.richfaces.cdk.util.Strings;
+
import java.io.Serializable;
-import org.richfaces.cdk.util.Strings;
-
/**
* <p class="changed_added_4_0">This is a FacesId class that should be
used to find JSF elements in {@link ComponentLibrary}</p>
*
@@ -37,9 +37,6 @@
private final String type;
- public static FacesId parseId(String id){
- return Strings.isEmpty(id)?null:new FacesId(id);
- }
/**
* <p class="changed_added_4_0"></p>
*
@@ -49,6 +46,10 @@
this.type = type;
}
+ public static FacesId parseId(String id) {
+ return Strings.isEmpty(id) ? null : new FacesId(id);
+ }
+
/**
* <p class="changed_added_4_0"></p>
*
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Named.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Named.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Named.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,10 +23,9 @@
package org.richfaces.cdk.model;
+import com.google.common.base.Predicate;
import org.richfaces.cdk.util.ComparatorUtils;
-import com.google.common.base.Predicate;
-
/**
* <p class="changed_added_4_0">This interface represents all models for
"named" JSF objects ( attributes, properties, facets )</p>
* @author asmirnov(a)exadel.com
@@ -36,15 +35,15 @@
public static final class NamedPredicate implements Predicate<Named> {
- private final String _name;
-
+ private final String name;
+
public NamedPredicate(String name) {
- this._name = name;
+ this.name = name;
}
@Override
public boolean apply(Named input) {
- return ComparatorUtils.nullSafeEquals(input.getName(), this._name);
+ return ComparatorUtils.nullSafeEquals(input.getName(), this.name);
}
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -47,7 +47,7 @@
private TagModel tag;
- public RendererModel() {}
+ public RendererModel() { }
public RendererModel(Type type) {
this.type = type;
@@ -171,16 +171,16 @@
@Override
public boolean same(RendererModel other) {
- if(null != getType() && null != other.getType()){
+ if (null != getType() && null != other.getType()) {
// compare families ?
- if(null != getFamily() && null != other.getFamily() &&
!getFamily().equals(other.getFamily())){
+ if (null != getFamily() && null != other.getFamily() &&
!getFamily().equals(other.getFamily())) {
return false;
}
// Both types not null, compare them.
return getType().equals(other.getType());
}
// one or both types are null, compare classes.
- if(null != getRendererClass()&&
getRendererClass().equals(other.getRendererClass())){
+ if (null != getRendererClass() &&
getRendererClass().equals(other.getRendererClass())) {
return true;
}
return false;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -25,23 +25,16 @@
package org.richfaces.cdk.model.validator;
-import java.util.Collection;
-
+import com.google.inject.Inject;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.Logger;
import org.richfaces.cdk.ModelValidator;
import org.richfaces.cdk.NamingConventions;
import org.richfaces.cdk.apt.SourceUtils;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.ComponentModel;
-import org.richfaces.cdk.model.DescriptionGroup;
-import org.richfaces.cdk.model.FacetModel;
-import org.richfaces.cdk.model.Property;
-import org.richfaces.cdk.model.RenderKitModel;
-import org.richfaces.cdk.model.RendererModel;
+import org.richfaces.cdk.model.*;
import org.richfaces.cdk.util.Strings;
-import com.google.inject.Inject;
+import java.util.Collection;
/**
* <p class="changed_added_4_0"></p>
@@ -126,7 +119,7 @@
} else if (null == component.getComponentClass()) {
component.setTargetClass(namingConventions.inferUIComponentClass(component.getType()));
}
- } else if (null == component.getComponentClass()){
+ } else if (null == component.getComponentClass()) {
if (null != component.getBaseClass()) {
component.setTargetClass(component.getBaseClass());
} else {
@@ -135,13 +128,13 @@
}
}
// Check family.
- if(null == component.getFamily()){
+ if (null == component.getFamily()) {
component.setFamily(namingConventions.inferUIComponentFamily(component.getType()));
}
// TODO Propagate attributes from parent component.
// Check attributes.
for (Property attribute : component.getAttributes()) {
- verifyAttribute(attribute,component.isGenerate());
+ verifyAttribute(attribute, component.isGenerate());
}
// compact(component.getAttributes());
// Check renderers.
@@ -154,28 +147,28 @@
protected void verifyAttribute(Property attribute, boolean generatedComponent) {
// Check name.
- if(Strings.isEmpty(attribute.getName())){
- log.error("No name for attribute "+attribute);
+ if (Strings.isEmpty(attribute.getName())) {
+ log.error("No name for attribute " + attribute);
return;
}
- if(attribute.getName().contains(".") ||
Character.isDigit(attribute.getName().charAt(0)) || attribute.getName().contains("
") ){
- log.error("Invalid attribute name
["+attribute.getName()+"]");
+ if (attribute.getName().contains(".") ||
Character.isDigit(attribute.getName().charAt(0)) || attribute.getName().contains("
")) {
+ log.error("Invalid attribute name [" + attribute.getName() +
"]");
return;
}
// Check type
- if(null == attribute.getType()){
- log.error("Unknown type of attribute
["+attribute.getName()+"]");
+ if (null == attribute.getType()) {
+ log.error("Unknown type of attribute [" + attribute.getName() +
"]");
return;
}
// Check binding properties.
-
if("javax.faces.el.MethodBinding".equals(attribute.getType().getName())){
+ if
("javax.faces.el.MethodBinding".equals(attribute.getType().getName())) {
attribute.setBinding(true);
attribute.setBindingAttribute(true);
- } else
if("javax.el.MethodExpression".equals(attribute.getType().getName())){
+ } else if
("javax.el.MethodExpression".equals(attribute.getType().getName())) {
attribute.setBindingAttribute(true);
}
// Check "generate" flag.
- if(generatedComponent){
+ if (generatedComponent) {
// TODO Attribute should be only generated if it does not exist or abstract in
the base class.
// Step one - check base class
} else {
@@ -184,7 +177,7 @@
verifyDescription(attribute);
}
- protected void verifyDescription(DescriptionGroup element){
+ protected void verifyDescription(DescriptionGroup element) {
}
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-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassGenerator.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,32 +23,18 @@
package org.richfaces.cdk.templatecompiler;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Collection;
-import java.util.Map;
-
+import com.google.inject.Inject;
+import freemarker.template.TemplateException;
import org.richfaces.builder.model.JavaClass;
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.CdkWriter;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Logger;
-import org.richfaces.cdk.Output;
-import org.richfaces.cdk.Outputs;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.ComponentModel;
-import org.richfaces.cdk.model.ModelCollection;
-import org.richfaces.cdk.model.Property;
-import org.richfaces.cdk.model.RenderKitModel;
-import org.richfaces.cdk.model.RendererModel;
+import org.richfaces.cdk.*;
+import org.richfaces.cdk.model.*;
import org.richfaces.cdk.model.RendererModel.Type;
import org.richfaces.cdk.templatecompiler.model.Template;
-import com.google.common.collect.Maps;
-import com.google.inject.Inject;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Collection;
-import freemarker.template.TemplateException;
-
/**
* <p class="changed_added_4_0">
* </p>
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,35 +23,11 @@
package org.richfaces.cdk.templatecompiler;
-import static org.richfaces.cdk.templatecompiler.QNameComparator.QNAME_COMPARATOR;
-import static org.richfaces.cdk.util.JavaUtils.getEscapedString;
-import static org.richfaces.cdk.util.JavaUtils.getEscapedStringsArray;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.Renderer;
-import javax.xml.namespace.QName;
-
-import org.richfaces.builder.model.Argument;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaMethod;
-import org.richfaces.builder.model.JavaModifier;
-import org.richfaces.builder.model.MethodBody;
-import org.richfaces.builder.model.MethodBodyStatementsContainer;
+import com.google.common.base.Function;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import org.richfaces.builder.model.*;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.Logger;
import org.richfaces.cdk.attributes.Attribute;
@@ -60,33 +36,22 @@
import org.richfaces.cdk.attributes.SchemaSet;
import org.richfaces.cdk.model.EventName;
import org.richfaces.cdk.model.Property;
-import org.richfaces.cdk.parser.el.ELParserUtils;
-import org.richfaces.cdk.parser.el.ELVisitor;
-import org.richfaces.cdk.parser.el.HelperMethod;
-import org.richfaces.cdk.parser.el.ParsingException;
-import org.richfaces.cdk.parser.el.Type;
+import org.richfaces.cdk.parser.el.*;
import org.richfaces.cdk.parser.el.types.TypesFactory;
-import org.richfaces.cdk.templatecompiler.model.AnyElement;
-import org.richfaces.cdk.templatecompiler.model.CdkBodyElement;
-import org.richfaces.cdk.templatecompiler.model.CdkCallElement;
-import org.richfaces.cdk.templatecompiler.model.CdkChooseElement;
-import org.richfaces.cdk.templatecompiler.model.CdkForEachElement;
-import org.richfaces.cdk.templatecompiler.model.CdkIfElement;
-import org.richfaces.cdk.templatecompiler.model.CdkObjectElement;
-import org.richfaces.cdk.templatecompiler.model.CdkOtherwiseElement;
-import org.richfaces.cdk.templatecompiler.model.CdkWhenElement;
-import org.richfaces.cdk.templatecompiler.model.CompositeImplementation;
-import org.richfaces.cdk.templatecompiler.model.CompositeInterface;
-import org.richfaces.cdk.templatecompiler.model.Template;
-import org.richfaces.cdk.templatecompiler.model.TemplateVisitor;
-import org.richfaces.cdk.util.ComparatorUtils;
+import static org.richfaces.cdk.templatecompiler.QNameComparator.QNAME_COMPARATOR;
+import org.richfaces.cdk.templatecompiler.model.*;
+import static org.richfaces.cdk.util.JavaUtils.getEscapedString;
+import static org.richfaces.cdk.util.JavaUtils.getEscapedStringsArray;
import org.richfaces.cdk.util.Strings;
import org.richfaces.cdk.xmlconfig.JAXB;
-import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.util.*;
/**
* <p class="changed_added_4_0">
@@ -297,7 +262,7 @@
// OPTIMIZATION - use ModelCollection with lookup method
for (Property property : attributes) {
- if(attributeName.equals(property.getName())){
+ if (attributeName.equals(property.getName())) {
Set<EventName> eventNames = property.getEventNames();
if (eventNames != null && !eventNames.isEmpty()) {
sb.append(".setEventNames(");
@@ -322,7 +287,7 @@
private String createPassThroughField(Map<String, Attribute> htmlAttributesMap)
{
String fieldName = PASS_THROUGH_ATTRIBUTES_FIELD_NAME;
if (passThroughCounter >= 0) {
- fieldName += ("_" + passThroughCounter);
+ fieldName += "_" + passThroughCounter;
}
passThroughCounter++;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,35 +23,23 @@
package org.richfaces.cdk.templatecompiler;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import org.richfaces.cdk.*;
+import org.richfaces.cdk.model.*;
+import org.richfaces.cdk.templatecompiler.model.*;
+import org.richfaces.cdk.xmlconfig.FragmentParser;
+import org.richfaces.cdk.xmlconfig.JAXB;
+
import java.io.File;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Logger;
-import org.richfaces.cdk.ModelBuilder;
-import org.richfaces.cdk.Source;
-import org.richfaces.cdk.Sources;
-import org.richfaces.cdk.model.ClassName;
-import org.richfaces.cdk.model.*;
-import org.richfaces.cdk.templatecompiler.model.Attribute;
-import org.richfaces.cdk.templatecompiler.model.ClientBehavior;
-import org.richfaces.cdk.templatecompiler.model.CompositeInterface;
-import org.richfaces.cdk.templatecompiler.model.ImportAttributes;
-import org.richfaces.cdk.templatecompiler.model.Template;
-import org.richfaces.cdk.xmlconfig.FragmentParser;
-import org.richfaces.cdk.xmlconfig.JAXB;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.inject.Inject;
-
/**
* <p class="changed_added_4_0">
* </p>
@@ -85,7 +73,9 @@
* @param sources
*/
@Inject
- public RendererTemplateParser(ComponentLibrary library, JAXB jaxbBinding, Logger log,
@Source(Sources.RENDERER_TEMPLATES) FileManager sources,FragmentParser fragmentParser) {
+ public RendererTemplateParser(ComponentLibrary library, JAXB jaxbBinding, Logger
log,
+ @Source(Sources.RENDERER_TEMPLATES) FileManager
sources,
+ FragmentParser fragmentParser) {
this.library = library;
this.jaxbBinding = jaxbBinding;
this.log = log;
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/TemplateVisitorFactory.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/TemplateVisitorFactory.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/TemplateVisitorFactory.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,13 +23,12 @@
package org.richfaces.cdk.templatecompiler;
-import java.util.Collection;
-import java.util.Map;
-
import org.richfaces.cdk.model.Property;
import org.richfaces.cdk.templatecompiler.model.CompositeInterface;
import org.richfaces.cdk.templatecompiler.model.TemplateVisitor;
+import java.util.Collection;
+
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
@@ -37,6 +36,6 @@
*/
public interface TemplateVisitorFactory <T extends TemplateVisitor> {
- public T createVisitor(CompositeInterface composite,Collection<Property>
attributes);
+ public T createVisitor(CompositeInterface composite, Collection<Property>
attributes);
}
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,10 +23,7 @@
package org.richfaces.cdk.xmlconfig;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
+import com.google.inject.Inject;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ComponentModel;
@@ -34,7 +31,8 @@
import org.richfaces.cdk.xmlconfig.model.ComponentAdapter;
import org.richfaces.cdk.xmlconfig.model.Fragment;
-import com.google.inject.Inject;
+import java.util.Collection;
+import java.util.Collections;
/**
* <p class="changed_added_4_0">
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,20 +23,21 @@
package org.richfaces.cdk.xmlconfig.model;
+import org.richfaces.cdk.model.ClassName;
+import org.richfaces.cdk.model.ComponentLibrary;
+
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.richfaces.cdk.model.ClassName;
-import org.richfaces.cdk.model.ComponentLibrary;
-
/**
* <p class="changed_added_4_0"></p>
*
* @author asmirnov(a)exadel.com
*/
-@XmlType(name="faces-config-propertyType",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE,
-
propOrder={"name","type","defaultValue","suggestedValue","extension"})
+@XmlType(name = "faces-config-propertyType",
+ namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE,
+ propOrder = {"name", "type", "defaultValue",
"suggestedValue", "extension"})
@XmlJavaTypeAdapter(AttributeAdapter.class)
public class PropertyBean extends PropertyBase {
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java 2010-03-09
01:17:56 UTC (rev 16537)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/RenderKitBean.java 2010-03-09
11:07:41 UTC (rev 16538)
@@ -23,26 +23,25 @@
package org.richfaces.cdk.xmlconfig.model;
-import java.util.List;
+import com.google.common.collect.Lists;
+import org.richfaces.cdk.model.*;
+import org.richfaces.cdk.model.RenderKitModel.Id;
import javax.faces.render.RenderKitFactory;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import java.util.List;
-import org.richfaces.cdk.model.ClassName;
-import org.richfaces.cdk.model.*;
-import org.richfaces.cdk.model.RenderKitModel.Id;
-
-import com.google.common.collect.Lists;
-
/**
* <p class="changed_added_4_0"></p>
*
* @author asmirnov(a)exadel.com
*/
-@XmlType(name="faces-config-render-kitType",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE,
-
propOrder={"key","renderkitClass","renderers","behaviorRenderers","extension"})
+@XmlType(
+ name = "faces-config-render-kitType",
+ namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE,
+ propOrder = {"key", "renderkitClass", "renderers",
"behaviorRenderers", "extension"})
public class RenderKitBean extends ExtensibleBean<RenderKitBean.RenderKitExtension>
implements MapEntry<RenderKitModel.Id> {
private List<RendererModel> renderers = Lists.newArrayList();