CSS class not found in GWT Java code
In my GWT Java classes I'm getting a red squiggly under my CSS
class names.
What do I need to do to make IntelliJ see my CSS file?
I've got a Maven project and the CSS file is under src/main/webapp/css. I tried marking both the webapp and css folder as sources but this doesn't seem to do anything.
Anyone have any ideas?
Thanks.
Please sign in to leave a comment.
IDEA uses the following algorithm to find CSS class referenced in GWT client code. Firstly it searches for *.html files which includes the GWT module
using tag. Then it searches for CSS classes in CSS files referenced from found *.html files.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
My main entry file was a JSP so I changed it to an HTML, fixed the <link> reference for my CSS file and the web.xml for <welcome-file> and it is still complaining that it cannot find the CSS classes. I tried closing the project and IntelliJ and restarting/reloading.
What else can I try? Thanks.
Is it possible to get sources of your project (.idea directory, *.iml files, and related java, html and css files)?
As a workaround you can disable the inspection (put the cursor on the error, press Alt+Enter, press the right arrow and select 'Disable Inspection').
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Unfortunately, as seems to be typical in these cases, I am unable to reproduce this with a new project. I'll keep mucking with it when I have a chance and see if I can figure it out.