javafx: simple true/false suggestions

(cherry picked from commit 17c51885eda041514949ead8ad5abd79710d6692)
This commit is contained in:
anna
2013-03-26 21:43:13 +01:00
parent 28a16d8d8b
commit 65a7d7eddf
3 changed files with 10 additions and 0 deletions
@@ -153,6 +153,12 @@ public class JavaFxCompletionTest extends LightFixtureCompletionTestCase {
assertDoesntContain(myFixture.getLookupElementStrings(), "Infinity");
}
public void testBooleanValues() 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();
@@ -83,6 +83,8 @@ public class JavaFxPropertyAttributeDescriptor implements XmlAttributeDescriptor
final String propertyQName = getBoxedPropertyType(getDeclaration());
if (CommonClassNames.JAVA_LANG_FLOAT.equals(propertyQName) || CommonClassNames.JAVA_LANG_DOUBLE.equals(propertyQName)) {
return new String[] {"Infinity", "-Infinity", "NaN", "-NaN"};
} else if (CommonClassNames.JAVA_LANG_BOOLEAN.equals(propertyQName)) {
return new String[] {"true", "false"};
}
return ArrayUtil.EMPTY_STRING_ARRAY;
@@ -0,0 +1,2 @@
<?import javafx.scene.layout.GridPane?>
<GridPane xmlns:fx="http://javafx.com/fxml" focusTraversable="<caret>"/>