JavaFX JavaDoc and IDEs
Kevin Rushforth
kevin.rushforth at oracle.com
Tue Dec 17 14:48:53 PST 2013
That's basically what the doclet does. Here is the JDK JIRA for this
(first introduced in 7u6...I hadn't remembered it was that early):
https://bugs.openjdk.java.net/browse/JDK-7112427
And here is the JDK 8 changeset that implements it:
http://hg.openjdk.java.net/jdk8/jdk8/langtools/rev/ccbe7ffdd867
-- Kevin
Tom Schindl wrote:
> So you say the IDEs must learn that when they encounter a method which
> has no JavaDoc to search for the property definition and show that one?
>
> Tom
>
> On 17.12.13 23:12, Kevin Rushforth wrote:
>
>> Actually, the JDK 8 doclet that handles this automatically. They added
>> support for FX-style properties, among other things, in JDK 8 so we no
>> longer have a custom doclet for FX.
>>
>> -- Kevin
>>
>>
>> Tom Schindl wrote:
>>
>>> Hi,
>>>
>>> I can't speak for Netbeans and IntelliJ but now that JavaFX ships the
>>> source with the JDK and Eclipse recgonizes this there's a "small"
>>> problem with the way JavaFX is using JavaDoc.
>>>
>>> Take for example Window#onCloseRequest
>>>
>>>
>>>
>>>> /**
>>>> * Called when there is an external request to close this {@code Window}.
>>>> * The installed event handler can prevent window closing by consuming the
>>>> * received event.
>>>> */
>>>> private ObjectProperty<EventHandler<WindowEvent>> onCloseRequest;
>>>> public final void setOnCloseRequest(EventHandler<WindowEvent> value) {
>>>> onCloseRequestProperty().set(value);
>>>> }
>>>> public final EventHandler<WindowEvent> getOnCloseRequest() {
>>>> return (onCloseRequest != null) ? onCloseRequest.get() : null;
>>>> }
>>>> public final ObjectProperty<EventHandler<WindowEvent>>
>>>> onCloseRequestProperty() {
>>>>
>>>>
>>> You'll notice that the documentation is only made on the property but
>>> not on the real API methods.
>>>
>>> I guess the build process copies the documentation somehow at the right
>>> position when generating the doc (see
>>> http://docs.oracle.com/javafx/2/api/javafx/stage/Window.html#setOnCloseRequest%28javafx.event.EventHandler%29)
>>> which doesn't help people with an (Eclipse)IDE which takes the source
>>> code as the authority and presents an empty JavaDoc window :-(
>>>
>>> This is a major feature loss!
>>>
>>> Tom
>>>
>>>
>
>
More information about the openjfx-dev
mailing list