Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Code completion for global defined in other files(How can I use code completion for global that are defined in other files)
Code completion for global defined in other files [message #674344] Thu, 26 May 2011 15:07 Go to next message
Arin Lipman is currently offline Arin Lipman
Messages: 17
Registered: May 2010
Junior Member
Hello,
I'm attempting to use code completion on a property of a global namespace. I've defined & JSDoc'ed the global in another js file (which is included in the project, and I get that variable in code completion). When I try to use this property, I get no options for code completion. Is this possible to do?

File 1
var foo = {};


File 2
foo.prop = function(){return "Hello World";};


When I try to use code completion in File 2 to prompt for foo.prop, I see no proposals.
Re: Code completion for global defined in other files [message #675638 is a reply to message #674344] Wed, 01 June 2011 04:30 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2272
Registered: July 2009
Senior Member
On 5/26/2011 11:07 AM, forums-noreply@eclipse.org wrote:
> Hello,
> I'm attempting to use code completion on a property of a global
> namespace. I've defined & JSDoc'ed the global in another js file (which
> is included in the project, and I get that variable in code completion).
> When I try to use this property, I get no options for code completion.
> Is this possible to do?
>
> File 1
> var foo = {};
>
> File 2
> foo.prop = function(){return "Hello World";};
>
> When I try to use code completion in File 2 to prompt for foo.prop, I
> see no proposals.

At the moment, no, not unless both files are open in editors. Proper
(and performant) support for Globals is something we want to visit in
the next maintenance release.

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Web Service Problem with tomcat axis2
Next Topic:Problem with XMLMultiPageEditorPart editor
Goto Forum:
  


Current Time: Sat Sep 20 00:13:02 GMT 2014

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

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