Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Javascript libs not resolved
Javascript libs not resolved [message #229178] Wed, 18 March 2009 09:25 Go to next message
Frank Mising name is currently offline Frank Mising nameFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,
I'm working under Eclipse Ganymede 3.4.2 and created a "Static Web
Project".
I've "added Javascript Support" by "rightClick-on-Project > Web
Development Tools"
Under ""rightClick-on-Project > Properties > JavaScript > JavaScript
Libraries > Source" I've added the two Google Gears js-Files gears_init.js
and js_utils.js. They show up in the "JavaScript Support"-area of the
project in "Script Explorer", which seems to be correct.

Afterwards I've created a HTML-file in WebContent named test.html an
copied some example code from Google into it. It starts with
<html>
<body>
<script type="text/javascript" src="../gears_init.js"></script>
<script type="text/javascript" src="../js_utils.js"></script>
<script type="text/javascript">
try {
detectPlatform();
} catch (e) {
document.write(e);
}
</script>
...

detectPlatform() is marked with red underline "The function
detectPlatform() is undefined", which is definitely wrong. detectPlatform
() is defined in js_utils.js. After exporting, everything works fine in
Tomcat. But why do I receive a lot of "The function xyz is undefined" and
"xyz cannot be resolved or is not a field" and why is autocompletion
turned off.

Seems to me, that I misunderstood the whole concept.

Any hints appreciated
Regards, Frank
Re: Javascript libs not resolved [message #229855 is a reply to message #229178] Mon, 30 March 2009 19:38 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Frank wrote:
> Hi,
> I'm working under Eclipse Ganymede 3.4.2 and created a "Static Web
> Project". I've "added Javascript Support" by "rightClick-on-Project >
> Web Development Tools"
> Under ""rightClick-on-Project > Properties > JavaScript > JavaScript
> Libraries > Source" I've added the two Google Gears js-Files
> gears_init.js and js_utils.js. They show up in the "JavaScript
> Support"-area of the project in "Script Explorer", which seems to be
> correct.
>
> Afterwards I've created a HTML-file in WebContent named test.html an
> copied some example code from Google into it. It starts with
> <html>
> <body>
> <script type="text/javascript" src="../gears_init.js"></script>
> <script type="text/javascript" src="../js_utils.js"></script>
> <script type="text/javascript">
> try {
> detectPlatform();
> } catch (e) {
> document.write(e);
> }
> </script>
> ..
>
> detectPlatform() is marked with red underline "The function
> detectPlatform() is undefined", which is definitely wrong.
> detectPlatform () is defined in js_utils.js. After exporting, everything
> works fine in Tomcat. But why do I receive a lot of "The function xyz is
> undefined" and "xyz cannot be resolved or is not a field" and why is
> autocompletion turned off.
>
> Seems to me, that I misunderstood the whole concept.
>
> Any hints appreciated

Sounds like a valid problem. Please open a bug report at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20So urce%20Editing&component=wst.jsdt
..

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


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:How to change the code in jar file
Next Topic:WSDL XSD and XML Catalog
Goto Forum:
  


Current Time: Thu Apr 25 04:35:00 GMT 2024

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

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

Back to the top