mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javafx: accept static properties from super classes from classes in hierarchy
This commit is contained in:
+6
@@ -53,6 +53,12 @@ public class JavaFXHighlightingTest extends AbstractJavaFXTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testStaticPropertiesCustomLayout() throws Exception {
|
||||
myFixture.addClass("import javafx.scene.layout.GridPane;\n" +
|
||||
"public class MyGridPane extends GridPane {}\n");
|
||||
myFixture.testHighlighting(false, false, false, getTestName(true) + ".fxml");
|
||||
}
|
||||
|
||||
public void testEnumValues() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class JavaFxClassBackedElementDescriptor implements XmlElementDescriptor,
|
||||
if (descr instanceof JavaFxClassBackedElementDescriptor) {
|
||||
final PsiElement element = descr.getDeclaration();
|
||||
if (element instanceof PsiClass) {
|
||||
for (PsiMethod method : ((PsiClass)element).getMethods()) {
|
||||
for (PsiMethod method : ((PsiClass)element).getAllMethods()) {
|
||||
if (method.hasModifierProperty(PsiModifier.STATIC) && method.getName().startsWith("set")) {
|
||||
final PsiParameter[] parameters = method.getParameterList().getParameters();
|
||||
if (parameters.length == 2 && InheritanceUtil.isInheritor(parameters[0].getType(), JavaFxCommonClassNames.JAVAFX_SCENE_NODE)) {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import MyGridPane?>
|
||||
<MyGridPane xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
|
||||
<GridPane.columnIndex>1</GridPane.columnIndex>
|
||||
<Button GridPane.columnIndex="0"/>
|
||||
</MyGridPane>
|
||||
Reference in New Issue
Block a user