Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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?

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

Current Time: Thu Apr 26 17:35:06 GMT 2018

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

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