如何在eclipse中添加CSS自动完成功能

fre*_*dev 11 eclipse autocomplete java-ee

我正在使用eclipse helios 3.6 ,我正在开发JSF页面(带有JSF功能的动态Web项目),有时我需要在xhtml页面中为组件添加样式

<h:commandLink style="margin-righ:10px">
Run Code Online (Sandbox Code Playgroud)

(不是样式类)我想添加CSS自动完成到eclipse如何这样做?请指教,谢谢.

And*_*tle 12

走:

窗口 - >首选项 - > Web - > CSS文件 - >编辑器 - >内容辅助.

并确保选中复选框

编辑:好的...然后试试这些:

Window - > Preferences - > General - > Content Types - > Text - > JSP - > Add(*.css)

要么

Window - > Preferences - > General - > Content Types - > Text - > Java Source File - > Add(*.css)

试试这些,看看它是否解决了你的问题

编辑2:再试试这个:

Window - > Preferences - > General - > Editors - > File Association - > Add(*.css)

编辑3:

窗口 - >首选项 - >常规 - >编辑器 - >文件关联

确保它看起来像这样,它适用于我自动完成:

在此输入图像描述