CharSequence () { VirtualFile virtualFile = getVirtualFile(); if (virtualFile instanceof LightVirtualFile) { Document doc = getCachedDocument(); if (doc != null) return getLastCommittedText(doc); return ((LightVirtualFile)virtualFile).getContent(); } Document document = getDocument(); if (document == null) { return LoadTextUtil.loadText(virtualFile); } return getLastCommittedText(document); }