get java language level from the root model when pushers haven't finished yet

This commit is contained in:
peter
2014-05-30 15:26:51 +02:00
parent bd93483946
commit ac9d1e864f
7 changed files with 54 additions and 28 deletions
@@ -24,8 +24,13 @@ import org.jetbrains.annotations.Nullable;
* @author yole
*/
public class LanguageLevelUtil extends EffectiveLanguageLevelUtil {
private LanguageLevelUtil() { }
/**
* @deprecated use {@link com.intellij.psi.impl.JavaPsiImplementationHelper#getEffectiveLanguageLevel(com.intellij.openapi.vfs.VirtualFile)}
* todo remove in IDEA 15
* @param file
* @return
*/
@NotNull
public static LanguageLevel getLanguageLevelForFile(@Nullable VirtualFile file) {
if (file == null) return LanguageLevel.HIGHEST;