try to resolve the getDirectChildren for the property values type. so
that the IMemberEvaluator.valueOf is called for it
diff --git a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/ElementValue.java b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/ElementValue.java
index 6ff97ac..e737ba5 100644
--- a/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/ElementValue.java
+++ b/plugins/org.eclipse.dltk.javascript.core/src/org/eclipse/dltk/internal/javascript/ti/ElementValue.java
@@ -625,6 +625,15 @@
return ReferenceKind.PROPERTY;
}
+ @Override
+ public Set<String> getDirectChildren(int flags) {
+ IValue value = resolveValue();
+ if (value != null && value != this) {
+ return value.getDirectChildren(flags);
+ }
+ return super.getDirectChildren(flags);
+ }
+
public IValue getChild(String name, boolean resolve) {
IValue child = children.get(name);
if (child == null) {
@@ -649,8 +658,8 @@
resolve);
if (child instanceof ElementValue) {
child = ((ElementValue) child).resolveValue();
- children.put(name, child);
}
+ children.put(name, child);
}
return child;
}