Revert changes from dd47711336

GitOrigin-RevId: ce29699881eb963342b5babb77e42df3d3db7a85
This commit is contained in:
Andrey.Cherkasov
2022-02-08 01:01:40 +00:00
committed by intellij-monorepo-bot
parent 90682006a6
commit c32ee0edf2
@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi.impl;
import com.intellij.AppTopics;
@@ -66,11 +66,12 @@ public final class PsiDocumentManagerImpl extends PsiDocumentManagerBase {
final VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document);
if (virtualFile != null && virtualFile.isValid()) {
Collection<Project> projects = ProjectLocator.getInstance().getProjectsForFile(virtualFile);
if (!projects.isEmpty() && !projects.contains(myProject)) {
LOG.error("Trying to get PSI for an alien project. VirtualFile=" + virtualFile +
";\n myProject=" + myProject +
";\n projects returned: " + projects);
}
LOG.assertTrue(projects.isEmpty() || projects.contains(myProject), "Trying to get PSI for an alien project. VirtualFile=" +
virtualFile +
";\n myProject=" +
myProject +
";\n projects returned: " +
projects);
}
}
return psiFile;