JS formatting/colors grief [message #754128] |
Mon, 31 October 2011 23:40 |
Steve C Messages: 2 Registered: October 2011 |
Junior Member |
|
|
Hi guys,
Just getting into Eclipse (and learning android dev). I've installed and successfully run Eclipse, the Android SDK and Phonegap with a couple of tutorials (on PC), but the editor screens were just white background with black text and no intellisense.
On investigation I found that although Eclipse could interpret, compile and run HTML and Javascript ok, for some reason it needed a plugin to color it (WTP). So I got Eclipse to install it, and then Eclipse wouldn't start. Many trips to stackoverflow proved futile.
I discovered that I'd installed the default version of Eclipse (ie the Java-centric one), and there was a Javascript oriented one. So I uninstalled Eclipse, downloaded the Javascript version, installed it, re-installed the Android SDK, and got a couple of themes from eclipsecolorthemes.org.
Nothing. White page, black text.
I then went into Preferences, had a look at the Javascript settings and lo! There was some beautifully colored sample text in the Preferences dialog. Apparently the settings were already applied, but I applied them again for good measure. Nothing.
More poking around revealed the color settings in the General area of Preferences. I could pick the themes here, but found that no matter what I change it to, my code is still all the one color.
This tells me that eclipse (the editor at least) doesn't know that my code is code, it thinks it's all comments or something (both .html and .js files).
How can I make this thing understand that my html in a .html file is, in fact, html??
I've gone into File Associations and found that it knows .js = javascript and .html=HTML, so why isn't it working?
[Updated on: Mon, 31 October 2011 23:44] Report message to a moderator
|
|
|
|
Re: JS formatting/colors grief [message #754146 is a reply to message #754130] |
Tue, 01 November 2011 04:21 |
|
It's more likely you've run into the feature where Eclipse reopens the last editor you used for a particular file by default for that file, meaning if you ever opened this .js file with the plain Text Editor, that's what that file will continue to be opened with unless you tell it otherwise using the "Open With..." context menu. New files use the default for the workspace, which after installing the JavaScript tools, will be the JavaScript editor.
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.06505 seconds