Bug 233825 - [74cat] JavaFX Javadoc does not work out of the box on Mac
[74cat] JavaFX Javadoc does not work out of the box on Mac
Status: VERIFIED FIXED
Product: javafx
Classification: Unclassified
Component: Platform
7.4
PC Mac OS X
: P3 (vote)
: 8.0
Assigned To: Tomas Zezula
issues@javafx
: ERGONOMICS
: 236999 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-02 08:06 UTC by Petr Jiricka
Modified: 2013-12-21 07:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Attached Javadoc (62.32 KB, image/jpeg)
2013-08-15 08:43 UTC, Roman Svitanic
Details
Screenshot of problem Product Version = NetBeans IDE Dev (Build 201309090001) Operating System = Mac OS X version 10.8.4 running on x86_64 Java; VM; Vendor = 1.7.0_25 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01 (169.28 KB, image/png)
2013-09-12 04:19 UTC, ytn01
Details
IDE log with final logging on per previous comment (55.47 KB, application/octet-stream)
2013-09-16 13:34 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-08-02 08:06:35 UTC
1. Create a new Maven JavaFX application
2. Open MainApp.java and press Ctrl+Space on a JavaFX class, such as javafx.scene.Parent

=> Javadoc is not found for this class. I would expect that it should be linked to http://docs.oracle.com/javafx/2/api/.

The workaround is to use the Attach Javadoc... action and specify the above URL in this dialog.
Comment 1 Roman Svitanic 2013-08-15 08:43:45 UTC
Created attachment 138715 [details]
Attached Javadoc

I have noticed same behavior as described here in builds from last week, but when I have tried today's build, Javadoc for JavaFX was correctly attached and there was no need to attach it manually. Could you please verify it with latest build? Thanks!

Product Version: NetBeans IDE Dev (Build 201308150051)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.5.0-23-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/rsvitanic/.netbeans/dev
Cache directory: /home/rsvitanic/.cache/netbeans/dev
Comment 2 Petr Jiricka 2013-08-15 10:18:59 UTC
No, still does not work correctly for me, using the latest continuous build from the web-main repository:

Product Version: NetBeans IDE Dev (Build web-main-11365-on-20130815)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)

How does it work for you? Does it use the local version (and which location on the filesystem), or the remote version?
Comment 3 Roman Svitanic 2013-08-15 11:59:28 UTC
It uses remote (online) Javadoc http://docs.oracle.com/javafx/2/api/.

Now tested also on build from jet-main repository and working.

Product Version: NetBeans IDE Dev (Build 20130815-aa9e4e2e6d3a)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 4 Lou Dasaro 2013-09-05 07:06:45 UTC
This appears to have been fixed.. Petr, can you check it?

I tested it tonight using:

Product Version: NetBeans IDE Dev (Build 201309040001)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 2.6.32-300.3.1.el6uek.x86_64 running on amd64; UTF-8; en_US (nb)
Comment 5 Petr Jiricka 2013-09-05 08:37:13 UTC
Still does not work. Could this be Mac-specific? The doc window says: "Javadoc not found. Either Javadoc documentation for this item does not exist or there is no attached Javadoc to the JAR file containing this item:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/jfxrt.jar". And the "Show documentation in external web browser" icon in the toolbar of the doc window is grayed out. The project can find the jar file itself (I see jfxrt.jar under the Java Dependencies node), but the documentation is not found.
Comment 6 Lou Dasaro 2013-09-05 18:55:07 UTC
After successful testing on Windows 7 (32 and 64-bit) and two distros of Linux, using 7u25 or 7u40, I am fairly confident this anomaly is specific to Mac.

Indeed requires Internet connection (could this be the problem? Proxy?).

Testing creating a new Maven JavaFX project with the following environment, without network cabling, produces "Javadoc not found" error. Reconnecting the network cable and clicking again produces the Javadoc as expected. Adding to 74cat buglist.

Product Version: NetBeans IDE Dev (Build 201309020001)
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 7 twolf2919 2013-09-11 13:34:58 UTC
In netcat, someone asked whether the problem still occurs on Mac.  I still see it with dev build 20130910 (on Mac OSX 10.8.4, running JDK 1.7u25).  I'm connected to the network.
Comment 8 ytn01 2013-09-12 04:19:47 UTC
Created attachment 139960 [details]
Screenshot of problem

Product Version = NetBeans IDE Dev (Build 201309090001)
Operating System = Mac OS X version 10.8.4 running on x86_64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

