Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDE: e(fx)clipse not working properly

I have the following problem:

I have installed e(fx)clipse in Eclipse to enable JavaFX compatibility. It properly created the following:

  • CSS and FXML files are associated with the correct editor (from within 'file associations')

It is not functioning properly, because it lacks to do the following:

  • It shows Unknown property: -fx-.... for every entry in my CSS.
  • It does not autocomplete in both the FXML and CSS files.
  • It keeps showing: The controller 'someController' has no field 'someField', while the fields are initiated in the controller.

What I already tried to fix this:

  • Added JavaFX SDK to the project libraries.
  • Checked the installed software section of Eclipse, but all of the e(fx)clipse packages are correctly installed.
  • Created a new JavaFX project from scratch.

This didn't fix the problem. I think it has something to do with adding the library, because when I add JavaFX SDK and click 'Next', I get a blanco screen and I have to click 'Finish'. When I do, it only adds org.eclipse.fx.ide.css.jfx8. Is this just normal, or should there be more packages?

I am using Eclipse Luna 4.4.1 and Java JDK 8u40.

Any help is greatly appreciated!

like image 543
bashoogzaad Avatar asked Nov 25 '14 15:11

bashoogzaad


1 Answers

To clarify Alex's answer.

I had the same issue of being unable to get auto-complete with my JavaFX CSS. My fix was add the JavaFX SDK to the library list. To do that:

  1. Go to Project | Properties
  2. Select Java Build Path in the tree
  3. Click on the Libraries tab
  4. Click the Add Library... button
  5. Choose JavaFX SDK
  6. Click Next then Finish
  7. Click Apply
  8. Click OK

CSS editing worked after those steps.

like image 122
Chris Avatar answered Sep 21 '22 00:09

Chris