简体   繁体   English

IDE:e(fx)clipse无法正常工作

[英]IDE: e(fx)clipse not working properly

I have the following problem: 我有以下问题:

I have installed e(fx)clipse in Eclipse to enable JavaFX compatibility. 我在Eclipse中安装了e(fx)clipse以实现JavaFX兼容性。 It properly created the following: 它正确地创建了以下内容:

  • CSS and FXML files are associated with the correct editor (from within 'file associations') CSS和FXML文件与正确的编辑器相关联(来自'文件关联')

It is not functioning properly, because it lacks to do the following: 它运行不正常,因为它缺乏以下功能:

  • It shows Unknown property: -fx-.... for every entry in my CSS. 它显示了我的CSS中每个条目的Unknown property: -fx-....
  • It does not autocomplete in both the FXML and CSS files. 它不会在FXML和CSS文件中自动完成。
  • It keeps showing: The controller 'someController' has no field 'someField' , while the fields are initiated in the controller. 它一直显示: The controller 'someController' has no field 'someField' ,而字段是在控制器中启动的。

What I already tried to fix this: 我已经尝试解决这个问题:

  • Added JavaFX SDK to the project libraries. 将JavaFX SDK添加到项目库中。
  • Checked the installed software section of Eclipse, but all of the e(fx)clipse packages are correctly installed. 检查Eclipse的已安装软件部分,但是所有e(fx)clipse包都已正确安装。
  • Created a new JavaFX project from scratch. 从头开始创建一个新的JavaFX项目。

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'. 我认为它与添加库有关,因为当我添加JavaFX SDK并单击“下一步”时,我得到一个blanco屏幕,我必须单击“完成”。 When I do, it only adds org.eclipse.fx.ide.css.jfx8 . 当我这样做时,它只添加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. 我正在使用Eclipse Luna 4.4.1和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. 我有同样的问题,无法使用我的JavaFX CSS自动完成。 My fix was add the JavaFX SDK to the library list. 我的修复是将JavaFX SDK添加到库列表中。 To do that: 要做到这一点:

  1. Go to Project | 转到项目| Properties 属性
  2. Select Java Build Path in the tree 在树中选择Java Build Path
  3. Click on the Libraries tab 单击Libraries选项卡
  4. Click the Add Library... button 单击“添加库...”按钮
  5. Choose JavaFX SDK 选择JavaFX SDK
  6. Click Next then Finish 单击Next然后单击Finish
  7. Click Apply 单击“应用”
  8. Click OK 单击确定

CSS editing worked after those steps. CSS编辑在这些步骤之后工作。

安装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". 我遇到了同样的问题,在上面提到的安装软件包之前,我包含了JavaFX SDK,并把它放在我的“Order and Export”之上。 e(fx)clipse start working without any Unknown property and the Auto-Complete starts working as well. e(fx)clipse开始工作,没有任何未知属性,自动完成也开始工作。

Project -> Properties -> Java Build Path -> Order and Export Tab and put the JavaFX SDK on the top... 项目 - >属性 - > Java构建路径 - >订单和导出选项卡 ,并将JavaFX SDK放在顶部...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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