Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse refusing to recognize JavaScript file?
Eclipse refusing to recognize JavaScript file? [message #1821119] Thu, 06 February 2020 02:48 Go to next message
Nik Tes is currently offline Nik TesFriend
Messages: 5
Registered: February 2020
Junior Member
I went to:
Right click project root folder → New → File → Entered file name → Click okay

I changed the file extension by right clicking file → rename → added '.html'

Despite doing this, there are no colors in the source code.

This what the colored source code is supposed to look like, in order for the code to be executed in the browser.

I've attached 4 images.
  • Attachment: 01.png
    (Size: 84.83KB, Downloaded 25 times)
  • Attachment: 02.png
    (Size: 123.53KB, Downloaded 26 times)
  • Attachment: 03.png
    (Size: 80.59KB, Downloaded 23 times)
  • Attachment: 04.png
    (Size: 79.04KB, Downloaded 21 times)

[Updated on: Thu, 06 February 2020 04:47]

Report message to a moderator

Re: Eclipse refusing to recognize JavaScript file? [message #1821120 is a reply to message #1821119] Thu, 06 February 2020 02:52 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3712
Registered: July 2009
Senior Member

Does your installation have plug-ins for working with HTML and JavaScript files? How did you install it / what did you install?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Eclipse refusing to recognize JavaScript file? [message #1821123 is a reply to message #1821120] Thu, 06 February 2020 03:35 Go to previous messageGo to next message
Nik Tes is currently offline Nik TesFriend
Messages: 5
Registered: February 2020
Junior Member
I downloaded the 52mb file from here: https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2019-12/R/eclipse-inst-win64.exe

I then selected 'Eclipse IDE for JavaScript and Web Developers (includes'
https://i.imgur.com/A6agZMJ.png

I also have to manually navigate to the .exe location to open it:
D:\Installations\Eclipse\javascript-2019-12\eclipse
https://i.imgur.com/FOtj1in.png

Project file are located at xampps' default located for HTTP index files:
C:\xampp\htdocs\RobinNixon_JS_2\15

This is the help → about
https://i.imgur.com/OjuigGw.png
Re: Eclipse refusing to recognize JavaScript file? [message #1821127 is a reply to message #1821123] Thu, 06 February 2020 05:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31163
Registered: July 2009
Senior Member
In the context menu on each file, there is an Open With -> ... menu with choices of editors. Which editors are available? Have you tried the different ones?

Your files don't look like complete HTML, i.e., there's no <html> tag...
Re: Eclipse refusing to recognize JavaScript file? [message #1821129 is a reply to message #1821127] Thu, 06 February 2020 06:00 Go to previous messageGo to next message
Nik Tes is currently offline Nik TesFriend
Messages: 5
Registered: February 2020
Junior Member
Yeah I fixed the syntax, and it displays correctly in firefox, but eclipse refuses to show the color, or 'popup', when I behgin to include methods such String variable.toUpper().

https://i.imgur.com/QVmbHwG.png
https://i.imgur.com/oNF4Dxf.png

I configured Eclipse to open HTML files with firefox by default not it's built-in browser..
Re: Eclipse refusing to recognize JavaScript file? [message #1821130 is a reply to message #1821129] Thu, 06 February 2020 07:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31163
Registered: July 2009
Senior Member
Note my question about Open With. In particular, from the icons on the editor tabs, I can see that some editors are open with the Text editor and that will not do colorization. For me, when I open a *.html file with "Generic Text Editor", it colorizes everything, including the <script> content.
Re: Eclipse refusing to recognize JavaScript file? [message #1821176 is a reply to message #1821130] Thu, 06 February 2020 15:46 Go to previous message
Nik Tes is currently offline Nik TesFriend
Messages: 5
Registered: February 2020
Junior Member
That fixed the problem. Thanks.

Previous Topic:get packages PDE and SWT
Next Topic:papyrus to excel
Goto Forum:
  


Current Time: Fri Jun 05 23:13:24 GMT 2020

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

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

Back to the top