简体   繁体   中英

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!

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.

安装Eclipse Web开发人员工具和Eclipse Java Web开发人员工具后,我解决了这个问题。

I got the same issue, an before installing packages mention above, I included JavaFX SDK and I put it on top of my "Order and Export". e(fx)clipse start working without any Unknown property and the Auto-Complete starts working as well.

Project -> Properties -> Java Build Path -> Order and Export Tab and put the JavaFX SDK on the top...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM