netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Adding JavaFX sources to Ant Library

Open trashgod opened this issue 1 year ago • 1 comments
trafficstars

Apache NetBeans version

Apache NetBeans 23

What happened

Problem: After creating a Library for JavaFX as shown in JavaFX and NetBeans: Non-modular projects: IDE and adding src.zip to the "Sources" pane of the Ant Library Manager, navigating to a source file produces a disassembled listing, as from javap -c, and the source is not available for debugging. A Maven project with downloaded sources works as expected

Mitigation: Because the Add URL… button is disabled, editing the corresponding library XML manually to use a jar URL for each module, as shown here, restores the expected navigation and debugging functionality.

<resource>jar:file:/…/lib/javafx-sdk-21.0.4/src.zip!/javafx.base/</resource>
<resource>jar:file:/…/lib/javafx-sdk-21.0.4/src.zip!/javafx.controls/</resource>
…

Language / Project Type / NetBeans Component

Java with Ant Library, Java Application

How to reproduce

  1. Download a JavaFX SDK from here; the problem may reproduced with any of several iterations of versions 21 or 17.
  2. Create a project and shown in JavaFX and NetBeans: Non-modular projects: IDE.
  3. Add the src.zip file to the "Sources" pane of the Ant Library Manager for the Library created in the previous step.
  4. Open any JavaFX program and attempt to navigate to any source class.

Did this work correctly in an earlier version?

No / Don't know

Operating System

MacOS Intel

JDK

java version "21.0.4" 2024-07-16 LTS

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

As Maven works correctly, Ant source access is a low priority issue that is easily mitigated.

Are you willing to submit a pull request?

No

trashgod avatar Oct 18 '24 23:10 trashgod

Issue confirmed with javafx-sdk-21.0.5. Please consider adding JavaFX label.

trashgod avatar Oct 19 '24 12:10 trashgod

@trashgod could you please check whether #7932 fixes the issue for you? A nightly build is available from the Checkspage or directly. Thank you.

matthiasblaesing avatar Nov 02 '24 10:11 matthiasblaesing

@matthiasblaesing: Thank you for looking at this issue. Yes, #7932 works as expected, both

  1. Via import from the previous version on initial startup, and
  2. Via the Add URL… button of the "Sources" pane.

trashgod avatar Nov 02 '24 19:11 trashgod

@trashgod thanks for testing!

matthiasblaesing avatar Nov 02 '24 21:11 matthiasblaesing

Lets reopen until the fix is merged to master.

matthiasblaesing avatar Nov 03 '24 07:11 matthiasblaesing