11

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.

2 Answers 2

13

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

Sign up to request clarification or add additional context in comments.

13 Comments

in fact they are checked, maybe that works in css files only ?
you noticed that i asked for autocomplete in xhtml page not in css file ?
doesn't work either no css proposal, no css template proposal, no default proposal.
Sorry I've been away. Ok, so it's a .JSP file containing xHTML right? Look at my edit.
hmm... there seems to be something really wrong with your environment configuration... this looks like an old bug that could appear in the IDE, that has been fixed, I can't see why you're getting it... I don't know honestly, re-install Eclipse? If that's not too great of an issue..?
|
2

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.