camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] camel git commit: CAMEL-8558: Camel component docs now include a human readable title for the component names.
Date Fri, 27 Mar 2015 11:19:28 GMT
CAMEL-8558: Camel component docs now include a human readable title for the component names.


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

Branch: refs/heads/master
Commit: 867040d6bff79d33f0c96db128e0fe290efa8d7f
Parents: ba14434
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Mar 27 12:21:07 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Mar 27 12:21:07 2015 +0100

----------------------------------------------------------------------
 .../camel/maven/packaging/PackageDataFormatMojo.java      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/867040d6/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
index 3132f19..59b5736 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
@@ -164,7 +164,7 @@ public class PackageDataFormatMojo extends AbstractMojo {
                             if (json != null) {
                                 DataFormatModel dataFormatModel = new DataFormatModel();
                                 dataFormatModel.setName(name);
-                                dataFormatModel.setTitle(name);
+                                dataFormatModel.setTitle("");
                                 dataFormatModel.setModelName(modelName);
                                 dataFormatModel.setLabel("");
                                 dataFormatModel.setDescription(project.getDescription());
@@ -176,8 +176,8 @@ public class PackageDataFormatMojo extends AbstractMojo {
                                 List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("model",
json, false);
                                 for (Map<String, String> row : rows) {
                                     if (row.containsKey("title")) {
-                                        String title = asModelTitle(row.get("title"));
-                                        dataFormatModel.setTitle(title);
+                                        String title = row.get("title");
+                                        dataFormatModel.setTitle(asModelTitle(name, title));
                                     }
                                     if (row.containsKey("label")) {
                                         dataFormatModel.setLabel(row.get("label"));
@@ -263,7 +263,7 @@ public class PackageDataFormatMojo extends AbstractMojo {
         return name;
     }
 
-    private static String asModelTitle(String name) {
+    private static String asModelTitle(String name, String title) {
         // special for some data formats
         if ("json-gson".equals(name)) {
             return "JSon GSon";
@@ -278,7 +278,7 @@ public class PackageDataFormatMojo extends AbstractMojo {
         } else if ("bindy-kvp".equals(name)) {
             return "Bindy Key Value Pair";
         }
-        return name;
+        return title;
     }
 
     private static Artifact findCamelCoreArtifact(MavenProject project) {


Mime
View raw message