How to add SceneBuilder to Intellij after mistakenly adding the SceneBuilder's shortcut link

夙愿已清 提交于 2020-01-11 06:21:14

问题


So I installed Intellij for the first time and I mistakenly linked SceneBuilder's shortcut link to the FXML file and keep getting this error: IntelliJ failed to start scene builder. After doing a lot of searching, I could not find out how to reset SceneBuilder. How do I reset SceneBuilder in IntelliJ?


回答1:


Go to Settings > Languages & Frameworks > JavaFX > Path to SceneBuilder and select directory of JavaFX Scene Builder 2.0.exe




回答2:


I had to follow this instruction to find the files I needed to edit. -> Instructions

I use Windows 10 so I used <SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>. My path looks like C:\Users\yourUserName\.IdeaIC2017.3\config. Next, I searched for "scenebulder". The results lead me to a file named "options" and a file named "other".

other.xml

<application>
  <component name="JavaFxSettings">
    <!-- change here --><option name="pathToSceneBuilder" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk" />
    <!-- change here --><option name="myPathToSceneBuilder" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk" />
  </component>
</application>

options.xml

<application>
  <component name="PropertiesComponent">
    <property name="Default.savedEditorTheme" value="_@user_Default" />
    <property name="installed.kotlin.plugin.version" value="1.2.10-release-IJ2017.3-1" />
    <property name="project.wizard.group" value="JavaFX Application" />
    <property name="project.wizard.template" value="JavaFX Application" />
    <!-- change here --><property name="file.chooser.recent.files" value="$USER_HOME$/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Gluon/SceneBuilder.lnk&#10;C:/Program Files/Java/jdk1.8.0_141" />
    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
    <property name="file.gist.reindex.count" value="641" />
    <property name="lastTip" value="3" />
    <property name="settings.code.style.selected.tab.JAVA" value="Tabs and Indents" />
    <property name="FileTemplates.SelectedTemplate" value="HTML File" />
  </component>
</application>

I found where my SceneBuilder exe is located and changed the path in both files.

other.xml

<application>
  <component name="JavaFxSettings">
    <!-- change here --><option name="pathToSceneBuilder" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe" />
    <!-- change here --><option name="myPathToSceneBuilder" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe" />
  </component>
</application>

options.xml

<application>
  <component name="PropertiesComponent">
    <property name="Default.savedEditorTheme" value="_@user_Default" />
    <property name="installed.kotlin.plugin.version" value="1.2.10-release-IJ2017.3-1" />
    <property name="project.wizard.group" value="JavaFX Application" />
    <property name="project.wizard.template" value="JavaFX Application" />
    <!-- change here --><property name="file.chooser.recent.files" value="$USER_HOME$/AppData/Local/SceneBuilder/SceneBuilder.exe&#10;C:/Program Files/Java/jdk1.8.0_141" />
    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
    <property name="file.gist.reindex.count" value="641" />
    <property name="lastTip" value="3" />
    <property name="settings.code.style.selected.tab.JAVA" value="Tabs and Indents" />
    <property name="FileTemplates.SelectedTemplate" value="HTML File" />
  </component>
</application>

Finally, I restarted IntelliJ and right clicked on the FXML file and selected "Open in SceneBuilder" and it worked.



来源:https://stackoverflow.com/questions/48176091/how-to-add-scenebuilder-to-intellij-after-mistakenly-adding-the-scenebuilders-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!