Eclipse XML/HTML语法高亮方法

到官方插件下载:http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor

Download from here. Put the downloaded JAR file into ECLIPSE_HOME/plugins or ECLIPSE_HOME/dropins.

EclipseHTMLEditor requires GEF (GEF is optinal. If GEF isn't installed, the Palette view would be unavailable). You can install it using Eclipse Update Manager.

通过eclipse自带的安装/更新方式

检验是否安装成功

新建文件 -> others-> Amateras

重启后发现没有高亮,解决办法有两个:

1,暂时解决

右键文件,open-with

2,永久解决

安装后再Window->Preferences->General->Editors->File Associations

.html现在Amateras为默认打开

.js也是

Note: SWT Browser widget (HTMLEditor uses it for preview HTML and JSP) requires Mozilla in the Linux. See details at The SWT FAQ. Also you can disable preview in the preference dialog. Choose [Window]->[Preferences]->[Amateras] and check [Disable Preview]. Then you would be able to use HTMLEditor without Mozilla.

Eclipse HTML Editor is an Eclipse plugin for HTML/JSP/XML Editing. It requires JDT and GEF. It has following features.

    • HTML/JSP/XML/CSS/DTD/JavaScript Hilighting
    • HTML/JSP Preview
    • JSP/XML Validation
    • Contents Assist (HTML Tags/Attributes, XML based on DTD and JSP taglib and more)
    • Wizards for creating HTML/JSP/XML files
    • Outline View
    • Editor Preferences
    • Editor Folding
    • Web Browser (It works as an Eclipse's editor)
    • Image Viewer
    • Tag Palette
    • CSS code completion and outline
    • DTD code completion, outline and validation
    • JavaScript code completion, outline and validation
原文地址:https://www.cnblogs.com/regconfi/p/4873073.html