javafx: accept any root tag type (e.g. to be included in another page, @see DataAppClient)

(cherry picked from commit 55c9a8ad8675f841b23485f4ea139d87702e05de)
This commit is contained in:
anna
2013-03-21 10:40:46 +01:00
parent 08d434f161
commit dd4bd46bd8
3 changed files with 10 additions and 6 deletions
@@ -65,6 +65,10 @@ public class JavaFXHighlightingTest extends LightCodeInsightFixtureTestCase {
doTest();
}
public void testRootTagCoercedUnchecked() throws Exception {
doTest();
}
public void testStaticProperties() throws Exception {
doTest();
}
@@ -436,13 +436,10 @@ public class JavaFxPsiUtil {
}
public static String isClassAcceptable(@Nullable XmlTag parentTag, final PsiClass aClass) {
if (parentTag == null) {
return null;
}
if (aClass != null && aClass.isValid()) {
if (parentTag == null) {
if (!InheritanceUtil.isInheritor(aClass, false, JavaFxCommonClassNames.JAVAFX_SCENE_NODE)) {
return unableToCoerceMessage(aClass, JavaFxCommonClassNames.JAVAFX_SCENE_NODE);
}
return null;
}
final XmlElementDescriptor descriptor = parentTag.getDescriptor();
if (descriptor instanceof JavaFxPropertyElementDescriptor) {
final PsiElement declaration = descriptor.getDeclaration();
@@ -0,0 +1,3 @@
<?import javafx.scene.control.*?>
<Tab text="Tab Title" xmlns:fx="http://javafx.com/fxml"/>