mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-42837: replace documents committing with assertion
This commit is contained in:
@@ -1983,7 +1983,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
if (file != null) {
|
||||
int offset = editor.getCaretModel().getOffset();
|
||||
PsiDocumentManager manager = PsiDocumentManager.getInstance(getProject());
|
||||
if (manager.hasUncommitedDocuments()) manager.commitAllDocuments();
|
||||
LOG.assertTrue(manager.isCommitted(editor.getDocument()));
|
||||
PsiElement element = file.findElementAt(offset);
|
||||
if (element != null) return element;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user