In JavaFX project CSS styles color picker menu does not open
已回答
This only happens in my new JavaFX projects. My older ones still open the color picker menu correctly. for example in my styles.css file:
.button
{
-fx-text-fill:
}
in my new projects after ":" I hit space, ctrl + space or ctrl + alt + space and it says "No suggestions"
I have done the usual cache cleaning, setting res folder, restarting and even reinstalling but no luck.Any idea what's going on?
请先登录再写评论。
Could you please share a sample project to reproduce the issue and the logs (Help | Compress Logs and Show in ...)? You can upload the files at https://uploads.services.jetbrains.com/ and specify the name here.
Please also provide the screenshot of the IDE window with the .css file open where it doesn't work.
For sure, I have already uploaded the files under name:
Hello Sean,
Please clarify what IntelliJ IDEA version do you use?
I've tested your project with 2020.1 (https://www.jetbrains.com/idea/nextversion), JDK 9, Gluon JavaFX 13:
In case you change the styles.css to /styles.css, reference becomes resolved:
Completion in css file also works correct. If possible can you please try if the issue is reproduced for you with the same IntelliJ IDEA version.
Also please tell what version of JDK and JavaFX do you use?
Thank you
I am using:
IntelliJ IDEA 2019.3.3
Gluon JavaFX 14
Oracle JDK 13.0.2
The completion works for the first part of a CSS statement before ":" for example when I start typing -fx... the code suggestion shows me the menu of possible choices, but after I choose one there is no suggestion help for the value part. So if I choose "-fx-background-color: " there is no suggestions for the color name as I type. This still works in my older projects with same IDE, SDK and JDK mentioned above. The color picker menu is very helpful when picking colors for a theme and also for values that are not frequently used.
Please let me know if you need more information.
Sean,
Thank you for clarification. Your issue is reproduced for me with 2019.3.3, but works correct with 2020.1 (https://confluence.jetbrains.com/display/IDEADEV/IDEA+2020.1+latest+builds). If possible can you please check if the behaviour is correct for you as well with newer version. Thank you
I will check it out and let you know. After a lot of digging I found a seemingly unrelated setting that affects this behavior. The code completion will start working correctly if I add an artifact in project structure > project settings > artifacts. I don't know if this is a bug or it is working as it should. Here is a GIF to show it:
Sean,
The described steps with artifacts are reproduced for me as well with v2019.3.3, but the issue is not reproduced for me with v2020.1 even with empty artifacts settings.
That's good. When will the new version be released?
Sean, 2020.1 is planned to be released later at Spring 2020.
Hello,
Please tell what version of IDE do you use? Please share the sample project to https://uploads.services.jetbrains.com/ if possible.
Thank you