This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE Dev (Build 201210290001) Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b11 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) 'fx:id' and all other attributes in 'fx:include' other than 'source' are marked as unexpected. Does the editor examine the source to determine a list of possible attributes? If no and doesn't plant to do so, then it shouldn't show any of these hints.
You mean to examine the included source, whether an attribute corresponds to some property on the included object ?
To avoid the error hints for valid attributes, I was thinking that checking which class is the root element of the included source would be enough. Then make the list of available attributes for that class also available on the 'fx:include' element. Same property can be set both in source and on 'fx:include' element and I believe in such case only relation between them is that the value from the source is overridden by the value on 'fx:include', but that's a different problem... Should I attach some examples of what I mean?
no ;) you clarified the issue enough. I'd be a little careful to crawl along fx:includes - I have no support (yet) to limit the include resolution to just 1 level and I'd like to avoid performance issues going through whole fx:include closure. For now, I just disable the check for attributes outside fx: namespace.
Changeset: 4463cd073a28 Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-10-29 14:12 Message: Added support for fx:id and potentially additional attributes
Integrated into 'main-golden', will be available in build *201210310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4463cd073a28 User: Svata Dedic <sdedic@netbeans.org> Log: Issue #221015 - Attributes in fx:include element: fixed Added support for fx:id and potentially additional attributes
The list of valid attributes on fx:include element now seems to be enhanced/restricted to what is available on the root element - the root of the document which contains the fx:include element to be clear. Since the source for given fx:include can be any kind of Node (or Tab), there will still be improper error hints. Example: MyCheck.fxml <?import javafx.scene.control.*?> <CheckBox text="Tick It"/> Page.fxml <?import javafx.scene.layout.*?> <FlowPane xmlns:fx="http://javafx.com/fxml"> <children> <fx:include fx:id="mcDefault" source="MyCheck.fxml"/> <fx:include fx:id="mcTicked" source="MyCheck.fxml" selected="true"/> </children> </FlowPane> 'selected' is CheckBox specific property and is marked with error hint that FlowPane doesn't support it
My bad; I altered hierarchy for the FxInclude model, and forgot to change model tree visitor support accordingly.
Changeset: 19e5006c8a75 Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-10-31 13:10 Message: Included bean is processed as instance.
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/19e5006c8a75 User: Svata Dedic <sdedic@netbeans.org> Log: Issue #221015 - Attributes in fx:include element: fixed Included bean is processed as instance.