mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javafx: provide primitive completion for underlying non-static setters
This commit is contained in:
+6
@@ -159,6 +159,12 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
|
||||
assertContainsElements(myFixture.getLookupElementStrings(), "true", "false");
|
||||
}
|
||||
|
||||
public void testBooleanValuesNonStatic() throws Exception {
|
||||
myFixture.configureByFiles(getTestName(true) + ".fxml");
|
||||
complete();
|
||||
assertContainsElements(myFixture.getLookupElementStrings(), "true", "false");
|
||||
}
|
||||
|
||||
public void testDefaultPropertyIncludeOnce() throws Exception {
|
||||
myFixture.configureByFiles(getTestName(true) + ".fxml");
|
||||
myItems = myFixture.completeBasic();
|
||||
|
||||
+3
-2
@@ -178,8 +178,9 @@ public class JavaFxPropertyAttributeDescriptor implements XmlAttributeDescriptor
|
||||
attrType = JavaFxPsiUtil.getWrappedPropertyType((PsiField)declaration, declaration.getProject(), JavaFxCommonClassNames.ourWritableMap);
|
||||
} else if (declaration instanceof PsiMethod) {
|
||||
final PsiParameter[] parameters = ((PsiMethod)declaration).getParameterList().getParameters();
|
||||
if (parameters.length == 2) {
|
||||
attrType = parameters[1].getType();
|
||||
final boolean isStatic = ((PsiMethod)declaration).hasModifierProperty(PsiModifier.STATIC);
|
||||
if (isStatic && parameters.length == 2 || !isStatic && parameters.length == 1) {
|
||||
attrType = parameters[parameters.length - 1].getType();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<GridPane xmlns:fx="http://javafx.com/fxml" disable="<caret>"/>
|
||||
Reference in New Issue
Block a user