Why doesn't IntelliJ recognize JavaFX CSS files?

Answered

This used to work, but for a while now, IntelliJ doesn't recognize JavaFX CSS files and offer auto-completion, etc. It does recognize it as a CSS file but doesn't seem aware of the JavaFX specific CSS properties. It marks all of the -fx-* properties as warnings.

I have the Utlimate version with the JavaFX 2 and CSS plugins.

Any hints appreciated.

Curtis

7 comments
Comment actions Permalink

Any answers on this?  or on how to fix this, its a pain when a perfectly valid file shows 22 errors and 57 warnings 

mostly along the lines of unknown function 'derive' and unknown property '-fx-*' ie: -fx-background-color 

I like an IDE to be free of warnings and errors so I had see what is really a bug. Too much noise! 

0
Comment actions Permalink

Try opening the preferences>Other Settings > CSS dialects.
You should be able to set which CSS Validator you can use on a file by file basis or by project.

This gets rid of all the warnings for -fx tags. Derive is still flagged so for example 

-fx-background-color: derive(grey, -60%); shows an error.


anyone know how to add that as a custom property?

 

1
Comment actions Permalink

I don't see that setting in 16 EAP. Mine is working pretty good now. However, like you said, things like ladder and derive are shown as errors.

0
Comment actions Permalink

@Curtis Better late than never. You find this here:

 

0
Comment actions Permalink

Wow! Thanks for the update. I had forgotten all about it :)

0
Comment actions Permalink

Still does not recognize ladder and derive for me, even though the whole project has Java FX as Stylesheet dialect...

0
Comment actions Permalink

Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with a small sample project to reproduce the issue.

0

Please sign in to leave a comment.