Setup Missing API inspection
This commit is contained in:
committed by
Nikolay Krasko
parent
d8b364ea40
commit
8977d0e26d
-1
@@ -207,7 +207,6 @@ public class KotlinCommonCodeStyleSettings extends CommonCodeStyleSettings {
|
||||
// SoftMargins.serializeInfo
|
||||
private void serializeInto(@NotNull List<Integer> softMargins, @NotNull Element element) {
|
||||
if (softMargins.size() > 0) {
|
||||
//noinspection IncompatibleAPI
|
||||
XmlSerializer.serializeInto(this, element);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.search.PsiSearchHelper
|
||||
|
||||
// BUNCH: 181
|
||||
@Suppress("IncompatibleAPI")
|
||||
@Suppress("IncompatibleAPI", "MissingRecentApi")
|
||||
fun psiSearchHelperInstance(project: Project): PsiSearchHelper {
|
||||
return PsiSearchHelper.getInstance(project)
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.search.PsiSearchHelper
|
||||
|
||||
// BUNCH: 181
|
||||
@Suppress("IncompatibleAPI")
|
||||
@Suppress("IncompatibleAPI", "MissingRecentApi")
|
||||
fun psiSearchHelperInstance(project: Project): PsiSearchHelper {
|
||||
return PsiSearchHelper.SERVICE.getInstance(project)
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
// Additional method is introduced in 183 instead of deprecated one
|
||||
// BUNCH: 182
|
||||
@SuppressWarnings("IncompatibleAPI")
|
||||
@SuppressWarnings({"IncompatibleAPI", "MissingRecentApi"})
|
||||
public abstract class CodeStyleSettingsProviderCompat extends CodeStyleSettingsProvider {
|
||||
// Can't use @Override because it's going to be an error in 182
|
||||
@SuppressWarnings("override")
|
||||
|
||||
@@ -61,6 +61,7 @@ public class KotlinCodeStyleSettingsProvider extends CodeStyleSettingsProviderCo
|
||||
addBlankLinesTab(settings);
|
||||
addTab(new ImportSettingsPanelWrapper(settings));
|
||||
|
||||
// BUNCH: 182
|
||||
//noinspection IncompatibleAPI
|
||||
for (CodeStyleSettingsProvider provider : CodeStyleSettingsProvider.EXTENSION_POINT_NAME.getExtensions()) {
|
||||
if (provider.getLanguage() == KotlinLanguage.INSTANCE && !provider.hasSettingsPage()) {
|
||||
|
||||
@@ -9,6 +9,6 @@ import com.intellij.codeInspection.reference.RefFile
|
||||
import com.intellij.psi.PsiFile
|
||||
|
||||
// BUNCH: 182
|
||||
@Suppress("IncompatibleAPI")
|
||||
@Suppress("IncompatibleAPI", "MissingRecentApi")
|
||||
val RefFile.psiFile: PsiFile?
|
||||
get() = psiElement
|
||||
@@ -9,6 +9,6 @@ import com.intellij.codeInspection.reference.RefFile
|
||||
import com.intellij.psi.PsiFile
|
||||
|
||||
// BUNCH: 182
|
||||
@Suppress("IncompatibleAPI")
|
||||
@Suppress("IncompatibleAPI", "MissingRecentApi")
|
||||
val RefFile.psiFile: PsiFile?
|
||||
get() = element
|
||||
@@ -221,7 +221,12 @@ abstract class AbstractScriptConfigurationTest : KotlinCompletionTestCase() {
|
||||
|
||||
private fun createTestModuleByName(name: String): Module {
|
||||
val newModuleDir = runWriteAction { VfsUtil.createDirectoryIfMissing(project.baseDir, name) }
|
||||
val newModule = createModuleAt(name, project, JavaModuleType.getModuleType(), newModuleDir.path)
|
||||
|
||||
// BUNCH: 181
|
||||
@Suppress("IncompatibleAPI") val newModule = createModuleAt(name, project, JavaModuleType.getModuleType(), newModuleDir.path)
|
||||
|
||||
// Return type was changed, but it's not used. BUNCH: 183
|
||||
@Suppress("MissingRecentApi")
|
||||
PsiTestUtil.addSourceContentToRoots(newModule, newModuleDir)
|
||||
return newModule
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user