From c7304c6bf9892e0a1cf03411be4850f4c97da7cb Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 22 Oct 2013 18:04:01 +0200 Subject: [PATCH] cleanup --- .../descriptors/JavaFxClassBackedElementDescriptor.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassBackedElementDescriptor.java b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassBackedElementDescriptor.java index 723cae673715..3f2f0344049c 100644 --- a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassBackedElementDescriptor.java +++ b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassBackedElementDescriptor.java @@ -7,7 +7,6 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; -import com.intellij.psi.impl.source.xml.XmlAttributeImpl; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.util.*; import com.intellij.psi.xml.XmlAttribute; @@ -124,14 +123,13 @@ public class JavaFxClassBackedElementDescriptor implements XmlElementDescriptor, } private static void collectParentStaticProperties(XmlTag context, List children, Function factory) { - final CachedValuesManager manager = context != null ? CachedValuesManager.getManager(context.getProject()) : null; XmlTag tag = context; while (tag != null) { final XmlElementDescriptor descr = tag.getDescriptor(); if (descr instanceof JavaFxClassBackedElementDescriptor) { final PsiElement element = descr.getDeclaration(); if (element instanceof PsiClass) { - final List setters = manager.getCachedValue(element, new CachedValueProvider>() { + final List setters = CachedValuesManager.getCachedValue(element, new CachedValueProvider>() { @Nullable @Override public Result> compute() { @@ -238,7 +236,7 @@ public class JavaFxClassBackedElementDescriptor implements XmlElementDescriptor, private void collectProperties(final List children, final Function factory, final boolean acceptPrimitive) { final List fieldList = - CachedValuesManager.getManager(myPsiClass.getProject()).getCachedValue(myPsiClass, new CachedValueProvider>() { + CachedValuesManager.getCachedValue(myPsiClass, new CachedValueProvider>() { @Nullable @Override public Result> compute() { @@ -368,7 +366,7 @@ public class JavaFxClassBackedElementDescriptor implements XmlElementDescriptor, if (parentTag != null) { final XmlAttribute attribute = context.getAttribute(FxmlConstants.FX_CONTROLLER); if (attribute != null) { - host.addMessage(((XmlAttributeImpl)attribute).getNameElement(), "fx:controller can only be applied to root element", ValidationHost.ErrorType.ERROR); //todo add delete/move to upper tag fix + host.addMessage(attribute.getNameElement(), "fx:controller can only be applied to root element", ValidationHost.ErrorType.ERROR); //todo add delete/move to upper tag fix } } PsiClass aClass = myPsiClass;