Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JavaScript auto completion according to variable type(What to do that Eclipse recognizes which (object) type a variable is of?)
JavaScript auto completion according to variable type [message #870904] Thu, 10 May 2012 08:34
Alex St.Friend
Messages: 4
Registered: April 2012
Junior Member
Hi all,

is there a possibility to give Eclipse a hint which type a used variable is of?

e.g. I have code which trys to step through all input elements of a form:

var formChilds = form.childNodes;
var elm = document.creatElement('input');
// up to this point eclipse knows what kind of object 'elm' is, and offers automatic completion of properties, like elm.nodName etc.

foreach(var elm as formChilds){
  elm = childs[elm];
  // from here on eclipse does not know of which type the object 'elm' is and no auto completion is available
//(...)


Is there any possibility to give Eclipse a hint, which type of object shall here be recognized for 'elm' for auto completion? Any special comment (like // @autocomplete elm=document.node.input) maybe?

Thanks
Previous Topic:Cannot declare type {function()} for function parameter
Next Topic:How to: create DWP programmatically?
Goto Forum:
  


Current Time: Sun Nov 23 09:57:39 GMT 2014

Powered by FUDForum. Page generated in 0.03999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software