From c5adb0d74ec4bfecd6a1ece0f7dfee521945358d Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 14 Apr 2011 00:30:19 +0200 Subject: [PATCH] some logging for mysteriously failing tests --- .../util/xml/impl/FileDescriptionCachedValueProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xml/dom-impl/src/com/intellij/util/xml/impl/FileDescriptionCachedValueProvider.java b/xml/dom-impl/src/com/intellij/util/xml/impl/FileDescriptionCachedValueProvider.java index 8a1f6cf54cf2..bc6b082c39be 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/impl/FileDescriptionCachedValueProvider.java +++ b/xml/dom-impl/src/com/intellij/util/xml/impl/FileDescriptionCachedValueProvider.java @@ -15,6 +15,7 @@ */ package com.intellij.util.xml.impl; +import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.module.Module; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Key; @@ -68,7 +69,11 @@ class FileDescriptionCachedValueProvider implements SemEle public final DomFileElementImpl getFileElement() { if (myComputed) return myLastResult; - DomFileElementImpl result = _computeFileElement(false, getRootTag(), null); + final StringBuilder log = ApplicationManager.getApplication().isUnitTestMode() ? new StringBuilder() : null; + DomFileElementImpl result = _computeFileElement(false, getRootTag(), log); + if (log != null && result == null) { + System.out.println(log); + } synchronized (myCondition) { if (myComputed) return myLastResult;