mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-95434 - assert: LanguageConsoleImpl$Helper.getDocument
Trace virtual file properties in order to investigate the assertion failure more closely.
This commit is contained in:
@@ -541,7 +541,10 @@ public class LanguageConsoleImpl extends ConsoleViewImpl implements LanguageCons
|
||||
public Document getDocument() {
|
||||
Document document = FileDocumentManager.getInstance().getDocument(virtualFile);
|
||||
if (document == null) {
|
||||
throw new AssertionError("no document for: " + virtualFile);
|
||||
Language language = (virtualFile instanceof LightVirtualFile) ? ((LightVirtualFile)virtualFile).getLanguage() : null;
|
||||
throw new AssertionError(String.format("no document for: %s (fileType: %s, language: %s, length: %s, valid: %s)",
|
||||
virtualFile,
|
||||
virtualFile.getFileType(), language, virtualFile.getLength(), virtualFile.isValid()));
|
||||
}
|
||||
return document;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user