do trace if explicitly enabled

This commit is contained in:
Maxim.Mossienko
2014-10-15 16:06:53 +02:00
parent b61911832c
commit 681d3f0202
@@ -96,10 +96,12 @@ public class TagNameReference implements PsiReference {
final XmlTag tag = getTagElement();
final XmlElementDescriptor descriptor = tag != null ? tag.getDescriptor():null;
LOG.debug("Descriptor for tag " +
(tag != null ? tag.getName() : "NULL") +
" is " +
(descriptor != null ? (descriptor.toString() + ": " + descriptor.getClass().getCanonicalName()) : "NULL"));
if (LOG.isDebugEnabled()) {
LOG.debug("Descriptor for tag " +
(tag != null ? tag.getName() : "NULL") +
" is " +
(descriptor != null ? (descriptor.toString() + ": " + descriptor.getClass().getCanonicalName()) : "NULL"));
}
if (descriptor != null){
return descriptor instanceof AnyXmlElementDescriptor ? tag : descriptor.getDeclaration();