Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » CSS validation problems
CSS validation problems [message #1098942] Sat, 31 August 2013 23:24 Go to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
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]

Report message to a moderator

Re: CSS validation problems [message #1100188 is a reply to message #1100170] Mon, 02 September 2013 20:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 #1100213 is a reply to message #1100188] Mon, 02 September 2013 21:17 Go to previous messageGo to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
I need more than 5 messages to post a picture Neutral
Re: CSS validation problems [message #1100214 is a reply to message #1100213] Mon, 02 September 2013 21:18 Go to previous messageGo to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
sorry mod
Re: CSS validation problems [message #1100215 is a reply to message #1100214] Mon, 02 September 2013 21:18 Go to previous messageGo to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
i just need one more
Re: CSS validation problems [message #1100216 is a reply to message #1100215] Mon, 02 September 2013 21:19 Go to previous messageGo to next message
Marten de Groot is currently offline Marten de Groot
Messages: 6
Registered: August 2013
Junior Member
And here it is:

http://s23.postimg.org/wsds3n1br/Capture.jpg

[Updated on: Mon, 02 September 2013 21:20]

Report message to a moderator

Re: CSS validation problems [message #1140961 is a reply to message #1100216] Wed, 16 October 2013 18:45 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Mikael Lantz is currently offline Mikael Lantz
Messages: 4
Registered: April 2011
Location: Sweden
Junior Member
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]

Report message to a moderator

Re: CSS validation problems [message #1149735 is a reply to message #1149695] Tue, 22 October 2013 09:15 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
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]

Report message to a moderator

Re: CSS validation problems [message #1149829 is a reply to message #1149735] Tue, 22 October 2013 10:38 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 #1149841 is a reply to message #1149735] Tue, 22 October 2013 10:46 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
Please replace where I wrote "errors" with "warnings". The project warns unknown properties.

--
EDIT

Well.. I found out that I could edit the answer myself Smile Done!

[Updated on: Tue, 22 October 2013 10:49]

Report message to a moderator

Re: CSS validation problems [message #1149852 is a reply to message #1149841] Tue, 22 October 2013 10:57 Go to previous messageGo to next message
Mikael Lantz is currently offline Mikael Lantz
Messages: 4
Registered: April 2011
Location: Sweden
Junior Member
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 Razz
Re: CSS validation problems [message #1150178 is a reply to message #1149852] Tue, 22 October 2013 15:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 #1151608 is a reply to message #1150178] Wed, 23 October 2013 13:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Philipp Keck is currently offline Philipp Keck
Messages: 1
Registered: October 2013
Junior Member
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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 #1314991 is a reply to message #1152340] Fri, 25 April 2014 18:36 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
An image is about to come...
Re: CSS validation problems [message #1314992 is a reply to message #1152340] Fri, 25 April 2014 18:37 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
Last wasted post.
Re: CSS validation problems [message #1314993 is a reply to message #1152340] Fri, 25 April 2014 18:38 Go to previous messageGo to next message
Matheus Silva is currently offline Matheus Silva
Messages: 6
Registered: October 2013
Junior Member
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:

http://i.stack.imgur.com/Qf6Wl.png

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 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5415
Registered: July 2009
Senior Member
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
Previous Topic:problem following e(fx)clipse tutorial 1 step 9
Next Topic:e(fx)clipse runtime in 3.8 and/or Java 7
Goto Forum:
  


Current Time: Thu Oct 23 10:23:23 GMT 2014

Powered by FUDForum. Page generated in 0.02500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software