vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Scope based highlighting for identifier #290

Open patelatharva opened 11 years ago

patelatharva commented 11 years ago

When writing Node.js programs, we usually have lots of variables named callback throughout the file being viewed. When I put cursor on a particular variable, the current implementation highlights all the identifiers with the same spelling in this file. The expected behavior is that only those identifiers/variables should be highlighted which refers to the same variable. Two variables in single file should not be highlighted simultaneously if they are not referring to the same variable and possibly with different scope. I think the resolution of this issue will also work as the first stepping stone for smart code refactoring in single file.