TextRange (final CompilerMessage message) { Navigatable navigatable = message.getNavigatable(); if (navigatable instanceof OpenFileDescriptor) { int offset = ((OpenFileDescriptor)navigatable).getOffset(); return new TextRange(offset, offset); } return TextRange.EMPTY_RANGE; }