Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add CSS autocomplete to eclipse

i am using eclipse helios 3.6 and i am developing JSF pages (Dynamic Web Project With JSF Capabilities) and sometimes i need to add style to a component in the xhtml page

<h:commandLink style="margin-righ:10px">

(not a style class) and i want to add CSS autocomplete to eclipse how to do so ? please advise, thanks.

like image 853
fresh_dev Avatar asked Oct 26 '11 08:10

fresh_dev


People also ask

How do I enable autocomplete in eclipse?

In Eclipse click Windows Drop-Down > Click Preferences > Navigate to Java > Editor > Content Assist In order to Make the Auto suggestion/completion to work you have to set trigger that invoke the Auto Completion.

Can we use CSS in eclipse?

Eclipse Web Developer Tools Includes the HTML, CSS, and JSON Editors, and JavaScript Development Tools from the Eclipse Web Tools Platform project, aimed at supporting client-side web development and node.

How do I link CSS to HTML in Eclipse?

You could add the CSS files with the _ URL, a _ url tag, or a URL key and tag s file) to your HTML document file using the link > tag. link in the * tag, following an element of the URL title you specify below, within * head and after the * nd within the head > section, and after the title > element of your HTML file.


2 Answers

Go:

Window -> Preferences -> Web -> CSS files -> Editor -> Content assist.

And make sure the checkboxes are checked

EDIT: Ok... Then try with these:

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

OR

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

Try with these and see if it solves your problem

EDIT 2: Plus try this:

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

EDIT 3:

Window -> Preferences -> General -> Editors -> File Association

make sure it looks like this, it works for me with the autocompletion:

enter image description here

like image 174
AndroidHustle Avatar answered Sep 30 '22 20:09

AndroidHustle


You need to install a WTP extension plugin (WTP Web resources). See my answer here https://stackoverflow.com/a/43549935/2459094.

like image 30
chrysanthos Avatar answered Sep 30 '22 20:09

chrysanthos