Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 434269

Summary: [1.8][hovering] Support showing Javadoc for JavaFX properties - Take 2
Product: [Eclipse Project] JDT Reporter: Thomas Schindl <tom.schindl>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: manju656, markus.kell.r, noopur_gupta
Version: 4.4Flags: noopur_gupta: review+
Target Milestone: 4.4 RC1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
patch 2
none
patch 3
none
patch 4 none

Description Thomas Schindl CLA 2014-05-06 18:12:38 EDT
In bug 424283 we have added support to copy the JavaDoc from a private field unfortunately the JavaFX people are not consistent on where they put it - looking at BorderPane#center the documentation is on the BorderPane#centerProperty

I guess this is too late to get into Luna SR0?
Comment 1 Thomas Schindl CLA 2014-05-06 18:43:56 EDT
Created attachment 242776 [details]
patch
Comment 2 Thomas Schindl CLA 2014-05-07 02:11:55 EDT
Created attachment 242778 [details]
patch 2
Comment 3 Thomas Schindl CLA 2014-05-07 02:17:55 EDT
Created attachment 242779 [details]
patch 3

a) if get/set delegate to the property javadoc
b) in case there's no javadoc there
c) look up the documentation from the field
Comment 4 Markus Keller CLA 2014-05-07 13:29:57 EDT
Created attachment 242811 [details]
patch 4

Please format your code properly.

There was a JavaModelException if the property method doesn't exist. Needs the same exists() test as in the old code.

There was also an old IndexOutOfBoundsException for methods called "get" or "set".

Support for isXXX() boolean getters like javafx.scene.LightBase#isLightOn() was also missing.

Fixed all these problems. Noopur, please review.
Comment 5 Thomas Schindl CLA 2014-05-07 16:41:05 EDT
Thanks Markus!
Comment 6 Noopur Gupta CLA 2014-05-08 05:44:15 EDT
The patch looks good.
However, if the property method doesn't exist and the javadoc is present on the field, we are not showing the javadoc on getter / setter now. Is this expected?
Comment 7 Thomas Schindl CLA 2014-05-08 05:52:52 EDT
You are right but I think we can omit this case because then by definition this is not a JavaFX-Bean construct but I'm fine if this case is handled as well - who knows what strange things the FX-People come up
Comment 8 Markus Keller CLA 2014-05-08 09:48:48 EDT
(In reply to Noopur Gupta from comment #6)

You mean this example, where the hover on get/setValue(..) doesn't show the mumbo jumbo any more? That's good, since "javadoc.exe -javafx ..." also doesn't seem to do anything special in this case.

class Bean {
	/**
	 * Valuable Javadoc for the 'value' bean property mumbo jumbo... Really!
	 */
	private int value;

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}
}

Released patch 4 with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=3e661e86cb9219c06a92919dcd1dc1d3c275c2f3
Comment 9 Martin Mathew CLA 2014-05-19 03:38:50 EDT
Verified using Build id: I20140515-1230.