mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Cleanup (misc. deprecated API dropped from *-api modules)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,29 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.module;
|
||||
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class LanguageLevelUtil extends EffectiveLanguageLevelUtil {
|
||||
/**
|
||||
* @deprecated use JavaPsiImplementationHelper#getEffectiveLanguageLevel(com.intellij.openapi.vfs.VirtualFile)
|
||||
* todo remove in IDEA 15
|
||||
*/
|
||||
@SuppressWarnings({"deprecation", "UnusedDeclaration"})
|
||||
@NotNull
|
||||
public static LanguageLevel getLanguageLevelForFile(@Nullable VirtualFile file) {
|
||||
if (file == null) return LanguageLevel.HIGHEST;
|
||||
|
||||
if (file.isDirectory()) {
|
||||
LanguageLevel languageLevel = file.getUserData(LanguageLevel.KEY);
|
||||
return languageLevel != null ? languageLevel : LanguageLevel.HIGHEST;
|
||||
}
|
||||
|
||||
return getLanguageLevelForFile(file.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user