Author: Alex.Kolonitsky
Date: 2010-03-09 09:24:55 -0500 (Tue, 09 Mar 2010)
New Revision: 16539
Added:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
Removed:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/SuggestedValue.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/RendererProcessor.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/validator/ValidatorImpl.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/AbstractPoll.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxLog.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxOutputPanel.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractPush.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIRepeat.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxLog.java
Log:
fix core ui build
rename Component to JsfComponent
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,6 @@
package org.richfaces.cdk.annotations;
import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -39,7 +38,6 @@
*/
@Retention(RetentionPolicy.CLASS)
@Target( { ElementType.METHOD, ElementType.FIELD })
-@Inherited
public @interface Alias {
public static final String NAME = "org.richfaces.cdk.annotations.Alias";
Deleted:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -1,70 +0,0 @@
-/*
- * $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.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p class="changed_added_4_0">
- * That annotation marks class as JSF component. The difference with JSF 2.0 @
- * {@link javax.faces.component.FacesComponent} annotation is what this one could marks
abstaract class from which a
- * real UI-component implementation will be generated. The value of default {@link
#value()} attribute is taken to be
- * <em>component type</em>. The fully qualified class name becomes a
component class unless that class is abstract or
- * final component class is defined by the {@link Generate} annotation value.
- * </p>
- *
- * @author asmirnov(a)exadel.com
- */
-(a)Retention(RetentionPolicy.SOURCE)
-(a)Target(ElementType.TYPE)
-public @interface Component {
-
- /**
- * <p class="changed_added_4_0">
- * Annotation class name to use as key for annotation processor class.
- * </p>
- */
- public static final String NAME =
"org.richfaces.cdk.annotations.Component";
-
- /**
- * <p class="changed_added_4_0">
- * Type of the component. Currently this is mandatory parameter because CDK uses
<em>component-type</em> as primary
- * key for components library model.
- * </p>
- * <p class="todo">
- * TODO if this value is an empty, component type will be inferred from class name.
- * </p>
- *
- * @return component type.
- */
- public String value() default "";
-
- public boolean generate() default true;
-
- public Tag tag() default @Tag();
-
-}
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,6 @@
package org.richfaces.cdk.annotations;
import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -37,7 +36,6 @@
*/
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.TYPE)
-@Inherited
public @interface JsfBehavior {
public static final String NAME =
"org.richfaces.cdk.annotations.JsfBehavior";
Copied:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
(from rev 16537,
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java)
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
(rev 0)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -0,0 +1,70 @@
+/*
+ * $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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * That annotation marks class as JSF component. The difference with JSF 2.0 @
+ * {@link javax.faces.component.FacesComponent} annotation is what this one could marks
abstaract class from which a
+ * real UI-component implementation will be generated. The value of default {@link
#value()} attribute is taken to be
+ * <em>component type</em>. The fully qualified class name becomes a
component class unless that class is abstract or
+ * final component class is defined by the {@link Generate} annotation value.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ */
+(a)Retention(RetentionPolicy.SOURCE)
+(a)Target(ElementType.TYPE)
+public @interface JsfComponent {
+
+ /**
+ * <p class="changed_added_4_0">
+ * Annotation class name to use as key for annotation processor class.
+ * </p>
+ */
+ public static final String NAME =
"org.richfaces.cdk.annotations.JsfComponent";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Type of the component. Currently this is mandatory parameter because CDK uses
<em>component-type</em> as primary
+ * key for components library model.
+ * </p>
+ * <p class="todo">
+ * TODO if this value is an empty, component type will be inferred from class name.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String value() default "";
+
+ public boolean generate() default true;
+
+ public Tag tag() default @Tag();
+
+}
Property changes on:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,6 @@
package org.richfaces.cdk.annotations;
import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -35,9 +34,8 @@
*
* @author asmirnov(a)exadel.com
*/
-(a)Retention(RetentionPolicy.CLASS)
+(a)Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
-@Inherited
public @interface JsfConverter {
public static final String NAME =
"org.richfaces.cdk.annotations.JsfConverter";
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -1,18 +1,16 @@
package org.richfaces.cdk.annotations;
+import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
/**
* @author akolonitsky
* @since Jan 13, 2010
*/
-(a)Retention(RetentionPolicy.CLASS)
+(a)Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
-@Inherited
public @interface JsfValidator {
public static final String NAME =
"org.richfaces.cdk.annotations.JsfValidator";
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Renderer.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,6 @@
package org.richfaces.cdk.annotations;
import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -36,9 +35,8 @@
*
* @author asmirnov(a)exadel.com
*/
-(a)Retention(RetentionPolicy.CLASS)
+(a)Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
-@Inherited
public @interface Renderer {
public static final String NAME =
"org.richfaces.cdk.annotations.Renderer";
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,11 +23,8 @@
package org.richfaces.cdk.annotations;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
/**
* <p class="changed_added_4_0">
@@ -35,9 +32,7 @@
*
* @author asmirnov(a)exadel.com
*/
-(a)Retention(RetentionPolicy.CLASS)
-(a)Target(ElementType.TYPE)
-@Inherited
+(a)Retention(RetentionPolicy.SOURCE)
public @interface RendererTemplate {
public static final String NAME =
"org.richfaces.cdk.annotations.RendererTemplate";
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplates.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,11 +23,8 @@
package org.richfaces.cdk.annotations;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
/**
* <p class="changed_added_4_0">
@@ -35,9 +32,7 @@
*
* @author asmirnov(a)exadel.com
*/
-(a)Retention(RetentionPolicy.CLASS)
-(a)Target(ElementType.TYPE)
-@Inherited
+(a)Retention(RetentionPolicy.SOURCE)
public @interface RendererTemplates {
public static final String NAME =
"org.richfaces.cdk.annotations.RendererTemplates";
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/SuggestedValue.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/SuggestedValue.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/SuggestedValue.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,6 @@
package org.richfaces.cdk.annotations;
import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -36,9 +35,8 @@
* @author asmirnov(a)exadel.com
*
*/
-(a)Retention(RetentionPolicy.CLASS)
+(a)Retention(RetentionPolicy.SOURCE)
@Target( { ElementType.METHOD, ElementType.FIELD })
-@Inherited
public @interface SuggestedValue {
String value();
}
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -2,7 +2,7 @@
* <h1>Java annotations used by the CDK.</h1>
* <h2>Class-level annotations:</h2>
* <p>Mandatory:</p>
- * <p>@{@link Component}("component.Type") or @{@link
javax.faces.component.FacesComponent}("component.Type").</p>
+ * <p>@{@link JsfComponent}("component.Type") or
@{@link
javax.faces.component.FacesComponent}("component.Type").</p>
* <p>Optional:</p>
* <ul>
* <li>@{@link Family}("component.Family") defines component
family used in the generated class.<br /></li>
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/RichFacesConventions.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -44,7 +44,7 @@
name.setPrefix(baseName);
}
- // Component type does not contain class or markup parts.
+ // JsfComponent type does not contain class or markup parts.
name.setClassifier(null);
name.setMarkup(null);
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -25,9 +25,15 @@
package org.richfaces.cdk.apt;
-import java.lang.annotation.Annotation;
-import java.util.List;
-import java.util.Set;
+import com.google.common.collect.Lists;
+import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.annotations.*;
+import org.richfaces.cdk.annotations.EventName;
+import org.richfaces.cdk.apt.SourceUtils.BeanProperty;
+import org.richfaces.cdk.apt.SourceUtils.SuperTypeVisitor;
+import org.richfaces.cdk.model.*;
+import org.richfaces.cdk.util.Strings;
+import org.richfaces.cdk.xmlconfig.CdkEntityResolver;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.faces.event.FacesEvent;
@@ -36,46 +42,19 @@
import javax.lang.model.type.MirroredTypeException;
import javax.lang.model.type.MirroredTypesException;
import javax.lang.model.type.TypeMirror;
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.Set;
-import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.Attributes;
-import org.richfaces.cdk.annotations.Component;
-import org.richfaces.cdk.annotations.DefaultValue;
-import org.richfaces.cdk.annotations.DisplayName;
-import org.richfaces.cdk.annotations.EventName;
-import org.richfaces.cdk.annotations.EventNames;
-import org.richfaces.cdk.annotations.Facet;
-import org.richfaces.cdk.annotations.Facets;
-import org.richfaces.cdk.annotations.Family;
-import org.richfaces.cdk.annotations.Fires;
-import org.richfaces.cdk.annotations.Generate;
-import org.richfaces.cdk.annotations.Icon;
-import org.richfaces.cdk.annotations.Signature;
-import org.richfaces.cdk.annotations.SuggestedValue;
-import org.richfaces.cdk.annotations.Tag;
-import org.richfaces.cdk.apt.SourceUtils.BeanProperty;
-import org.richfaces.cdk.apt.SourceUtils.SuperTypeVisitor;
-import org.richfaces.cdk.model.ClassName;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.ComponentModel;
-import org.richfaces.cdk.model.FacesId;
-import org.richfaces.cdk.model.FacetModel;
-import org.richfaces.cdk.model.Property;
-import org.richfaces.cdk.util.Strings;
-import org.richfaces.cdk.xmlconfig.CdkEntityResolver;
-
-import com.google.common.collect.Lists;
-
/**
- * <p class="changed_added_4_0">That class process component-related
annotations such as {@link Component} or
+ * <p class="changed_added_4_0">That class process component-related
annotations such as {@link org.richfaces.cdk.annotations.JsfComponent} or
* {@link javax.faces.component.FacesComponent} and stores information in model.
* </p>
*
* @author asmirnov(a)exadel.com
*
*/
-(a)SupportedAnnotationTypes({"javax.faces.component.FacesComponent",
Component.NAME})
+(a)SupportedAnnotationTypes({"javax.faces.component.FacesComponent",
JsfComponent.NAME})
public class ComponentProcessor extends ProcessorBase implements CdkAnnotationProcessor
{
public void process(TypeElement componentElement) {
@@ -87,7 +66,7 @@
setClassNames(componentElement, component);
setComponentProperties(componentElement, component);
- Component annotation = componentElement.getAnnotation(Component.class);
+ JsfComponent annotation = componentElement.getAnnotation(JsfComponent.class);
if (null != annotation) {
component.setGenerate(annotation.generate());
setTagInfo(annotation.tag(), component);
@@ -101,7 +80,7 @@
protected String getComponentType(TypeElement componentElement) {
// Calculate type for base UI component class.
- Component componentAnnotation = componentElement.getAnnotation(Component.class);
+ JsfComponent componentAnnotation =
componentElement.getAnnotation(JsfComponent.class);
String explicitType = componentAnnotation.value();
// if (!Strings.isEmpty(explicitType)) {
return explicitType;
@@ -116,7 +95,7 @@
private void setComponentProperties(TypeElement componentElement, ComponentModel
component)
throws CdkException {
- // Component family
+ // JsfComponent family
setComponeneFamily(componentElement, component);
setDescription(componentElement, component);
processFacets(componentElement, component);
@@ -347,7 +326,7 @@
@Override
public Class<? extends Annotation> getProcessedAnnotation() {
- return Component.class;
+ return JsfComponent.class;
}
@Override
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/RendererProcessor.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/RendererProcessor.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/RendererProcessor.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -21,20 +21,19 @@
package org.richfaces.cdk.apt;
-import java.lang.annotation.Annotation;
-
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.lang.model.element.TypeElement;
-
import org.richfaces.cdk.CdkException;
-import org.richfaces.cdk.annotations.Component;
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.cdk.annotations.Family;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Renderer;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Property;
import org.richfaces.cdk.model.RendererModel;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.TypeElement;
+import java.lang.annotation.Annotation;
+
/**
* @author akolonitsky
* @since Dec 30, 2009
@@ -64,7 +63,7 @@
}
protected String getComponentType(TypeElement componentElement) {
- Component annotation = componentElement.getAnnotation(Component.class);
+ JsfComponent annotation = componentElement.getAnnotation(JsfComponent.class);
if (annotation != null) {
return annotation.value();
}
@@ -75,7 +74,7 @@
private void setRendererProperties(TypeElement componentElement, RendererModel
renderer)
throws CdkException {
- // Component family
+ // JsfComponent family
setRendererFamily(componentElement, renderer);
setDescription(componentElement, renderer);
// processFacets(componentElement, renderer);
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
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -78,7 +78,12 @@
}
private String getTagName(ModelElementBase model) {
- return model.getTag().getName();
+ TagModel tag = model.getTag();
+ if (tag != null) {
+ return tag.getName();
+ }
+
+ return "";
}
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
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -99,7 +99,7 @@
}
}
protected void verifyComponent(ComponentModel component) {
- // Check Component type.
+ // Check JsfComponent type.
if (null == component.getType()) {
if (null != component.getComponentClass()) {
component.setType(namingConventions.inferComponentType(component.getComponentClass()));
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,6 +23,13 @@
package org.richfaces.cdk;
+import com.google.common.collect.ImmutableList;
+import com.google.inject.Binder;
+import com.google.inject.Module;
+import org.junit.After;
+import org.junit.Before;
+import org.richfaces.cdk.annotations.JsfComponent;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -34,14 +41,6 @@
import java.util.Locale;
import java.util.logging.LogManager;
-import org.junit.After;
-import org.junit.Before;
-import org.richfaces.cdk.annotations.Component;
-
-import com.google.common.collect.ImmutableList;
-import com.google.inject.Binder;
-import com.google.inject.Module;
-
/**
* <p class="changed_added_4_0">
* </p>
@@ -129,7 +128,7 @@
protected CdkClassLoader createClassLoader() {
try {
return new
CdkClassLoader(ImmutableList.of(getLibraryFile("test.source.properties"),
- getLibraryFile(Component.class)), null);
+ getLibraryFile(JsfComponent.class)), null);
} catch (Exception e) {
throw new RuntimeException(e);
}
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,31 +23,27 @@
package org.richfaces.cdk.apt;
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
-import javax.lang.model.element.TypeElement;
-
+import static org.junit.Assert.assertEquals;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.richfaces.cdk.CdkTestRunner;
import org.richfaces.cdk.Mock;
import org.richfaces.cdk.NamingConventions;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ComponentModel;
import org.richfaces.cdk.model.Property;
import org.richfaces.cdk.xmlconfig.JAXB;
-import com.google.common.collect.Iterables;
-import com.google.inject.Inject;
+import javax.lang.model.element.TypeElement;
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.Collections;
/**
* <p class="changed_added_4_0">
@@ -88,11 +84,11 @@
@Test
@Ignore
public void testProcess() throws Exception {
- expect(componentElement.getAnnotation(Component.class)).andReturn(new Component()
{
+ expect(componentElement.getAnnotation(JsfComponent.class)).andReturn(new
JsfComponent() {
@Override
public Class<? extends Annotation> annotationType() {
- return Component.class;
+ return JsfComponent.class;
}
@Override
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -1,26 +1,18 @@
package org.richfaces.cdk.xmlconfig;
+import com.google.common.collect.ImmutableList;
+import com.google.inject.Binder;
+import com.google.inject.Inject;
import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
+import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.richfaces.cdk.CdkClassLoader;
-import org.richfaces.cdk.CdkTestBase;
-import org.richfaces.cdk.CdkTestRunner;
-import org.richfaces.cdk.FileManager;
-import org.richfaces.cdk.Mock;
-import org.richfaces.cdk.Source;
-import org.richfaces.cdk.Sources;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.*;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.xml.sax.InputSource;
-import com.google.common.collect.ImmutableList;
-import com.google.inject.Binder;
-import com.google.inject.Inject;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
@RunWith(CdkTestRunner.class)
public class CdkResolverTest extends CdkTestBase {
@@ -44,7 +36,7 @@
try {
CdkClassLoader classLoader =
new
CdkClassLoader(ImmutableList.of(getLibraryFile("test.source.properties"),
- getLibraryFile(Component.class)), null) {
+ getLibraryFile(JsfComponent.class)), null) {
@Override
public InputStream getResourceAsStream(String name) {
if ("foo/bar.xml".equals(name)) {
Modified:
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -26,19 +26,18 @@
package org.richfaces.cdk.test.component;
import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
-import java.util.List;
-
import javax.faces.component.UIComponent;
import javax.faces.component.ValueHolder;
+import java.util.List;
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
*
*/
-(a)Component("org.richfaces.cdk.test.TestComponent")
+(a)JsfComponent("org.richfaces.cdk.test.TestComponent")
public abstract class AbstractTestComponent extends UIComponent implements ValueHolder {
private static final String COMPONENT_FAMILY = "org.richfaces.Test";
@Attribute
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/AbstractPoll.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/AbstractPoll.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/AbstractPoll.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,16 +23,16 @@
package org.ajax4jsf.component;
+import org.ajax4jsf.context.AjaxContext;
+
import javax.faces.context.FacesContext;
-import org.ajax4jsf.context.AjaxContext;
-
/**
* Component for periodically call AJAX events on server ( poll actions )
* @author shura
*
*/
-//@Component
+//@JsfComponent
public abstract class AbstractPoll extends AjaxActionComponent {
public static final String COMPONENT_TYPE = "org.ajax4jsf.Poll";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,7 @@
package org.richfaces.component;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Tag;
/**
@@ -32,9 +32,10 @@
* @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:04 $
*
*/
-@Component(
+@JsfComponent(
value = "org.richfaces.Function",
- tag = @Tag(name = "jsFunction")
+ tag = @Tag(name = "jsFunction"),
+ generate = false
)
public abstract class AbstractAjaxFunction extends AjaxActionComponent {
public static final String COMPONENT_TYPE = "org.richfaces.Function";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxLog.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,7 +23,7 @@
package org.richfaces.component;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Tag;
import javax.faces.application.ResourceDependencies;
@@ -38,9 +38,10 @@
@ResourceDependency(name = "jquery.js") , @ResourceDependency(name =
"richfaces.js") ,
@ResourceDependency(name = "richfaces-jsf-log.js") ,
@ResourceDependency(name = "richfaces.css")
})
-@Component (
+@JsfComponent(
value = "org.richfaces.AjaxLog",
- tag = @Tag(name = "log")
+ tag = @Tag(name = "log"),
+ generate = false
)
public abstract class AbstractAjaxLog extends UIComponentBase {
public static final String COMPONENT_FAMILY = "org.richfaces.AjaxLog";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxOutputPanel.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxOutputPanel.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxOutputPanel.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -23,15 +23,22 @@
package org.richfaces.component;
+import org.ajax4jsf.component.AjaxOutput;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.Tag;
+
import javax.faces.component.UIPanel;
-import org.ajax4jsf.component.AjaxOutput;
-
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
* @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:26 $
*
*/
+@JsfComponent(
+ value = "org.richfaces.AjaxOutputPanel",
+ tag = @Tag(name = "outputPanel", handlerName =
"org.richfaces.taghandler.html.OutputPanelTagHandler"),
+ generate = false
+)
public class AbstractAjaxOutputPanel extends UIPanel implements AjaxOutput {
public static final String COMPONENT_TYPE =
"org.richfaces.AjaxOutputPanel";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -25,7 +25,7 @@
import org.ajax4jsf.resource.ResourceComponent2;
import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.resource.MediaOutputResource;
@@ -44,9 +44,10 @@
* @author shura
*
*/
-@Component(
+@JsfComponent(
value = "org.richfaces.MediaOutput",
- tag = @Tag(name = "mediaOutput", handlerName =
"org.richfaces.taghandler.html.PushMediaOutput")
+ tag = @Tag(name = "mediaOutput", handlerName =
"org.richfaces.taghandler.html.PushMediaOutput"),
+ generate = false
)
public abstract class AbstractMediaOutput extends UIOutput implements ResourceComponent2
{
public static final String COMPONENT_TYPE = "org.richfaces.MediaOutput";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractPush.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractPush.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractPush.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -24,7 +24,7 @@
package org.richfaces.component;
import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
@@ -43,7 +43,7 @@
* @author shura
*
*/
-@Component(
+@JsfComponent(
value = "org.richfaces.Push",
tag = @Tag(name = "push", handlerName =
"org.richfaces.taghandler.html.PushTagHandler"),
generate = false
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIRepeat.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIRepeat.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIRepeat.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -21,14 +21,14 @@
*/
package org.richfaces.component;
-import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Tag;
/**
* @author Nick Belaevski
*
*/
-@Component(generate = false, tag = @Tag(name = "repeat"))
+@JsfComponent(generate = false, tag = @Tag(name = "repeat"))
public class UIRepeat extends UISequence {
public static final String COMPONENT_TYPE = "org.richfaces.Repeat";
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxLog.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxLog.java 2010-03-09
11:07:41 UTC (rev 16538)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxLog.java 2010-03-09
14:24:55 UTC (rev 16539)
@@ -29,7 +29,7 @@
*/
import org.richfaces.component.AbstractAjaxLog;
-//@Component(value = "org.richfaces.AjaxLog", generate = false)
+//@JsfComponent(value = "org.richfaces.AjaxLog", generate = false)
public class HtmlAjaxLog extends AbstractAjaxLog {
public static final String COMPONENT_TYPE = "org.richfaces.AjaxLog";