diff --git a/xml/impl/src/com/intellij/codeInsight/hint/api/impls/XmlParameterInfoHandler.java b/xml/impl/src/com/intellij/codeInsight/hint/api/impls/XmlParameterInfoHandler.java index f5cb164cc0c6..d7eb845a5789 100644 --- a/xml/impl/src/com/intellij/codeInsight/hint/api/impls/XmlParameterInfoHandler.java +++ b/xml/impl/src/com/intellij/codeInsight/hint/api/impls/XmlParameterInfoHandler.java @@ -26,6 +26,7 @@ import com.intellij.psi.xml.XmlFile; import com.intellij.psi.xml.XmlTag; import com.intellij.psi.xml.XmlToken; import com.intellij.psi.xml.XmlTokenType; +import com.intellij.util.Function; import com.intellij.xml.XmlAttributeDescriptor; import com.intellij.xml.XmlElementDescriptor; import com.intellij.lang.parameterInfo.*; @@ -60,7 +61,7 @@ public class XmlParameterInfoHandler implements ParameterInfoHandler() { + final XmlTag parameterOwner = (XmlTag)context.getParameterOwner(); + + public Boolean fun(String s) { + return parameterOwner != null ? parameterOwner.getAttributeValue(s) != null:false; + } + }); } - private static void updateElementDescriptor(XmlElementDescriptor descriptor, ParameterInfoUIContext context) { + public static void updateElementDescriptor(XmlElementDescriptor descriptor, ParameterInfoUIContext context, + Function attributePresentFun) { final XmlAttributeDescriptor[] attributes = descriptor != null ? getSortedDescriptors(descriptor) : XmlAttributeDescriptor.EMPTY; StringBuffer buffer = new StringBuffer(); @@ -167,10 +178,8 @@ public class XmlParameterInfoHandler implements ParameterInfoHandler