I have a project in Netbeans 8.0 with around 12 javascript includes. When in one JavaScript class file, if I instantiate another custom class from the project and press "." after the var name, it does not pop up any autocompletes with my member variables and methods from my classes in the project.
Example: in one javascript file have a class like :
class Person(){
doStuff(){
// sh happens
}
}
and in another javascript include, (both of which are included in index.html as the project's main URL in the project properties) try to reference it mid-code like...
class StaffManager(){
manageStuff(){
var aPerson = new Person();
aPerson.doSt ;/* BY THIS TIME AUTOCOMPLETE SHOULD BE SAYING "doStuff()" right? (I had to add the semicolon for stack overflow not to throw err)*/
}
}
Look at the commment, that's where you stop typing because autocomplete is giving you options from the class... or so it did in my old IDE's.
Is this supposed to work in Netbeans? Or what did I miss?
- Do I need to start some kind of class path declaration? (can't it just parse my project?)
- Does it parse "new ___()" to reference classes for autocomplete or is there any way to type cast vars that makes autocomplete work?
I'm new to OOP application development in javascript using Netbeans, and am missing something pretty game-changing for rapidly developing software: proper auto complete for custom classes. I'm assuming it MUST do this, as so many other IDEs do, but if not please also feel free to suggest how easy it can be in other IDEs that do this auto-magically.
Thank You.
First you can try to import your Person object via the ES2015 import. So
import * from Person
or smth like that. This is, maybe a better way if it is possible on your enviroment. And than you can see, whether it is working or not.If not feel free to create a ticket here please, with steps to reproduce and maybe a little sample project: https://issues.apache.org/jira/projects/NETBEANS. Would be help a lot. I think it should work, I can test it later too.
Thx :)