]
Victor Rubezhny reassigned ERT-198:
-----------------------------------
Assignee: Snjezana Peco (was: Victor Rubezhny)
Content assist displays only top level properties as proposals
[EBZ#490639]
---------------------------------------------------------------------------
Key: ERT-198
URL:
https://issues.jboss.org/browse/ERT-198
Project: Eclipse Release Train
Issue Type: Task
Components: WTP Source Editing
Reporter: Friendly Jira Robot
Assignee: Snjezana Peco
Labels: 3.8_RC2, bzira, wst.json
Fix For: Neon (4.6) RC2
When I invoke content assist on a JSON object, I expect to see the list of properties in
the context of the selected object but I see a list of top level properties instead.
I think the problem is in the JSONSchemaNode.walk() method, where the 'json'
object that gets passed in is always the schema root, so the properties always correspond
to that object.
private static void walk(JsonObject json, JSONSchemaNode schemaNode) {
Member member = null;
JsonObject properties = (JsonObject) json.get("properties");
if (properties != null) {
Iterator<Member> members = properties.iterator();
while (members.hasNext()) {
member = members.next();
schemaNode.addProperty(new JSONSchemaProperty(member.getName(),
(JsonObject) member.getValue(), schemaNode));
}
}
}