mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javafx: allow include tags inside define (IDEA-103324)
(cherry picked from commit b7ed509)
This commit is contained in:
+10
@@ -209,6 +209,16 @@ public class JavaFXHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
doDoTest(false, false);
|
||||
}
|
||||
|
||||
public void testWrongBindingType() throws Exception {
|
||||
configureByFiles(null, getTestName(true) + ".fxml", getTestName(false) + ".java");
|
||||
doDoTest(false, false);
|
||||
}
|
||||
|
||||
public void testAllowIncludeTagInsideDefine() throws Exception {
|
||||
configureByFiles(null, getTestName(true) + ".fxml", "btn.fxml");
|
||||
doDoTest(false, false);
|
||||
}
|
||||
|
||||
public void testValueOfAcceptance() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
+3
@@ -68,6 +68,9 @@ public class JavaFxDefaultPropertyElementDescriptor implements XmlElementDescrip
|
||||
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) {
|
||||
final String name = childTag.getName();
|
||||
if (myName.equals(FxmlConstants.FX_DEFINE)) {
|
||||
if (name.equals(FxmlConstants.FX_INCLUDE)) {
|
||||
return new JavaFxDefaultPropertyElementDescriptor(name, childTag);
|
||||
}
|
||||
return new JavaFxClassBackedElementDescriptor(name, childTag);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
|
||||
<AnchorPane xmlns:fx="http://javafx.com/fxml">
|
||||
<fx:define>
|
||||
<fx:include source="btn.fxml"/>
|
||||
<fx:include source="<error descr="Cannot resolve file 'btn1.fxml'">btn1.fxml</error>"/>
|
||||
</fx:define>
|
||||
</AnchorPane>
|
||||
Reference in New Issue
Block a user