Skip to content

Commit dc6b4ed

Browse files
committed
Renaming templates
1 parent 51d2de2 commit dc6b4ed

File tree

21 files changed

+100
-84
lines changed

21 files changed

+100
-84
lines changed
-58 Bytes
Binary file not shown.
-5 Bytes
Binary file not shown.
-5 Bytes
Binary file not shown.
-7 Bytes
Binary file not shown.

doclet/ReferenceGenerator/src/writers/BaseWriter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ protected static ArrayList<HashMap<String, String>> getSyntax(MethodDoc doc, Str
272272
{
273273
TemplateWriter templateWriter = new TemplateWriter();
274274
ArrayList<HashMap<String, String>> ret = new ArrayList<HashMap<String,String>>();
275-
276275

277276
for( MethodDoc methodDoc : doc.containingClass().methods() )
278277
{
@@ -286,13 +285,18 @@ protected static ArrayList<HashMap<String, String>> getSyntax(MethodDoc doc, Str
286285
map.put("object", instanceName);
287286

288287
ArrayList<HashMap<String, String>> parameters = new ArrayList<HashMap<String,String>>();
288+
String params="";
289289
for( Parameter p : methodDoc.parameters() )
290290
{
291+
params = params + p.name() + ", ";
291292
HashMap<String, String> paramMap = new HashMap<String, String>();
292293
paramMap.put("parameter", p.name());
293294
parameters.add(paramMap);
294295
}
295-
String params = templateWriter.writeLoop("method.parameter.partial.html", parameters, ", ");
296+
297+
if(params.endsWith(", ")){
298+
params = params.substring(0, params.lastIndexOf(", "));
299+
}
296300

297301
map.put("parameters", params);
298302
if( ! ret.contains(map) )

doclet/ReferenceGenerator/src/writers/FieldWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void write(HashMap<String, String> vars, FieldDoc doc, String clas
5353
} else {
5454
fieldJSON.put("classanchor", getLocalAnchor(doc.containingClass()));
5555
fieldJSON.put("parameters", getParentParam(doc));
56-
String syntax = templateWriter.writePartial("field.syntax.partial.html", getSyntax(doc));
56+
String syntax = templateWriter.writePartial("field.syntax.partial", getSyntax(doc));
5757
ArrayList<String> syntaxList = new ArrayList<String>();
5858
syntaxList.add(syntax);
5959
fieldJSON.put("syntax", syntaxList);

doclet/ReferenceGenerator/src/writers/FunctionWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static void write(MethodDoc doc) throws IOException
2121
String anchor = getAnchor(doc);
2222
TemplateWriter templateWriter = new TemplateWriter();
2323

24-
ArrayList<String> syntax = templateWriter.writeLoopSyntax("function.syntax.partial.html", getSyntax(doc, ""));
24+
ArrayList<String> syntax = templateWriter.writeLoopSyntax("function.syntax.partial", getSyntax(doc, ""));
2525

2626
JSONObject functionJSON = new JSONObject();
2727

doclet/ReferenceGenerator/src/writers/MethodWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void write( HashMap<String, String> vars, MethodDoc doc, String cl
2525
String filename = getAnchor(doc);
2626
TemplateWriter templateWriter = new TemplateWriter();
2727

28-
ArrayList<String> syntax = templateWriter.writeLoopSyntax("method.syntax.partial.html", getSyntax(doc, getInstanceName(doc)));
28+
ArrayList<String> syntax = templateWriter.writeLoopSyntax("method.syntax.partial", getSyntax(doc, getInstanceName(doc)));
2929

3030
JSONObject methodJSON = new JSONObject();
3131

@@ -37,7 +37,7 @@ public static void write( HashMap<String, String> vars, MethodDoc doc, String cl
3737

3838
try
3939
{
40-
methodJSON.put("type", "function");
40+
methodJSON.put("type", "method");
4141
methodJSON.put("name", getName(doc));
4242
methodJSON.put("description", getWebDescriptionFromSource(doc));
4343
methodJSON.put("brief", getWebBriefFromSource(doc));
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)