JavaFX源代码没有显示

编程入门 行业动态 更新时间:2024-10-25 19:20:38
本文介绍了JavaFX源代码没有显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我从 http://hg.openjdk下载了JavaFx源代码.java / openjfx / 2.2 / master / rt / summary 。

zip文件中文件夹的名称是 re-e71070b0e0c0 。

The name of the folder in the zip file is re-e71070b0e0c0.

我解压缩了这个并在Idea中添加了项目结构 - 全局库下的文件夹,但它不起作用。当我尝试打开一个类时,它只显示字段名称和 / *编译代码* / 。我在手册中找不到任何内容。

I unzipped this and added the folder under Project Structure - Global Libraries in Idea, however it doesn't work. When I try to open a class it just shows field names and /* compiled code */. I couldn't find anything in the manual.

推荐答案

这些指令仅对JavaFX 2.x分支是必需的,并且在JDK 8发布后将被废弃。

下载源zip并解压后,打开Idea并按照以下说明操作:

After you have downloaded the source zip and extracted it, open Idea and follow these instructions:

  • 修改1.7 SDK的源结构:

  • Modify the source structure for your 1.7 SDK:

    文件|项目结构| SDKs | Sourcepath

    对于解压缩的zip中的每个子项目,输入 Alt + Insert 并添加相应的源目录。例如 rt-e71070b0e0c0 \ _javafx-ui-charts \ src , rt-e71070b0e0c0 \ javafx-ui-common\src 等。并非所有JavaFX 2.x源代码目前都是开源的,所以这只会添加开源部分。

    For each sub-project in the extracted zip, type Alt+Insert and add the respective source directory. For example rt-e71070b0e0c0\javafx-ui-charts\src, rt-e71070b0e0c0\javafx-ui-common\src, etc. Not all JavaFX 2.x source code is currently open sourced, so this will only add the open sourced portions.

    设置文档查找路径:

    文件|项目结构| SDKs |文档路径

    为文档指定URL Alt + S :docs.oracle/javafx/2/api/

    Specify a url Alt+S for the documentation: docs.oracle/javafx/2/api/

    在JavaFX应用程序源代码中,将光标放在JavaFX类用法上,例如LineChart:

    In your JavaFX application source, place your cursor over a JavaFX class usage, for instance LineChart:

  • 按 Ctrl + B 从您下载的zip中打开源代码文件LineChart.java。
  • 按 Shift + F1 在浏览器中打开LineChart上的文档。
  • 按 Ctrl + Q 可快速访问IDE中的文档。
  • Press Ctrl+B to open the source code file LineChart.java from your downloaded zip.
  • Press Shift+F1 to open documentation on the LineChart in a browser.
  • Press Ctrl+Q to get quick access to documentation from in the IDE.
  • 2013年10月16日更新

    JDK 8 现在包含JavaFX源文件。

    JDK 8 now includes JavaFX source files.

    告诉Idea JavaFX源的位置:

    To tell Idea where JavaFX sources are:

  • 修改1.8 SDK的源结构:

  • Modify the source structure for your 1.8 SDK:

    文件|项目结构| SDKs | Sourcepath

    按 Alt + S 添加文件 javafx-src.zip ,它位于JDK 8发行版的根目录中。

    Press Alt+S to add the file javafx-src.zip, which is located in the root directory of the JDK 8 distribution.

    设置文档查找路径:

    文件|项目结构| SDKs |文档路径

    为文档指定URL Alt + S :download.java/jdk8/jfxdocs 。

    Specify a url Alt+S for the documentation: download.java/jdk8/jfxdocs.

    JDK 8 JavaFX文档网址当JDK 8达到一般可用性发布阶段时,可能会发生变化。

    The JDK 8 JavaFX documentation url will likely change when JDK 8 reaches General Availability release stage.

    上面的步骤3提供了快速访问JavaFX的键盘快捷键来自项目的资源和文档。

    Step 3 above provides keyboard shortcuts to quickly access the JavaFX sources and documentation from your project.

  • 更多推荐

    JavaFX源代码没有显示

    本文发布于:2023-05-31 22:05:51,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/400236.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:源代码   JavaFX

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!