camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [12/29] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.
Date Tue, 30 Dec 2014 10:42:28 GMT
CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later
use to enrich the xml xsd to include documentation. Work in progress.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/042abb9e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/042abb9e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/042abb9e

Branch: refs/heads/master
Commit: 042abb9ea0a407ff136b57b6cb781cfd5105df64
Parents: 84201a1
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Dec 27 10:21:57 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Dec 30 10:56:42 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/tools/apt/AbstractAnnotationProcessor.java  | 4 ++--
 .../camel/tools/apt/ModelDocumentationAnnotationProcessor.java   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/042abb9e/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
index f4806b3..169d182 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
@@ -50,8 +50,8 @@ import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
  */
 public abstract class AbstractAnnotationProcessor extends AbstractProcessor {
 
-    protected String findJavaDoc(Elements elementUtils, VariableElement fieldElement, String
fieldName, TypeElement classElement, boolean builderPattern) {
-        String answer = elementUtils.getDocComment(fieldElement);
+    protected String findJavaDoc(Elements elementUtils, Element element, String fieldName,
TypeElement classElement, boolean builderPattern) {
+        String answer = elementUtils.getDocComment(element);
         if (isNullOrEmpty(answer)) {
             String setter = "set" + fieldName.substring(0, 1).toUpperCase();
             if (fieldName.length() > 1) {

http://git-wip-us.apache.org/repos/asf/camel/blob/042abb9e/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
index 022ee5e..7846538 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
@@ -42,6 +42,7 @@ import static org.apache.camel.tools.apt.Strings.canonicalClassName;
 import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
 
 // TODO: add support for label so we can categorize the eips
+// TODO: add support for id/description which uses @XmlAttribute on methods
 
 /**
  * Process all camel-core's model classes (EIPs and DSL) and generate json schema documentation


Mime
View raw message