From 0024b817094208eb775de998d6fba21fbcf3cbe3 Mon Sep 17 00:00:00 2001 From: Pavel Dolgov Date: Thu, 6 Oct 2016 13:16:07 +0300 Subject: [PATCH] Javafx: Allow to use fx:id of a node in expressions within the same node - test added (IDEA-161627) --- .../plugins/javaFX/fxml/JavaFXHighlightingTest.java | 5 +++++ .../javaFX/testData/highlighting/FxIdUsedInSameNode.java | 7 +++++++ .../javaFX/testData/highlighting/fxIdUsedInSameNode.fxml | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java create mode 100644 plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java index b4123606a8da..4cc51f704f16 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXHighlightingTest.java @@ -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"); } diff --git a/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java b/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java new file mode 100644 index 000000000000..4b90a9dbea2f --- /dev/null +++ b/plugins/javaFX/testData/highlighting/FxIdUsedInSameNode.java @@ -0,0 +1,7 @@ +import javafx.fxml.FXML; +import javafx.scene.layout.HBox; + +public class FxIdUsedInSameNode { + @FXML + private HBox navigationPane; +} \ No newline at end of file diff --git a/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml b/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml new file mode 100644 index 000000000000..b34ac49a9871 --- /dev/null +++ b/plugins/javaFX/testData/highlighting/fxIdUsedInSameNode.fxml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file