History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16765
Type: Bug Bug
Status: Open Open
Assignee: Maxim Mossienko
Reporter: Dmitry Shaporenkov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

JavaScript: Find Usages of non-standard properties is inconsistent - it misses the usage on which it was invoked

Created: 25 Dec 07 08:03   Updated: 25 Dec 07 10:32
Component/s: JavaScript

Build: 7,364


 Description  « Hide
Suppose I have the following code which sets and retrieves a property 'data' from DOM nodes.
function getData(node) {
  return node.data;
}

function setDataRecursively(node) {
  if (node.tagName == "A") {
    node.data = 10;
  }
  var currChild = node.firstChild;
  while (currChild != null) {
    setDataRecursively(currChild);
  }
}

function setData(doc) {
  doc.body.data = -1;  // invoke 'Find Usages' here
  setDataRecursively(doc.body);
}

I invoke Find Usages when the caret is on the line ' doc.body.data = -1;'. As a result I get 2 usages but not the very usage on which I invoked the search. IMO it's a bit strange - either I should get all 3 usages of 'data', or I should get only 1 usage in 'doc.body.data', but in any case the current usage should be included into the results.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.