最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Does "go to definition" work in Eclipse for javascript? - Stack Overflow

programmeradmin0浏览0评论

Working with Eclipse for Javascript, Ctrl-click seems to work on some objects but will not take me outside of the current javascript file. Is there any way to get this "go to definition" to work more fully? I use Eclipse for Java and depend on this functionality, would like to see it work better in Javascript as I'm just trying to learn Javascript.

Working with Eclipse for Javascript, Ctrl-click seems to work on some objects but will not take me outside of the current javascript file. Is there any way to get this "go to definition" to work more fully? I use Eclipse for Java and depend on this functionality, would like to see it work better in Javascript as I'm just trying to learn Javascript.

Share Improve this question edited Aug 11, 2014 at 14:47 avalancha 1,8061 gold badge28 silver badges45 bronze badges asked Sep 16, 2011 at 16:08 user949229user949229 512 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

I think it probably doesn't work because of the many ways in JavaScript to define something..

  • function foo() {}
  • var foo = function() {};
  • window.foo = function() {};
  • window['foo'] = function() {};
  • var z = 'foobar'; window[z.substr(0, 3)] = function() {};

Especially the last one would be - even though it's unlikely to be ever used in real code - pretty much impossible to be detected by an IDE without executing the whole code and then tracking where a global is defined for the first time.

Another example would be with libraries implementing a class system. Without knowing the details of every library it's pretty hard to find out what class names they define.

Intellij Idea support that functionality. I was looking to see if Eclipse has a plugin and came across your post, I use to work with Intellij Idea and I have that functionality that is very helpful so to the user that is saying that is impossible for a IDEA please take a look in Intellij Idea you will be surprise of all the functionality that you can find.

发布评论

评论列表(0)

  1. 暂无评论