javafx mock replaced with jar from the jdk on which tests are run

This commit is contained in:
Anna Kozlova
2016-03-10 09:08:15 +01:00
parent 0108018028
commit 245548a97a
5 changed files with 5 additions and 5 deletions
@@ -46,7 +46,7 @@ public abstract class AbstractJavaFXTestCase extends LightCodeInsightFixtureTest
}
public static void addJavaFxJarAsLibrary(@NotNull Module module, @Nullable ModifiableRootModel model) {
final String libPath = PluginPathManager.getPluginHomePath("javaFX") + "/testData"; //System.getProperty("java.home") + File.separator + "lib" + File.separator + "ext";
final String libPath = System.getProperty("java.home") + File.separator + "lib" + File.separator + "ext";
if (model != null) {
PsiTestUtil.addLibrary(module, model, "javafx", libPath, "jfxrt.jar");
}
@@ -369,7 +369,7 @@ public class JavaFxClassBackedElementDescriptor implements XmlElementDescriptor,
PsiClass aClass = myPsiClass;
final XmlAttribute constAttr = context.getAttribute(FxmlConstants.FX_CONSTANT);
if (constAttr != null && aClass != null) {
final PsiField constField = aClass.findFieldByName(constAttr.getValue(), false);
final PsiField constField = aClass.findFieldByName(constAttr.getValue(), true);
if (constField != null) {
aClass = PsiUtil.resolveClassInType(constField.getType());
}
@@ -110,8 +110,8 @@ public class JavaFxPropertyAttributeDescriptor extends BasicXmlAttributeDescript
public PsiElement getEnumeratedValueDeclaration(XmlElement xmlElement, String value) {
final PsiClass aClass = getEnum();
if (aClass != null) {
final PsiField fieldByName = aClass.findFieldByName(value, false);
return fieldByName != null ? fieldByName : aClass.findFieldByName(value.toUpperCase(), false);
final PsiField fieldByName = aClass.findFieldByName(value, true);
return fieldByName != null ? fieldByName : aClass.findFieldByName(value.toUpperCase(), true);
}
return xmlElement;
}
@@ -1,6 +1,6 @@
<?import javafx.scene.layout.AnchorPane?>
<?import java.lang.String?>
<AnchorPane id="AnchorPane" xmlns:fx="http://javafx.com/fxml" stylesheets="<error descr="Cannot resolve file 'mystyle.css'">mystyle.css</error>" <error descr="Property 'backgroundFills' is read-only">backgroundFills=""</error>>
<AnchorPane id="AnchorPane" xmlns:fx="http://javafx.com/fxml" stylesheets="<error descr="Cannot resolve file 'mystyle.css'">mystyle.css</error>" <error descr="Attribute backgroundFills is not allowed here">backgroundFills</error>="">
<stylesheets>
<String fx:value="<error descr="Cannot resolve file 'mystyle.css'">mystyle.css</error>"/>
</stylesheets>
Binary file not shown.