Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript / HTML highlighting / debugging in Eclipse using PhoneGap

I am writing an app using PhoneGap for Android in Eclipse. Since the project is an Android project, it's in a Java perspective. For whatever reason, Eclipse won't highlight HTML and JavaScript for me while in an Android/Java project/perspective and switching to the JavaScript perspective doesn't highlight the code either. Without highlighting or debugging tools, the debug process is very slow.

How do I tell Eclipse to highlight HTML and JavaScript for me while working in a Java Environment?

like image 496
Jason Hartley Avatar asked Apr 04 '12 20:04

Jason Hartley


2 Answers

Make sure you have JSDT(for JavaScript) and the Web Page Editor(for HTML) installed. From About Eclipse -> Installation Details, check for JavaScript Development Tools(JSDT) and Web Page Editor.

To install them :

  • Install New Software -> Work with: Indigo (or Helios) ->Web, XML Java EE, and OSGi Enterprise Development -> JavaScript Development Tools
  • Install New Software -> Work with: Indigo (or Helios) ->Web, XML Java EE, and OSGi Enterprise Development -> Web Page Editor

Alternatively, you could use the AppLaud Eclipse plugin I've created for doing PhoneGap development for Android. See the Getting Started instructions.

like image 110
Paul Beusterien Avatar answered Oct 18 '22 08:10

Paul Beusterien


The only real solution I found was to create a new html document and paste in the text from the original document, delete the original, then rename the new document. This technique is dumb, but it works.

like image 4
Jason Hartley Avatar answered Oct 18 '22 06:10

Jason Hartley