use of com.intellij.openapi.roots.LanguageLevelProjectExtension in project intellij-community by JetBrains.
the class IntroduceParameterObjectTest method testTypeParametersWithSubstitution.
public void testTypeParametersWithSubstitution() throws Exception {
final LanguageLevelProjectExtension projectExtension = LanguageLevelProjectExtension.getInstance(getProject());
final LanguageLevel oldLevel = projectExtension.getLanguageLevel();
try {
projectExtension.setLanguageLevel(LanguageLevel.HIGHEST);
doTest();
} finally {
projectExtension.setLanguageLevel(oldLevel);
}
}
use of com.intellij.openapi.roots.LanguageLevelProjectExtension in project intellij-community by JetBrains.
the class MoveMembersTest method testFromNestedToOuterMethodRef.
public void testFromNestedToOuterMethodRef() throws Exception {
final LanguageLevelProjectExtension projectExtension = LanguageLevelProjectExtension.getInstance(getProject());
final LanguageLevel oldLevel = projectExtension.getLanguageLevel();
try {
projectExtension.setLanguageLevel(LanguageLevel.HIGHEST);
doTest("Outer.Inner", "Outer", true, VisibilityUtil.ESCALATE_VISIBILITY, 0);
} finally {
projectExtension.setLanguageLevel(oldLevel);
}
}
use of com.intellij.openapi.roots.LanguageLevelProjectExtension in project intellij-community by JetBrains.
the class MoveMembersTest method testStaticToInterface.
public void testStaticToInterface() throws Exception {
final LanguageLevelProjectExtension levelProjectExtension = LanguageLevelProjectExtension.getInstance(getProject());
final LanguageLevel level = levelProjectExtension.getLanguageLevel();
try {
levelProjectExtension.setLanguageLevel(LanguageLevel.JDK_1_8);
doTest("A", "B", 0);
} finally {
levelProjectExtension.setLanguageLevel(level);
}
}
use of com.intellij.openapi.roots.LanguageLevelProjectExtension in project intellij-community by JetBrains.
the class IdeaTestUtil method withLevel.
public static void withLevel(final Module module, final LanguageLevel level, final Runnable r) {
final LanguageLevelProjectExtension projectExt = LanguageLevelProjectExtension.getInstance(module.getProject());
final LanguageLevel projectLevel = projectExt.getLanguageLevel();
final LanguageLevel moduleLevel = LanguageLevelModuleExtensionImpl.getInstance(module).getLanguageLevel();
try {
projectExt.setLanguageLevel(level);
setModuleLanguageLevel(module, level);
r.run();
} finally {
setModuleLanguageLevel(module, moduleLevel);
projectExt.setLanguageLevel(projectLevel);
}
}
use of com.intellij.openapi.roots.LanguageLevelProjectExtension in project intellij-community by JetBrains.
the class ProjectConfigurable method isModified.
@Override
@SuppressWarnings({ "SimplifiableIfStatement" })
public boolean isModified() {
LanguageLevelProjectExtension extension = LanguageLevelProjectExtension.getInstance(myProject);
if (extension.isDefault() != myLanguageLevelCombo.isDefault() || !extension.isDefault() && !extension.getLanguageLevel().equals(myLanguageLevelCombo.getSelectedLevel())) {
return true;
}
final String compilerOutput = getOriginalCompilerOutputUrl();
if (!Comparing.strEqual(FileUtil.toSystemIndependentName(VfsUtilCore.urlToPath(compilerOutput)), FileUtil.toSystemIndependentName(myProjectCompilerOutput.getText())))
return true;
if (myProjectJdkConfigurable.isModified())
return true;
if (!getProjectName().equals(myProject.getName()))
return true;
return false;
}
Aggregations