Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-12-18 12:15:44 +0000
committerMarkus Tiede2014-12-18 12:15:44 +0000
commit0f8620019187fdfb9014ef969b15c460deb5524f (patch)
tree7a0e98f307c1db0775254a7e247a26a7a1a20327 /org.eclipse.jubula.toolkit.api.gen
parentf335d6428847ebd367961fbfd3b20c9ecab2ed8e (diff)
downloadorg.eclipse.jubula.core-0f8620019187fdfb9014ef969b15c460deb5524f.tar.gz
org.eclipse.jubula.core-0f8620019187fdfb9014ef969b15c460deb5524f.tar.xz
org.eclipse.jubula.core-0f8620019187fdfb9014ef969b15c460deb5524f.zip
Sprint task - add capability to add descriptions texts for component system parameter + API generation extended accordingly.
Diffstat (limited to 'org.eclipse.jubula.toolkit.api.gen')
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet25
1 files changed, 21 insertions, 4 deletions
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
index 14be42fac..218840f8a 100644
--- a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
@@ -191,18 +191,35 @@ public <%if (genInterface) {%>interface<%} else {%>class<%}%> <%=className%>
}
compNameMap.put(action.getName(), methodName);
List<Param> params = action.getParams();
+ Map<String, String> paramMap = new HashMap<String, String>();// with enums
+ Map<String, String> paramTypeMap = new HashMap<String, String>();// only "simple" types
if (!params.isEmpty()) {
+ Iterator<Param> paramIterator = params.iterator();
+ // add parameters description to javadoc
%>
/**
* <%=actionDescription%>
- * @throws IllegalArgumentException if one of the passed parameters is <code>null</code>.
+
+ <%
+ while (paramIterator.hasNext()) {
+ Param param = paramIterator.next();
+ String paramName = nameLoader.translateFromCompSystem(param.getName());
+ String paramDescription = "";
+ String paramDescrKey = param.getDescriptionKey();
+ if (paramDescrKey != null) {
+ paramDescription = CompSystemI18n.getString(paramDescrKey);
+ }
+ %>* @param <%=paramName%>
+ * <%=paramDescription%>
+
+ <%
+ }
+ %>* @throws IllegalArgumentException if one of the passed parameters is <code>null</code>.
*/<%}%>
<%if (action.isDeprecated()) {%>@Deprecated<%}%>
@NonNull public CAP <%=methodName%>(
<%
- // add parameters to method
- Map<String, String> paramMap = new HashMap<String, String>();// with enums
- Map<String, String> paramTypeMap = new HashMap<String, String>();// only "simple" types
+ // add parameters to method signature
Iterator<Param> paramIterator = params.iterator();
while (paramIterator.hasNext()) {
Param param = paramIterator.next();

Back to the top