No JavaDoc being displayed for classes in a Maven JavaFX project.
Comment 9 Tomas Zezula 2013-09-16 13:05:29 UTC
Works fine on Mac.
The JavaFxDefaultJavadocImpl provides the "http://docs.oracle.com/javafx/2/api/".
This can be verified in the Tools/Java Platform's Javadoc tab containing the "http://docs.oracle.com/javafx/2/api/" URL.


Running the IDE with logging enabled: -J-Dorg.netbeans.api.java.queries.JavadocForBinaryQuery.level=FINE J-Dorg.netbeans.modules.javafx2.platform.JavaFXPlatformJavadoc.level=FINER

FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]: JFBQ.findJavadoc: jar:file:/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/jfxrt.jar!/
FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]:   got no result from org.netbeans.modules.maven.queries.RepositoryForBinaryQueryImpl@61c298f
FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]:   got no result from org.netbeans.modules.java.project.JavadocForBinaryQueryImpl@22ec6e6b
FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]:   got no result from org.netbeans.modules.java.j2seplatform.libraries.JavadocForBinaryQueryLibraryImpl@504544b6
FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]:   got no result from org.netbeans.modules.java.j2seplatform.platformdefinition.JavadocForBinaryQueryPlatformImpl@73a231e5
FINER [org.netbeans.modules.javafx2.platform.JavaFXPlatformJavadoc]: findJavadoc(jar:file:/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/jfxrt.jar!/) took 3ms.
FINER [org.netbeans.modules.javafx2.platform.JavaFXPlatformJavadoc]: getRoots() -> [http://download.oracle.com/javase/7/docs/api/, http://docs.oracle.com/javafx/2/api/] took: 5ms
FINE [org.netbeans.api.java.queries.JavadocForBinaryQuery]:   got result [http://download.oracle.com/javase/7/docs/api/, http://docs.oracle.com/javafx/2/api/] from org.netbeans.modules.javafx2.platform.JavaFXPlatformJavadoc@28470563

The JavaFXPlatformJavadoc returned the result. The Javadoc may be overridden my some module not in java or jfx cluster.


Please run the IDE with -J-Dorg.netbeans.api.java.queries.JavadocForBinaryQuery.level=FINE J-Dorg.netbeans.modules.javafx2.platform.JavaFXPlatformJavadoc.level=FINER and attach the log.
Comment 10 Petr Jiricka 2013-09-16 13:34:22 UTC
Created attachment 140128 [details]
IDE log with final logging on per previous comment
Comment 11 Petr Jiricka 2013-09-16 13:37:58 UTC
I should also add that I don't see "http://docs.oracle.com/javafx/2/api/" under Tools | Java Platforms | Javadoc tab - I only see "http://download.oracle.com/javase/7/docs/api/".
Comment 12 Tomas Zezula 2013-09-16 13:45:40 UTC
The point is that it has to be Maven.  Sorry Petre, I've overlooked it your comment. And it's the key. It works fine in case of Ant project. The problem is that the Maven project does not activate the JFX cluster (features on demand).
Comment 13 Tomas Zezula 2013-09-16 13:46:24 UTC
I've forgot to thank for the logs which showed that the JFX cluster is disabled.
Comment 14 Tomas Zezula 2013-09-16 18:59:07 UTC
Unfortunately the problem is caused by ergonomics.
The problem is that maven is not able to activate jfx as the ergonomics currently can only activate module depending on packaging. However both pure java and JFX have jar packaging -> the jfx is not activated.

The good is that workaround is quite easy, just activate the JFX (New/JavaFX Application, Next, Wait until JFX is active,  Cancel).

There is no general solution how to activate JFX from maven. However at least the project (Maven/JavaFX Application) generated by NetBeans should activate it.
So I added a XPath to do it.
Comment 15 Tomas Zezula 2013-09-17 11:31:10 UTC
Fixed jet-main 19d861b90b8a
However there is nothing like standard for JFX Project in maven.
The fix at least activates the JFX for NetBeans Maven JavaFX Application Project, it will work also for other maven project having javafxpackager executable.
Also when Maven (Java) is already activated the fix will not work so you need empty user dir or activate JFX manually as described above.
Comment 16 Tomas Zezula 2013-10-11 12:58:50 UTC
*** Bug 236999 has been marked as a duplicate of this bug. ***
Comment 17 Lou Dasaro 2013-12-21 07:13:47 UTC
Verified fixed in Dev/8.0.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo