/* * (non-Javadoc) * @see com.aptana.editor.js.parsing.ast.JSTreeWalker#visit(com.aptana.editor.js.parsing.ast.JSGetElementNode) */ @Override public void visit(JSGetElementNode node) { // TODO: Should check subscript to determine if the type is a Number or // a String. If it is a String, then this should behave like get-property // assuming we can retrieve a literal string. IParseNode lhs = node.getLeftHandSide(); if (lhs instanceof JSNode) { for (String typeName : this.getTypes(lhs)) { String typeString = JSTypeUtil.getArrayElementType(typeName); if (typeString != null) { this.addType(typeString); } else { this.addType(JSTypeConstants.OBJECT_TYPE); } } } }