DerZyklop
DerZyklop

Reputation: 3823

Can my sublime check if the javascript method exists, like Eclipse does it with java?

I am a web-developer. The people in my office are mostly java developers. Here is my example:


Let's assume i have a java-class called foo which has a single method called bar(). When my colleague writes

foo.bb

eclipse already tells him immediately, that this won't work.

-

When i have a JavaScript object called foo which has a single method called bar() i can write

foo.bba()

and sublime won't say a word.


To fix this issue i assume that sublime would have to run something like a headless browser in the background like eclipse runs a compiler all the time.

So, is there anything like that?

Upvotes: 1

Views: 139

Answers (2)

Angelo
Angelo

Reputation: 2125

Disclaimer, I'm the author of tern.java

tern.java integrates ternjs inside Eclipse and provides a semantic/type checking JavaScript validator. Here a screenshot with your sample:

enter image description here

This validator uses tern-lint that you can use with other editor like Atom, Emacs. I hope that Sublime will integrate it one day. See issue 46

Upvotes: 0

Sculper
Sculper

Reputation: 755

Sublime is just a text-editor, so it does not have these features out of the box.

However, there are many plugins that can produce the behavior of an IDE. SublimeCodeIntel looks like it has the features you're looking for.

Upvotes: 1

Related Questions