Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JavaScript Class not found when using multiple files(JavaScript Class not found when using multiple files)
JavaScript Class not found when using multiple files [message #537747] Thu, 03 June 2010 10:26 Go to next message
Mike Pelley is currently offline Mike Pelley
Messages: 9
Registered: May 2010
Location: Ottawa, Ontario, Canada
Junior Member
I have created a project using Eclipse Galileo with PHP, HTML and JavaScript. In my js directory, I have multiple files that reference classes in each other. In Eclipse, my calls to "new MyClass" result in "MyClass cannot be resolved to a type".

After creating the PHP project, I right clicked on the project and selected "Configure -> Add JavaScript Support". I also added my js directory to the "Source" tab in "Project Properties -> JavaScript -> Libraries".

I've search for a while now and tried a few other things, but I cannot eliminate this error. Is it possible to get Eclipse to recognize my own classes?

Thanks,
Mike.
Re: JavaScript Class not found when using multiple files [message #539218 is a reply to message #537747] Wed, 09 June 2010 23:26 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
Registered: July 2009
Senior Member
Are they recognized properly when they're in the same file?

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JavaScript Class not found when using multiple files [message #539448 is a reply to message #539218] Thu, 10 June 2010 14:15 Go to previous messageGo to next message
Mike Pelley is currently offline Mike Pelley
Messages: 9
Registered: May 2010
Location: Ottawa, Ontario, Canada
Junior Member
Yes, the classes are found when I copy them into the same file.
Re: JavaScript Class not found when using multiple files [message #548528 is a reply to message #537747] Thu, 22 July 2010 05:34 Go to previous messageGo to next message
Johan  is currently offline Johan
Messages: 1
Registered: July 2010
Junior Member
I'm having the exact same problem, and I'm actually considering moving away from Eclipse for this. I'd really rather stay with Eclipse if possible though, so any ideas would be much appreciated.
Re: JavaScript Class not found when using multiple files [message #548711 is a reply to message #539448] Thu, 22 July 2010 13:02 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
Registered: July 2009
Senior Member
On 6/10/2010 2:15 PM, Mike Pelley wrote:
> Yes, the classes are found when I copy them into the same file.

I think we're going to have to see the project attached to a bug report
to really understand what's going on.

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


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Eclipse - setup steps for Web service application
Next Topic:JavaScript tools -> Open Declaration for object literals
Goto Forum:
  


Current Time: Sat Aug 30 22:42:55 EDT 2014

Powered by FUDForum. Page generated in 0.02998 seconds