Javafx: Allow to use fx:id of a node in expressions within the same node - test added (IDEA-161627)

This commit is contained in:
Pavel Dolgov
2016-10-06 13:16:30 +03:00
parent 0342bb4dec
commit 0024b81709
3 changed files with 21 additions and 0 deletions
@@ -496,6 +496,11 @@ public class JavaFXHighlightingTest extends AbstractJavaFXTestCase {
doTest();
}
public void testFxIdUsedInSameNode() throws Exception {
myFixture.configureByFiles(getTestName(true) + ".fxml", getTestName(false) + ".java");
doTest();
}
private void doTest() throws Exception {
myFixture.testHighlighting(false, false, false, getTestName(true) + ".fxml");
}
@@ -0,0 +1,7 @@
import javafx.fxml.FXML;
import javafx.scene.layout.HBox;
public class FxIdUsedInSameNode {
@FXML
private HBox navigationPane;
}
@@ -0,0 +1,9 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<GridPane fx:controller="FxIdUsedInSameNode"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
<HBox fx:id="navigationPane" id="navigationPane" managed="${navigationPane.visible}">
<Label text="Hi"/>
</HBox>
</GridPane>