IDEADEV-33841: diagnostics

This commit is contained in:
Dmitry Avdeev
2009-01-12 14:45:45 +03:00
parent 09ba8b8e90
commit 49aa39a6be
@@ -168,10 +168,10 @@ public class CompletionData {
final int endIndex = offsetInFile - element.getTextRange().getStartOffset();
final int beginIndex = ref.getRangeInElement().getStartOffset();
if (beginIndex > endIndex) {
LOG.error("Inconsistent reference (found at offset not included in its range): ref=" + ref + " element=" + element);
LOG.error("Inconsistent reference (found at offset not included in its range): ref=" + ref + " element=" + element + " text=" + element.getText());
}
if (beginIndex < 0) {
LOG.error("Inconsistent reference (begin < 0): ref=" + ref + " element=" + element + "; begin=" + beginIndex);
LOG.error("Inconsistent reference (begin < 0): ref=" + ref + " element=" + element + "; begin=" + beginIndex + " text=" + element.getText());
}
LOG.assertTrue(endIndex >= 0);
return element.getText().substring(beginIndex, endIndex);