CSS Attribute Description and Validation (for JavaFX)


As part of e(fx)clipse we are implementing a custom CSS-Editor based upon Xtext.

We have a grammer of CSS-Specification so that we can parse CSS-Files, the interesting part though e.g. which properties are available, what values they can have is at least for JavaFX not speced in a machine useable format but as plain HTML.

There are rules in this file but they are not useable for tools so we defined our own small language to store the information in a structured format so that we can make use of them in the CSS-Editor to:

  • Show documentation
  • Provide attribute proposals
  • Provide value proposals
  • Validate attribute values

Today we’ve reached an important first milestone by showing the documentation of attributes and elements.

The language definition looks like this:

and results in the following documentation tooltips in our CSS-Xtext-Editor:

If you’d like to follow the implementation or want to take a look at the CSS-Definition-Grammer we’ve developed you can do this by cloning our git-repo and use the cssext-branch

About these ads

5 Responses to “CSS Attribute Description and Validation (for JavaFX)”

  1. Excellent! Looks like this was a bunch of work. You could almost auto-generate the table portions of the css doc with this. I wonder if there’s any way the JavaFX people would be willing to maintain it for you :).

  2. Daniel Zimmermann Reply August 29, 2012 at 7:57 am

    Ah. That sounds great! I hated to re-read the spec all the time ;-)

Trackbacks/Pingbacks

  1. Java desktop links of the week, September 3 | Jonathan Giles - September 2, 2012

    [...] Schindl has blogged about CSS attribute description and validation, and what he has done to improve CSS assistance in his e(fx)clipse tooling for JavaFX in [...]

  2. JavaFX links of the week, September 3 // JavaFX News, Demos and Insight // FX Experience - September 2, 2012

    [...] Schindl has blogged about CSS attribute description and validation, and what he has done to improve CSS assistance in his e(fx)clipse tooling for JavaFX in [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 642 other followers

%d bloggers like this: