mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not calculate language level for default project
This commit is contained in:
@@ -131,6 +131,11 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
|
||||
public LanguageLevel getEffectiveLanguageLevel(@Nullable VirtualFile virtualFile) {
|
||||
if (virtualFile == null) return PsiUtil.getLanguageLevel(myProject);
|
||||
|
||||
// For default project, do not look into virtual file system.
|
||||
// It is important for Upsource, where operations are done in default project to
|
||||
// prevent expensive look-up into VFS
|
||||
if (myProject.isDefault()) return PsiUtil.getLanguageLevel(myProject);
|
||||
|
||||
final VirtualFile folder = virtualFile.getParent();
|
||||
if (folder != null) {
|
||||
final LanguageLevel level = folder.getUserData(LanguageLevel.KEY);
|
||||
|
||||
Reference in New Issue
Block a user