我正在构建一个Juzu项目,用于使用IntelliJ为eXio平台开发portlet。
问题是,我有index.gtmpl
的模板文件,其中可以有HTML编码,但文件打开时是一个简单的文本文件。
我缺少的配置上有插件吗?
谢谢!
====================**编辑**==============================
我的文件如下:
editMode.gtmpl
#{param name=enableComment/}
<form action="@{JuZcretApplication.enableComment()}" method="POST" role="form">
<h5>Configuration</h5>
<input type="checkbox" name="enableComment" <%=enableComment ? "checked" : "" %>/>
启用注释<button type="submit">Save</button>
</form>
您可以将*.gtmpl
文件与HTML编辑器关联:
打开File > Settings > Editor > File Types > HTML files
并将您的扩展名添加到右侧面板中的已注册图案中。
源
[UPDATE][已解决]
我在这个问题上做了一些进一步的研究,找到了一个更好的解决方案:
如果将*.gtmpl
文件关联为File > Settings > Editor > File Types > Groovy Server Page
。
这不是一个完整的解决方案,但@darek-kay提到的IntelliJ不支持这些文件。