Home » Eclipse Projects » e(fx)clipse » CSS validation problems
CSS validation problems [message #1098942] |
Sat, 31 August 2013 23:24 |
Eclipse User |
|
|
|
Hi all,
First of all, I just started out on writing javafx code in eclipse, so please forgive me if I'm asking stupid questions.
One of the first things I tried to do was to write a customized stylesheet for my application. However, for every property I add in the sheet I'm recieving an "unknown property" warning. Is this normal, or am I doing something wrong?
I already tried installing additional the E4 CSS editor, but that didn't solve my problem.
Could someone help me out on this?
Kind regards
|
|
|
Re: CSS validation problems [message #1099934 is a reply to message #1098942] |
Mon, 02 September 2013 12:10 |
Eclipse User |
|
|
|
Do not install the e4 css editor this does not help with JavaFX CSS. So
what version of e(fx)clipse do you have? Can you show some of your css code?
Tom
On 02.09.13 13:20, Marten de Groot wrote:
> Hi all,
>
> First of all, I just started out on writing javafx code in eclipse, so
> please forgive me if I'm asking stupid questions.
>
> One of the first things I tried to do was to write a customized
> stylesheet for my application. However, for every property I add in the
> sheet I'm recieving an "unknown property" warning. Is this normal, or am
> I doing something wrong?
>
> I already tried installing additional the E4 CSS editor, but that didn't
> solve my problem.
>
> Could someone help me out on this?
>
> Kind regards
|
|
|
Re: CSS validation problems [message #1100170 is a reply to message #1098942] |
Mon, 02 September 2013 19:46 |
Eclipse User |
|
|
|
Hi Tom, thanks for your reply! I just read the css validation on your blog.
The problem is that I encounter warnings on every piece of css I write. Even if it works. And then I'm doing the most basic things you can think of.
For example:
.root {
-fx-background-color: red;
}
I'm getting a warning on that single line already.
[Updated on: Mon, 02 September 2013 19:49] by Moderator Report message to a moderator
|
|
|
Re: CSS validation problems [message #1100188 is a reply to message #1100170] |
Mon, 02 September 2013 20:30 |
Eclipse User |
|
|
|
I don't get any warning on when using this sample :-(
Tom
On 02.09.13 21:46, Marten de Groot wrote:
> Hi Tom, thanks for your reply! I just read the css validation on your blog.
>
> The problem is that I encounter warnings on every piece of css I write.
> Even if it works. And then I'm doing the most basic things you can think
> of.
>
> For example:
>
> root {
> -fx-background-color: red;
> }
>
> I'm getting a warning on that second line already.
|
|
| | | | |
Re: CSS validation problems [message #1140961 is a reply to message #1100216] |
Wed, 16 October 2013 18:45 |
Eclipse User |
|
|
|
Marten,
Did you managed to solve the problem? I have a similar issue, but what is weird on mine is that I have two (JavaFX) project on my Eclipse workspace, and I use the exactly same css for both projects, one projects doesn't show me any warnings and the other one shows me one warning for each property, that is "Unknown property".
I'm trying to understand what causes this, but I have no clues so far.
Any help would be appreciated.
Regards,
Matheus
|
|
|
Re: CSS validation problems [message #1141815 is a reply to message #1140961] |
Thu, 17 October 2013 07:53 |
Eclipse User |
|
|
|
So are those 2 projects setup equally, do they both e.g. have
javafxrt.jar? Are they based on Java7 or Java8? To me it sounds like we
are not appropriately detecting that the project is a JavaFX project and
so we don't load the cssext-Files for them.
I'll try to add some debugging information so that we can find the root
cause of the problem.
Tom
On 16.10.13 22:20, Matheus Silva wrote:
> Marten,
>
> Did you managed to solve the problem? I have a similar issue, but what
> is weird on mine is that I have two (JavaFX) project on my Eclipse
> workspace, and I use the exactly same css for both projects, one
> projects doesn't show me any warnings and the other one shows me one
> warning for each property, that is "Unknown property".
>
> I'm trying to understand what causes this, but I have no clues so far.
>
> Any help would be appreciated.
>
> Regards,
> Matheus
|
|
|
Re: CSS validation problems [message #1149695 is a reply to message #1098942] |
Tue, 22 October 2013 08:36 |
Eclipse User |
|
|
|
Hi,
I'm experiencing the same problem with warnings that Marten reported above with the css editor. I have a clean installation of the Eclipse Kepler SDK and the latest e(fx)clipse plugin.
Here's my setup:
Eclipse SDK version 4.3.1.M20130911-1000
e(fx)clipse - IDE - Kepler version 0.9.0.201310220709
I use the JDK version 1.7.0_45_x64.
Everything else works fine, it's just the css editor that has these problems.
[Updated on: Tue, 22 October 2013 08:37] by Moderator Report message to a moderator
|
|
|
Re: CSS validation problems [message #1149735 is a reply to message #1149695] |
Tue, 22 October 2013 09:15 |
Eclipse User |
|
|
|
Can you upload your project somewhere, so that I can check it out?
Tom
On 22.10.13 10:36, Mikael Mising name wrote:
> Hi,
>
> I'm experiencing the same problem with warnings that Marten reported
> above with the css editor. I have a clean installation of the Eclipse
> Kepler SDK and the latest e(fx)clipse plugin.
>
> Here's my setup:
>
> Eclipse SDK version 4.3.1.M20130911-1000
> e(fx)clipse - IDE - Kepler version 0.9.0.201310220709
>
> I use the JDK version 1.7.0_45_x64.
>
|
|
|
Re: CSS validation problems [message #1149828 is a reply to message #1149735] |
Tue, 22 October 2013 10:38 |
Eclipse User |
|
|
|
Thomas,
I found out and solved my problem, it happens when the project name has spaces on it, for example, I renamed "My Project" to "MyProject" and the warnings are gone, if I change it back to "My Project" the warnings come back. Simple like that.
I'm using Windows 8 64-bit, jdk1.7.0_25, Eclipse Version: Kepler Release, Build id: 20130614-0229.
If you need more information please let me know.
[Updated on: Tue, 22 October 2013 10:48] by Moderator Report message to a moderator
|
|
|
Re: CSS validation problems [message #1149829 is a reply to message #1149735] |
Tue, 22 October 2013 10:38 |
Eclipse User |
|
|
|
I've logged - https://bugs.eclipse.org/bugs/show_bug.cgi?id=420059 and
just checked in some code to debug the situation.
A nightly update is available holding the possibility to debug the code
a bit on your side. On which platform are you? Win32/Linux?
Tom
On 22.10.13 11:15, Tom Schindl wrote:
> Can you upload your project somewhere, so that I can check it out?
>
> Tom
>
> On 22.10.13 10:36, Mikael Mising name wrote:
>> Hi,
>>
>> I'm experiencing the same problem with warnings that Marten reported
>> above with the css editor. I have a clean installation of the Eclipse
>> Kepler SDK and the latest e(fx)clipse plugin.
>>
>> Here's my setup:
>>
>> Eclipse SDK version 4.3.1.M20130911-1000
>> e(fx)clipse - IDE - Kepler version 0.9.0.201310220709
>>
>> I use the JDK version 1.7.0_45_x64.
>>
>
|
|
|
Re: CSS validation problems [message #1149830 is a reply to message #1149828] |
Tue, 22 October 2013 10:39 |
Eclipse User |
|
|
|
Hi,
Ok - that's interesting! We'll try to reproduce locally with that
information.
Tom
On 22.10.13 12:38, Matheus Silva wrote:
> Thomas,
>
> I found out and solved my problem, it happens when the project name has
> spaces on it, for example, I renamed "My Project" to "MyProject" and the
> errors are gone, if I change it back to "My Project" the errors come
> back. Simple like that.
>
> I'm using Windows 8 64-bit, jdk1.7.0_25, Eclipse Version: Kepler
> Release, Build id: 20130614-0229.
>
> If you need more information please let me know.
|
|
| | | |
Re: CSS validation problems [message #1151608 is a reply to message #1150178] |
Wed, 23 October 2013 13:17 |
Eclipse User |
|
|
|
I inappropriately blamed core-resources, but it turned out to be a bug
in our EMF-URI => Core-Resource translation.
Now projects with whitespaces should work. I would still suggest to stay
a way from whitespaces in project and folder names because I could
imagine other things could get broken as well (e.g. packaging).
Tom
On 22.10.13 17:47, Tom Schindl wrote:
> Hi,
>
> Yes this looks like an upstream problem in core.resources I've filed a
> bug against them (https://bugs.eclipse.org/bugs/show_bug.cgi?id=420095).
>
> Tom
>
> On 22.10.13 12:57, Mikael Lantz wrote:
>> Hi again,
>> I also had spaces in the project name, once I renamed it it works fine.
>> So there seems to be a bug there :p
>
|
|
|
Re: CSS validation problems [message #1152147 is a reply to message #1151608] |
Wed, 23 October 2013 21:06 |
Eclipse User |
|
|
|
Hi,
I also have an issue with the validation of my stylesheet:
(Sidenote: My project name contains a ".", but the error also occurs in a new project named "sdf")
When using selectors like ".text-field" or ".toggle-button", which are resolved to the classes in javafx.scene.control according to the ToolTip, I get warnings on all -fx-properties inside, like: "-fx-background-color" is not supported by the given selectors.
The warnings are shown in both the e(fx)clipse and the normal CSS editor. Despite the warnings, the CSS rules work and have visible effect on the UI.
Additionally, I get "Unknown property: -fx-color" whenever I use the property, no matter where.
Philipp
|
|
|
Re: CSS validation problems [message #1152340 is a reply to message #1152147] |
Thu, 24 October 2013 00:18 |
Eclipse User |
|
|
|
For the text-field there was a bug!
Generally speaking in fx 2.x controls inherit from Parent and so they
css-editor is right when saying that there's no -fx-background-color!
My educated guess why it still works is because of the
skin-implementation. In fx8 Control inherits from Region.
-fx-color is a color variable and we currently don't support them, hence
it is marked as a warning, we hope to fix this one day and teach the
editor those variables.
Tom
On 24.10.13 01:39, Philipp Keck wrote:
> Hi,
>
> I also have an issue with the validation of my stylesheet:
> (Sidenote: My project name contains a ".", but the error also occurs in
> a new project named "sdf")
>
> When using selectors like ".text-field" or ".toggle-button", which are
> resolved to the classes in javafx.scene.control according to the
> ToolTip, I get warnings on all -fx-properties inside, like:
> "-fx-background-color" is not supported by the given selectors.
> The warnings are shown in both the e(fx)clipse and the normal CSS
> editor. Despite the warnings, the CSS rules work and have visible effect
> on the UI.
>
> Additionally, I get "Unknown property: -fx-color" whenever I use the
> property, no matter where.
>
> Philipp
|
|
| | |
Re: CSS validation problems [message #1314993 is a reply to message #1152340] |
Fri, 25 April 2014 18:38 |
Eclipse User |
|
|
|
Hi Thomas, I'm back with more doubts!
I downloaded a sample named javafx-samples-2.2.40, I'm sorry but I can't remember where from.
There are lots of cool samples there, then I decided to copy one css from there to a project of mine.
It worked fine, however there are lots of warnings showing up to me, please see the image below:
All the warnings says: "-fx-some-property" is not supported by the given selectors; example: -fx-background-color, -fx-background-radius, -fx-background-insets, etc.
I'm wondering on how could I fix the warnings, or at least dismiss them. I tried really really hard, but I can't get rid of them. Do you have any advice?
Regards,
Matheus
|
|
|
Re: CSS validation problems [message #1315974 is a reply to message #1314993] |
Sat, 26 April 2014 07:50 |
Eclipse User |
|
|
|
Hi,
I assume you are developing against a JDK7 and there if you look at the
CSS-Docs you'll find out that [1]
Button extends ButtonBase extends Labeled extends Control extends Parent
extends Node
and according to the docs the properties you use are all defined on
Region. Now I know that those properties work as well on Java7 but
Oracle doced it this way and so does the tooling behave.
If you switch your project to Java8 you notice the warnings are gone
because there Oracle spec'ed [2]
Button extends ButtonBase extends Labeled extends Control *extends
Region* extends Parent extends Node.
Tom
[1]http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html
[2]http://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html
On 25.04.14 20:38, Matheus Silva wrote:
> Hi Thomas, I'm back with more doubts!
>
> I downloaded a sample named javafx-samples-2.2.40, I'm sorry but I can't
> remember where from.
>
> There are lots of cool samples there, then I decided to copy one css
> from there to a project of mine.
>
> It worked fine, however there are lots of warnings showing up to me,
> please see the image below:
>
>
>
> All the warnings says: "-fx-some-property" is not supported by the given
> selectors; example: -fx-background-color, -fx-background-radius,
> -fx-background-insets, etc.
>
> I'm wondering on how could I fix the warnings, or at least dismiss them.
> I tried really really hard, but I can't get rid of them. Do you have any
> advice?
>
> Regards,
> Matheus
|
|
|
Re: CSS validation problems [message #1450869 is a reply to message #1098942] |
Thu, 23 October 2014 02:26 |
Eclipse User |
|
|
|
I have a related problem: When I generate JavaDoc for my project (inside the project folder, but outside of the src package), the generated stylesheet.css produces over 300 warnings. The same problem occurs when I store *.css resource files in the project. Is it possible to limit css validation to the src package only?
Regards,
Dieter
|
|
|
Re: CSS validation problems [message #1451158 is a reply to message #1450869] |
Thu, 23 October 2014 12:19 |
Eclipse User |
|
|
|
Can you file a bug for that?
One solution I could think about is that you add a comment at the top of
the file which holds a comment telling e(fx)clipse not to validate it!
Something like:
/* no efxclipse validation */
In case you have WTP-CSS installed the file would be ignored by
JavaFX-CSS and you would not get any warnings.
Tom
On 23.10.14 14:13, Dieter Köhler wrote:
> I have a related problem: When I generate JavaDoc for my project (inside
> the project folder, but outside of the src package), the generated
> stylesheet.css produces over 300 warnings. The same problem occurs when
> I store *.css resource files in the project. Is it possible to limit css
> validation to the src package only?
>
> Regards,
>
> Dieter
|
|
|
Re: CSS validation problems [message #1451187 is a reply to message #1451158] |
Thu, 23 October 2014 13:04 |
Eclipse User |
|
|
|
Ok I think we can do even better. We check the source and it if it is:
a) in an standard java project not in source-dir we don't validate
b) in an osgi project it is not part of the files mentionned in the
build.properties
Tom
On 23.10.14 14:19, Tom Schindl wrote:
> Can you file a bug for that?
>
> One solution I could think about is that you add a comment at the top of
> the file which holds a comment telling e(fx)clipse not to validate it!
>
> Something like:
> /* no efxclipse validation */
>
> In case you have WTP-CSS installed the file would be ignored by
> JavaFX-CSS and you would not get any warnings.
>
> Tom
>
> On 23.10.14 14:13, Dieter Köhler wrote:
>> I have a related problem: When I generate JavaDoc for my project (inside
>> the project folder, but outside of the src package), the generated
>> stylesheet.css produces over 300 warnings. The same problem occurs when
>> I store *.css resource files in the project. Is it possible to limit css
>> validation to the src package only?
>>
>> Regards,
>>
>> Dieter
>
|
|
|
Re: CSS validation problems [message #1451789 is a reply to message #1450869] |
Fri, 24 October 2014 09:34 |
Eclipse User |
|
|
|
Hi,
I went ahead and filed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=448610 and implemented the
following things:
* only validate stuff in src and/or build.properties
* allow to selectively suppress warnings with something like this:
..button {
/* @SuppressWarning */
-fx-i-m-smarter-than-efx: #ff0000;
}
Together with https://bugs.eclipse.org/bugs/show_bug.cgi?id=448147 which
removed all warnings for predefined variables should allow you to get
warning free css files.
Tom
On 23.10.14 14:13, Dieter Köhler wrote:
> I have a related problem: When I generate JavaDoc for my project (inside
> the project folder, but outside of the src package), the generated
> stylesheet.css produces over 300 warnings. The same problem occurs when
> I store *.css resource files in the project. Is it possible to limit css
> validation to the src package only?
>
> Regards,
>
> Dieter
|
|
| |
Re: CSS validation problems [message #1681776 is a reply to message #1681195] |
Tue, 17 March 2015 13:03 |
Eclipse User |
|
|
|
Final target must be that we get rid of this and find another solution.
Tom
On 17.03.15 13:54, makoto mizutani wrote:
> Hi all
>
> You can improve project->properties->Java Build Path->Add Library->
> JavaFX SDK
>
> I could improve!! :)
|
|
|
Re: CSS validation problems [message #1703769 is a reply to message #1681776] |
Tue, 04 August 2015 19:29 |
Eclipse User |
|
|
|
I still have Css warnings with Eclipse Mars and e(fx)clipse 2.0 and wrote a Stackoverflow question. I am not able to post the link. Look for
how-to-disable-css-warning-unknown-property-in-eclipse-mars
|
|
|
Re: CSS validation problems [message #1703811 is a reply to message #1703769] |
Wed, 05 August 2015 07:02 |
Eclipse User |
|
|
|
Hi,
File a bug against e(fx)clipse. I think we should go with disabling
validation by default and people who want it should add something like:
/*
* @javafxvalidation on
*/
Tom
On 05.08.15 04:24, Stefan Eidelloth wrote:
> I still have Css warnings with Eclipse Mars and e(fx)clipse 2.0 and
> wrote a Stackoverflow question. I am not able to post the link. Look for
>
> how-to-disable-css-warning-unknown-property-in-eclipse-mars
>
>
|
|
| |
Goto Forum:
Current Time: Mon Feb 10 09:51:42 GMT 2025
Powered by FUDForum. Page generated in 0.08918 seconds
|