@@ -231,12 +231,12 @@ public HashMap<String, String> getProperties(String key) {
231
231
for (String propertyPackage : propertyPackages )
232
232
if (this .propertiesForPackage .containsKey (propertyPackage ))
233
233
for (String property : this .propertiesForPackage .get (propertyPackage ))
234
- properties .put (property , this .defaultsForProperty .get (property ));
234
+ properties .put (property , this .defaultsForProperty .get (propertyPackage + property ));
235
235
236
236
/* find all properties that are declared at the stencil */
237
237
if (this .propertiesForStencil .containsKey (key ))
238
238
for (String property : this .propertiesForStencil .get (key ))
239
- properties .put (property , this .defaultsForProperty .get (property ));
239
+ properties .put (property , this .defaultsForProperty .get (key + property ));
240
240
241
241
return properties ;
242
242
}
@@ -273,7 +273,7 @@ private void parseStencils(JSONArray stencils) throws JSONException {
273
273
274
274
properties .add (currentProperty .getString ("id" ));
275
275
276
- this .setDefinitionsForProperty (currentProperty );
276
+ this .setDefinitionsForProperty (currentStencil . getString ( "id" ), currentProperty );
277
277
}
278
278
279
279
this .propertiesForStencil .put (currentStencil .getString ("id" ), properties );
@@ -303,7 +303,7 @@ private void parsePropertyPackages(JSONArray propertyPackages) throws JSONExcept
303
303
304
304
propertyIds .add (currentProperty .getString ("id" ));
305
305
306
- this .setDefinitionsForProperty (currentProperty );
306
+ this .setDefinitionsForProperty (packageName , currentProperty );
307
307
}
308
308
309
309
this .propertiesForPackage .put (packageName , propertyIds );
@@ -314,10 +314,11 @@ private void parsePropertyPackages(JSONArray propertyPackages) throws JSONExcept
314
314
/**
315
315
* Associates the properties with their types and initial values
316
316
*
317
+ * @param prefix
317
318
* @param property
318
319
* @throws JSONException
319
320
*/
320
- private void setDefinitionsForProperty (JSONObject property ) throws JSONException {
321
+ private void setDefinitionsForProperty (String prefix , JSONObject property ) throws JSONException {
321
322
String id = property .getString ("id" );
322
323
String type = property .getString ("type" );
323
324
@@ -329,6 +330,6 @@ private void setDefinitionsForProperty(JSONObject property) throws JSONException
329
330
value = property .optString ("value" );
330
331
331
332
if (!this .defaultsForProperty .containsKey (id ))
332
- this .defaultsForProperty .put (id , value .toString ());
333
+ this .defaultsForProperty .put (prefix + id , value .toString ());
333
334
}
334
335
}
0 commit comments