Author: alexsmirnov
Date: 2010-03-25 21:17:39 -0400 (Thu, 25 Mar 2010)
New Revision: 16669
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.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/ProcessorBase.java
Log:
CODING IN PROGRESS - issue RF-8523: Refactor CDK annotations
https://jira.jboss.org/jira/browse/RF-8523
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
===================================================================
---
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2010-03-25
16:02:42 UTC (rev 16668)
+++
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2010-03-26
01:17:39 UTC (rev 16669)
@@ -62,7 +62,7 @@
/**
* Used in {@link Tag} to signal that tag uses the default handler.
*/
- static final class DEFAULT extends TagHandler {
+ public static final class DEFAULT extends TagHandler {
public DEFAULT(TagConfig config) {
super(config);
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-25
16:02:42 UTC (rev 16668)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2010-03-26
01:17:39 UTC (rev 16669)
@@ -88,7 +88,7 @@
processFacets(componentElement, component, annotation);
// process Events.
- setEvents(componentElement, component, annotation);
+ processEvents(componentElement, component, annotation);
// TODO Use @Inject directly, componentElement is wrong here.
JsfRenderer renderer = annotation.renderer();
@@ -152,7 +152,7 @@
}
- final void setEvents(TypeElement componentElement, ComponentModel component,
JsfComponent annotation) {
+ final void processEvents(TypeElement componentElement, ComponentModel component,
JsfComponent annotation) {
Event[] fires = annotation.fires();
for (Event event : fires) {
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-25
16:02:42 UTC (rev 16668)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ProcessorBase.java 2010-03-26
01:17:39 UTC (rev 16669)
@@ -146,6 +146,7 @@
// Process XML files with standard attributes definitions.
SourceUtils sourceUtils = getSourceUtils();
+ // Read xml configuration associated with all superclasses and interfaces
sourceUtils.visitSupertypes(asClassDesctiption(componentElement), new
SuperTypeVisitor() {
@Override
@@ -181,7 +182,7 @@
}
}
- private void processAttribute(BeanProperty beanProperty, PropertyBase attribute) {
+ protected void processAttribute(BeanProperty beanProperty, PropertyBase attribute) {
attribute.setType(beanProperty.getType());
Attribute attributeAnnotarion = beanProperty.getAnnotation(Attribute.class);
@@ -219,11 +220,11 @@
}
}
- private List<ClassName> getSignature(Signature signature) {
+ protected List<ClassName> getSignature(Signature signature) {
if (signature == null) {
return null;
}
-
+ // TODO - where return type can be used ?
String returnType;
try {
returnType = signature.returnType().getName();
@@ -256,7 +257,7 @@
return null;
}
- private void setBehaviorEvent(PropertyBase attribute, EventName eventName) {
+ protected void setBehaviorEvent(PropertyBase attribute, EventName eventName) {
if (null != eventName) {
org.richfaces.cdk.model.EventName event = new
org.richfaces.cdk.model.EventName();