Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] JavaScript in Eclipse Neon

I’ve been referred here from the EPP-Dev list. If there is a better place for my questions, please advise.
 
While a long-time developer, I’m not a developer of Eclipse tools, I work at the app level. I've taken interest in FOSS that facilitates _javascript_ plugins to be run in the JRE. I’m running the latest Eclipse Neon.1 plus Tern, and looking for the best Java + _javascript_ polyglot Code Assist available with the current technology. For example, I can't find the absolute latest answers to questions about code like this:
 
/**
  How is this reference to core namespace and class annotated?
  And how and where do I define the dependencies?
*/
var File = java.io.File,
    myDir = new File('TestDir'), // should offer assistance on constructors
    myFile = new File(myDir,'FileName');
if (!myFile.exists()) { // should recognize this method
// Where do I set path references for non-core resources?
    var myClass = new com.foo.bar.baz.Class();
    myClass.doSomething(myFile); // and will it offer assistance for references like this?
}
 
I believe I need to start fitting code like this with JSDoc annotations to help the parsers. Before I go on a spree to annotate everything, it would be helpful to know how to get the best code completion, type recognition, etc from unannotated code.
 
To facilitate that, I will be looking for a mechanism that allows for JSDoc annotation suggestions from selection of functions, variables, etc. The default (Source > Generate Element Comment) don't seem to work. Any tool recommendations?
 
I understand this forum is for Web Tool developers. I'm hoping for recommendations for more user-oriented questions or to work with developers toward specific issue resolution. When content assistance doesn't work for the code above, for example, I don't know whether to look for a JSDT forum, whether it's a Tern issue, one of the Tern plugins, a core Eclipse issue, etc.
 
Thanks!
T

Back to the top