mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-22 06:21:25 +07:00
apply "Unused suppression" for .kt files
^KTIJ-6421 GitOrigin-RevId: 648ed7fe7e8ba8169ec3277995a59acef5ac232b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bbce482751
commit
bd88377b44
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet")
|
||||
package org.jetbrains.intellij.build.io
|
||||
|
||||
import com.intellij.util.lang.ImmutableZipFile
|
||||
@@ -81,7 +80,6 @@ internal class ZipArchiveOutputStream(private val channel: WritableByteChannel,
|
||||
}
|
||||
|
||||
fun writeRawEntry(header: ByteBuffer, content: ByteBuffer, name: ByteArray, size: Int, compressedSize: Int, method: Int, crc: Long) {
|
||||
@Suppress("DuplicatedCode")
|
||||
if (finished) {
|
||||
throw IOException("Stream has already been finished")
|
||||
}
|
||||
|
||||
@@ -170,7 +170,6 @@ class ZipFileWriter(channel: WritableByteChannel, private val deflater: Deflater
|
||||
return compressedSize
|
||||
}
|
||||
|
||||
@Suppress("DuplicatedCode")
|
||||
fun compressedData(nameString: String, data: ByteArray) {
|
||||
val name = nameString.toByteArray()
|
||||
val headerSize = 30 + name.size
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.intellij.build.io
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
@@ -154,7 +154,6 @@ private fun createProcessArgs(javaExe: Path,
|
||||
val processArgs = mutableListOf<String>()
|
||||
// FIXME: enforce JBR
|
||||
processArgs.add(javaExe.toString())
|
||||
@Suppress("SpellCheckingInspection")
|
||||
processArgs.add("-Djava.awt.headless=true")
|
||||
processArgs.add("-Dapple.awt.UIElement=true")
|
||||
processArgs.addAll(jvmArgs)
|
||||
|
||||
@@ -42,7 +42,6 @@ fun packInternalUtilities(outFile: Path, files: List<Path>) {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
fun crossPlatformZip(macX64DistDir: Path,
|
||||
macAarch64DistDir: Path,
|
||||
linuxX64DistDir: Path,
|
||||
@@ -80,7 +79,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
}
|
||||
else {
|
||||
val fileName = file.fileName.toString()
|
||||
@Suppress("SpellCheckingInspection")
|
||||
if (fileName.startsWith("fsnotifier") && fileName.endsWith(".exe")) {
|
||||
out.entry("bin/win/$fileName", file)
|
||||
}
|
||||
@@ -99,7 +97,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
}
|
||||
else {
|
||||
val fileName = file.fileName.toString()
|
||||
@Suppress("SpellCheckingInspection")
|
||||
if (fileName.startsWith("fsnotifier")) {
|
||||
out.entry("bin/linux/$fileName", file, unixMode = executableFileUnixMode)
|
||||
}
|
||||
@@ -114,7 +111,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
}
|
||||
else {
|
||||
val fileName = file.fileName.toString()
|
||||
@Suppress("SpellCheckingInspection")
|
||||
if (fileName.startsWith("restarter") || fileName.startsWith("printenv")) {
|
||||
out.entry("bin/$fileName", file, unixMode = executableFileUnixMode)
|
||||
}
|
||||
@@ -139,7 +135,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
val zipFiles = mutableMapOf<String, Path>()
|
||||
out.dir(startDir = macX64DistDir, prefix = "", fileFilter = { _, relativeFile ->
|
||||
val p = relativeFile.toString().replace('\\', '/')
|
||||
@Suppress("SpellCheckingInspection")
|
||||
!p.startsWith("bin/fsnotifier") &&
|
||||
!p.startsWith("bin/repair") &&
|
||||
!p.startsWith("bin/restarter") &&
|
||||
@@ -152,7 +147,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
|
||||
out.dir(startDir = macAarch64DistDir, prefix = "", fileFilter = { _, relativeFile ->
|
||||
val p = relativeFile.toString().replace('\\', '/')
|
||||
@Suppress("SpellCheckingInspection")
|
||||
!p.startsWith("bin/fsnotifier") &&
|
||||
!p.startsWith("bin/repair") &&
|
||||
!p.startsWith("bin/restarter") &&
|
||||
@@ -165,7 +159,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
|
||||
out.dir(startDir = linuxX64DistDir, prefix = "", fileFilter = { _, relativeFile ->
|
||||
val p = relativeFile.toString().replace('\\', '/')
|
||||
@Suppress("SpellCheckingInspection")
|
||||
!p.startsWith("bin/fsnotifier") &&
|
||||
!p.startsWith("bin/repair") &&
|
||||
!p.startsWith("bin/printenv") &&
|
||||
@@ -179,7 +172,6 @@ fun crossPlatformZip(macX64DistDir: Path,
|
||||
val winExcludes = distFiles.mapTo(HashSet(distFiles.size)) { "${it.value}/${it.key.fileName}" }
|
||||
out.dir(startDir = winX64DistDir, prefix = "", fileFilter = { _, relativeFile ->
|
||||
val p = relativeFile.toString().replace('\\', '/')
|
||||
@Suppress("SpellCheckingInspection")
|
||||
!p.startsWith("bin/fsnotifier") &&
|
||||
!p.startsWith("bin/repair") &&
|
||||
!p.startsWith("bin/printenv") &&
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.util.concurrent.ForkJoinTask
|
||||
|
||||
private const val algorithm = "SHA-256"
|
||||
|
||||
@Suppress("unused")
|
||||
fun bulkZipWithPrefix(commonSourceDir: Path, items: Collection<Map.Entry<String, Path>>, compress: Boolean) {
|
||||
tracer.spanBuilder("archive directories")
|
||||
.setAttribute(AttributeKey.longKey("count"), items.size.toLong())
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.intellij.build.tasks
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplacePutWithAssignment", "BlockingMethodInNonBlockingContext")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet", "BlockingMethodInNonBlockingContext")
|
||||
|
||||
package org.jetbrains.intellij.build.tasks
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog", "PLATFORM_CLASS_MAPPED_TO_KOTLIN")
|
||||
|
||||
package org.jetbrains.intellij.build.tasks
|
||||
@@ -13,7 +13,6 @@ import java.util.List
|
||||
import java.util.concurrent.ForkJoinTask
|
||||
import java.util.function.Consumer
|
||||
|
||||
@Suppress("unused")
|
||||
fun runScrambler(scramblerJar: Path,
|
||||
mainClass: String,
|
||||
scriptFile: Path,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
|
||||
package org.jetbrains.intellij.build.tasks
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("UsePropertyAccessSyntax")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.intellij.build.tasks
|
||||
|
||||
import com.intellij.testFramework.rules.InMemoryFsExtension
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.starters.remote.wizard
|
||||
|
||||
import com.intellij.icons.AllIcons
|
||||
@@ -320,7 +320,6 @@ open class WebStarterInitialStep(contextProvider: WebStarterContextProvider) : C
|
||||
super._init()
|
||||
|
||||
if (serverOptions == null && currentRequest == null) {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
val serverUrlFromSettings = PropertiesComponent.getInstance().getValue(getServerUrlPropertyName())
|
||||
if (serverUrlFromSettings != null) {
|
||||
setServerUrl(serverUrlFromSettings)
|
||||
|
||||
@@ -276,7 +276,6 @@ class JavaOnboardingTourLesson : KLesson("java.onboarding", JavaLessonsBundle.me
|
||||
|
||||
override val addRowsForUserAgreement: Panel.() -> Unit = {
|
||||
row(JavaLessonsBundle.message("java.onboarding.feedback.system.found.jdks")) {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
val versions: @NlsSafe String = jdkVersions?.joinToString("\n") ?: "none"
|
||||
cell(MultiLineLabel(versions))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.java.codeInsight.daemon
|
||||
|
||||
import com.intellij.ReviseWhenPortedToJDK
|
||||
@@ -29,7 +29,6 @@ class JavadocHtmlLintInspectionTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
fun testEmptyComment() = doTest("/** */\nclass C { }")
|
||||
|
||||
@ReviseWhenPortedToJDK("17")
|
||||
@Suppress("GrazieInspection")
|
||||
fun testCommonErrorsJdk11() {
|
||||
if (JavaSdkUtil.isJdkAtLeast(DESCRIPTOR.sdk, JavaSdkVersion.JDK_17)) return
|
||||
doTest("""
|
||||
@@ -64,8 +63,7 @@ class JavadocHtmlLintInspectionTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
class C { }""".trimIndent())
|
||||
}
|
||||
|
||||
@Suppress("GrazieInspection")
|
||||
fun testCommonErrors() {
|
||||
fun testCommonErrors() {
|
||||
if (!JavaSdkUtil.isJdkAtLeast(DESCRIPTOR.sdk, JavaSdkVersion.JDK_17)) return
|
||||
doTest("""
|
||||
package pkg;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.jps.model
|
||||
|
||||
import com.intellij.testFramework.rules.TempDirectory
|
||||
@@ -12,7 +12,7 @@ import java.util.jar.JarOutputStream
|
||||
import java.util.jar.Manifest
|
||||
|
||||
class JdkVariantDetectorTest {
|
||||
@Suppress("SpellCheckingInspection") private val RELEASE_ORACLE_OPEN_1_8_0_41 =
|
||||
private val RELEASE_ORACLE_OPEN_1_8_0_41 =
|
||||
"""|JAVA_VERSION="1.8.0_41"
|
||||
|OS_NAME="Windows"
|
||||
|OS_VERSION="5.1"
|
||||
@@ -20,7 +20,7 @@ class JdkVariantDetectorTest {
|
||||
|SOURCE=""
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val MANIFEST_ORACLE_OPEN_1_8_0_41 =
|
||||
private val MANIFEST_ORACLE_OPEN_1_8_0_41 =
|
||||
"""|Manifest-Version: 1.0
|
||||
|Implementation-Vendor: N/A
|
||||
|Implementation-Title: Java Runtime Environment
|
||||
@@ -31,7 +31,7 @@ class JdkVariantDetectorTest {
|
||||
|Specification-Version: 1.8
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val RELEASE_ORACLE_1_8_0_291 =
|
||||
private val RELEASE_ORACLE_1_8_0_291 =
|
||||
"""|JAVA_VERSION="1.8.0_291"
|
||||
|OS_NAME="Linux"
|
||||
|OS_VERSION="2.6"
|
||||
@@ -40,7 +40,7 @@ class JdkVariantDetectorTest {
|
||||
|BUILD_TYPE="commercial"
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val MANIFEST_ORACLE_1_8_0_291 =
|
||||
private val MANIFEST_ORACLE_1_8_0_291 =
|
||||
"""|Manifest-Version: 1.0
|
||||
|Implementation-Vendor: Oracle Corporation
|
||||
|Implementation-Title: Java Runtime Environment
|
||||
@@ -106,7 +106,7 @@ class JdkVariantDetectorTest {
|
||||
|LIBC=""
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val MANIFEST_CORRETTO_1_8_0_292 =
|
||||
private val MANIFEST_CORRETTO_1_8_0_292 =
|
||||
"""|Manifest-Version: 1.0
|
||||
|Implementation-Title: Java Runtime Environment
|
||||
|Implementation-Version: 1.8.0_292
|
||||
@@ -170,7 +170,7 @@ class JdkVariantDetectorTest {
|
||||
|SOURCE=" .:ddbdd8cb2baa hotspot:19eb9031626c ..."
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val MANIFEST_ZULU_1_8_0_292 =
|
||||
private val MANIFEST_ZULU_1_8_0_292 =
|
||||
"""|Manifest-Version: 1.0
|
||||
|Implementation-Title: Java Runtime Environment
|
||||
|Implementation-Version: 1.8.0_292
|
||||
@@ -191,7 +191,7 @@ class JdkVariantDetectorTest {
|
||||
|JAVA_VERSION="11.0.10"
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val RELEASE_IBM_1_8_0_291 =
|
||||
private val RELEASE_IBM_1_8_0_291 =
|
||||
"""|JAVA_VERSION="1.8.0_291"
|
||||
|OS_NAME="Windows"
|
||||
|OS_VERSION="5.2"
|
||||
@@ -199,7 +199,7 @@ class JdkVariantDetectorTest {
|
||||
|SOURCE=""
|
||||
""".trimMargin()
|
||||
|
||||
@Suppress("SpellCheckingInspection") private val MANIFEST_IBM_1_8_0_291 =
|
||||
private val MANIFEST_IBM_1_8_0_291 =
|
||||
"""|Manifest-Version: 1.0
|
||||
|Ant-Version: Apache Ant 1.7.1
|
||||
|Created-By: 1.8.0 (IBM Corporation)
|
||||
|
||||
@@ -265,7 +265,6 @@ class NotebookCellInlayManager private constructor(val editor: EditorImpl) {
|
||||
inlays.remove(inlay)
|
||||
}
|
||||
if (Disposer.isDisposed(inlay)) {
|
||||
@Suppress("SSBasedInspection")
|
||||
disposable.dispose()
|
||||
} else {
|
||||
Disposer.register(inlay, disposable)
|
||||
|
||||
@@ -96,10 +96,8 @@ class DevIdeaBuildServer {
|
||||
|
||||
val httpServer = createHttpServer(buildServer)
|
||||
LOG.info("Listening on ${httpServer.address.hostString}:${httpServer.address.port}")
|
||||
@Suppress("SpellCheckingInspection")
|
||||
LOG.info(
|
||||
"Custom plugins: ${getAdditionalModules()?.joinToString() ?: "not set (use VM property `additional.modules` to specify additional module ids)"}")
|
||||
@Suppress("SpellCheckingInspection")
|
||||
LOG.info(
|
||||
"Run IDE on module intellij.platform.bootstrap with VM properties -Didea.use.dev.build.server=true -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader")
|
||||
httpServer.start()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog")
|
||||
|
||||
package org.jetbrains.intellij.build.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("HardCodedStringLiteral")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.builtInWebServer
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("HardCodedStringLiteral", "ReplaceGetOrSet")
|
||||
@file:Suppress("ReplaceGetOrSet")
|
||||
package org.jetbrains.builtInWebServer
|
||||
|
||||
import com.github.benmanes.caffeine.cache.Caffeine
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.builtInWebServer
|
||||
|
||||
import com.intellij.execution.ExecutionException
|
||||
@@ -118,7 +118,6 @@ abstract class NetService @JvmOverloads protected constructor(protected val proj
|
||||
if (result != null && result == osProcessHandler) {
|
||||
processHandler.reset()
|
||||
}
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
print("${getConsoleToolWindowId()} terminated\n", ConsoleViewContentType.SYSTEM_OUTPUT)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.builtInWebServer
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -21,7 +21,6 @@ import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
|
||||
private class StaticFileHandler : WebServerFileHandler() {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
override val pageFileExtensions = listOf("html", "htm", "shtml", "stm", "shtm")
|
||||
|
||||
private var ssiProcessor: SsiProcessor? = null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.builtInWebServer.ssi
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
@@ -20,7 +20,6 @@ internal const val COMMAND_END = "-->"
|
||||
|
||||
internal class SsiStopProcessingException : RuntimeException()
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
internal open class SsiProcessor {
|
||||
private val commands: MutableMap<String, SsiCommand> = HashMap()
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("HardCodedStringLiteral")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.ide
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.ide
|
||||
|
||||
import com.google.gson.reflect.TypeToken
|
||||
@@ -28,7 +28,6 @@ import java.io.OutputStream
|
||||
import java.net.URI
|
||||
import java.net.URISyntaxException
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
internal class InstallPluginService : RestService() {
|
||||
override fun getServiceName() = "installPlugin"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.ide
|
||||
|
||||
import com.intellij.ide.impl.ProjectUtil.focusProjectWindow
|
||||
@@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentLinkedQueue
|
||||
import java.util.regex.Pattern
|
||||
import javax.swing.SwingUtilities
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
private val NOT_FOUND = createError("not found")
|
||||
private val LINE_AND_COLUMN = Pattern.compile("^(.*?)(?::(\\d+))?(?::(\\d+))?$")
|
||||
|
||||
@@ -56,7 +55,6 @@ private val LINE_AND_COLUMN = Pattern.compile("^(.*?)(?::(\\d+))?(?::(\\d+))?$")
|
||||
* @apiExample {curl} Query parameters
|
||||
* curl http://localhost:63342/api/file?file=path/to/file.kt&line=100&column=34
|
||||
*/
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
internal class OpenFileHttpService : RestService() {
|
||||
@Volatile private var refreshSessionId: Long = 0
|
||||
private val requests = ConcurrentLinkedQueue<OpenFileTask>()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.ide
|
||||
|
||||
import com.intellij.ide.IdeBundle
|
||||
@@ -15,7 +15,6 @@ import java.util.concurrent.Future
|
||||
|
||||
private const val SERVICE_NAME = "settings"
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
internal class OpenSettingsService : RestService() {
|
||||
override fun getServiceName() = SERVICE_NAME
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.ide
|
||||
|
||||
import com.github.benmanes.caffeine.cache.CacheLoader
|
||||
@@ -35,6 +35,8 @@ import io.netty.channel.ChannelHandlerContext
|
||||
import io.netty.handler.codec.http.*
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.builtInWebServer.isSignedRequest
|
||||
import org.jetbrains.ide.RestService.Companion.createJsonReader
|
||||
import org.jetbrains.ide.RestService.Companion.createJsonWriter
|
||||
import org.jetbrains.io.addCommonHeaders
|
||||
import org.jetbrains.io.addNoCache
|
||||
import org.jetbrains.io.response
|
||||
@@ -61,7 +63,6 @@ import java.util.concurrent.atomic.AtomicInteger
|
||||
*
|
||||
* @see <a href="http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api">Best Practices for Designing a Pragmatic REST API</a>.
|
||||
*/
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
abstract class RestService : HttpRequestHandler() {
|
||||
companion object {
|
||||
@JvmField
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.ide
|
||||
|
||||
import com.google.gson.JsonElement
|
||||
@@ -104,7 +104,6 @@ internal class ToolboxRestServiceConfig : Disposable {
|
||||
|
||||
internal class ToolboxRestService : RestService() {
|
||||
internal companion object {
|
||||
@Suppress("SSBasedInspection")
|
||||
private val LOG = logger<ToolboxRestService>()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.io.fastCgi
|
||||
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
@@ -24,7 +24,6 @@ private const val VERSION = 1
|
||||
|
||||
private const val MAX_CONTENT_LENGTH = 0xFFFF
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
class FastCgiRequest(val requestId: Int, allocator: ByteBufAllocator) {
|
||||
private val params = allocator.ioBuffer(4096)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.io.fastCgi
|
||||
|
||||
import com.intellij.concurrency.ConcurrentCollectionFactory
|
||||
@@ -167,7 +167,6 @@ private fun sendBadGateway(channel: Channel, extraHeaders: HttpHeaders) {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
private fun parseHeaders(response: HttpResponse, buffer: ByteBuf) {
|
||||
val builder = StringBuilder()
|
||||
while (buffer.isReadable) {
|
||||
@@ -201,7 +200,6 @@ private fun parseHeaders(response: HttpResponse, buffer: ByteBuf) {
|
||||
}
|
||||
|
||||
// skip standard headers
|
||||
@Suppress("SpellCheckingInspection")
|
||||
if (key.isNullOrEmpty() || key.startsWith("http", ignoreCase = true) || key.startsWith("X-Accel-", ignoreCase = true)) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.io.jsonRpc
|
||||
|
||||
import com.google.gson.Gson
|
||||
@@ -53,7 +53,6 @@ private val gson by lazy {
|
||||
.create()
|
||||
}
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
class JsonRpcServer(private val clientManager: ClientManager) : MessageServer {
|
||||
|
||||
private val messageIdCounter = AtomicInteger()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.io.webSocket
|
||||
|
||||
import io.netty.channel.Channel
|
||||
@@ -52,7 +53,6 @@ open class WebSocketProtocolHandshakeHandler(private val handshaker: WebSocketCl
|
||||
try {
|
||||
handshaker.finishHandshake(channel, message as FullHttpResponse)
|
||||
val pipeline = channel.pipeline()
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
pipeline.replace(this, "aggregator", WebSocketFrameAggregator(NettyUtil.MAX_CONTENT_LENGTH))
|
||||
// https codec is removed by finishHandshake
|
||||
completed()
|
||||
|
||||
@@ -142,7 +142,6 @@ private fun installScrollIfChangedController(
|
||||
})
|
||||
}
|
||||
|
||||
@Suppress("DialogTitleCapitalization")
|
||||
private fun createSubmitButton(
|
||||
model: CommentTextFieldModel,
|
||||
actionConfig: SubmitActionConfig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplacePutWithAssignment")
|
||||
@file:Suppress("ReplaceGetOrSet")
|
||||
package com.intellij.configurationStore
|
||||
|
||||
import com.intellij.configurationStore.statistic.eventLog.FeatureUsageSettingsEvents
|
||||
@@ -670,7 +670,6 @@ private fun notifyUnknownMacros(store: IComponentStore, project: Project, compon
|
||||
}
|
||||
|
||||
val macros = LinkedHashSet(immutableMacros)
|
||||
@Suppress("IncorrectParentDisposable")
|
||||
AppUIExecutor.onUiThread().expireWith(project).submit {
|
||||
var notified: MutableList<String>? = null
|
||||
val manager = NotificationsManager.getNotificationsManager()
|
||||
|
||||
@@ -60,7 +60,6 @@ abstract class ComponentStoreWithExtraComponents : ComponentStoreImpl() {
|
||||
coroutineScope {
|
||||
// expects EDT
|
||||
launch(AppUIExecutor.onUiThread().expireWith(serviceContainer).coroutineDispatchingContext()) {
|
||||
@Suppress("Duplicates")
|
||||
val errors = SmartList<Throwable>()
|
||||
for (settingsSavingComponent in settingsSavingComponents) {
|
||||
runAndCollectException(errors) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.configurationStore
|
||||
|
||||
import com.intellij.openapi.components.impl.stores.SaveSessionAndFile
|
||||
@@ -15,7 +15,6 @@ class SaveResult {
|
||||
private val errors: MutableList<Throwable> = SmartList()
|
||||
val readonlyFiles: MutableList<SaveSessionAndFile> = SmartList()
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
var isChanged = false
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -300,7 +300,6 @@ private fun save(states: StateMap, newLiveStates: Map<String, Element>): Mutable
|
||||
// name attribute should be first
|
||||
val elementAttributes = element.attributes
|
||||
var nameAttribute = element.getAttribute(FileStorageCoreUtil.NAME)
|
||||
@Suppress("SuspiciousEqualsCombination")
|
||||
if (nameAttribute != null && nameAttribute === elementAttributes[0] && componentName == nameAttribute.value) {
|
||||
// all is OK
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ internal fun moveComponentConfiguration(defaultProject: Project,
|
||||
fun processComponents(aClass: Class<*>) {
|
||||
val stateAnnotation = getStateSpec(aClass) ?: return
|
||||
|
||||
@Suppress("MoveVariableDeclarationIntoWhen")
|
||||
val storagePath = when {
|
||||
stateAnnotation.name.isEmpty() -> "misc.xml"
|
||||
else -> (stateAnnotation.storages.sortByDeprecated().firstOrNull() ?: return).path
|
||||
|
||||
@@ -432,7 +432,6 @@ class SchemeManagerImpl<T: Scheme, MUTABLE_SCHEME : T>(val fileSpec: String,
|
||||
}
|
||||
|
||||
// if another new scheme uses old name of this scheme, we must not delete it (as part of rename operation)
|
||||
@Suppress("SuspiciousEqualsCombination")
|
||||
val renamed = externalInfo != null && fileNameWithoutExtension !== currentFileNameWithoutExtension && currentFileNameWithoutExtension != null && nameGenerator.isUnique(currentFileNameWithoutExtension)
|
||||
if (providerPath == null) {
|
||||
if (isUseVfs) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.configurationStore.schemeManager
|
||||
|
||||
import com.intellij.configurationStore.*
|
||||
@@ -7,13 +7,13 @@ import com.intellij.openapi.options.NonLazySchemeProcessor
|
||||
import com.intellij.openapi.options.Scheme
|
||||
import com.intellij.openapi.project.ProjectBundle
|
||||
import com.intellij.openapi.util.JDOMUtil
|
||||
import com.intellij.util.xml.dom.createXmlStreamReader
|
||||
import com.intellij.openapi.vfs.CharsetToolkit
|
||||
import com.intellij.openapi.vfs.VfsUtil
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.util.containers.ContainerUtil
|
||||
import com.intellij.util.io.createDirectories
|
||||
import com.intellij.util.io.systemIndependentPath
|
||||
import com.intellij.util.xml.dom.createXmlStreamReader
|
||||
import org.jdom.Element
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import java.io.IOException
|
||||
@@ -221,7 +221,6 @@ internal inline fun lazyPreloadScheme(bytes: ByteArray, isOldSchemeNaming: Boole
|
||||
consumer(preload(isOldSchemeNaming, reader), reader)
|
||||
}
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
private fun preload(isOldSchemeNaming: Boolean, parser: XMLStreamReader): String? {
|
||||
var eventType = parser.eventType
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.configurationStore.statistic.eventLog
|
||||
|
||||
import com.intellij.internal.statistic.eventLog.validator.ValidationResultType
|
||||
@@ -22,7 +22,6 @@ class SettingsComponentNameValidator : CustomValidationRule() {
|
||||
}
|
||||
|
||||
private fun isComponentName(data: String, context: EventContext): Boolean {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
return context.eventData.containsKey("component") && data == context.eventData["component"]
|
||||
}
|
||||
}
|
||||
@@ -31,7 +30,6 @@ class SettingsValueValidator : CustomValidationRule() {
|
||||
override fun getRuleId(): String = "setting_value"
|
||||
|
||||
override fun doValidate(data: String, context: EventContext): ValidationResultType {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
val componentName = context.eventData["component"] as? String ?: return REJECTED
|
||||
val optionName = context.eventData["name"] as? String ?: return REJECTED
|
||||
if (!isComponentNameWhitelisted(componentName) || !isComponentOptionNameWhitelisted(optionName)) return REJECTED
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.configurationStore.statistic.eventLog
|
||||
|
||||
import com.intellij.configurationStore.jdomSerializer
|
||||
@@ -78,7 +78,6 @@ open class FeatureUsageSettingsEventPrinter(private val recordDefault: Boolean)
|
||||
val pluginInfo = getPluginInfo(clazz)
|
||||
if (pluginInfo.isDevelopedByJetBrains()) {
|
||||
recordedComponents.add(componentName)
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
logConfig(GROUP, "invoked", createComponentData(project, componentName, pluginInfo), counter.incrementAndGet())
|
||||
}
|
||||
}
|
||||
@@ -102,7 +101,6 @@ open class FeatureUsageSettingsEventPrinter(private val recordDefault: Boolean)
|
||||
|
||||
fun logConfigurationState(componentName: String, state: Any, project: Project?) {
|
||||
val (optionsValues, pluginInfo) = valuesExtractor.extract(project, componentName, state) ?: return
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
val eventId = if (recordDefault) "option" else "not.default"
|
||||
val id = counter.incrementAndGet()
|
||||
for (data in optionsValues) {
|
||||
@@ -110,7 +108,6 @@ open class FeatureUsageSettingsEventPrinter(private val recordDefault: Boolean)
|
||||
}
|
||||
|
||||
if (!recordDefault) {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
logConfig(GROUP, "invoked", createComponentData(project, componentName, pluginInfo), id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.configurationStore
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx
|
||||
@@ -21,7 +21,6 @@ import com.intellij.project.isDirectoryBased
|
||||
import com.intellij.project.stateStore
|
||||
import com.intellij.testFramework.*
|
||||
import com.intellij.testFramework.assertions.Assertions.assertThat
|
||||
import com.intellij.testFramework.rules.ProjectModelRule
|
||||
import com.intellij.util.io.Ksuid
|
||||
import com.intellij.util.io.readText
|
||||
import com.intellij.util.io.systemIndependentPath
|
||||
@@ -48,7 +47,6 @@ class ModuleStoreTest {
|
||||
|
||||
private val tempDirManager = TemporaryDirectory()
|
||||
|
||||
@Suppress("unused")
|
||||
@JvmField
|
||||
@Rule
|
||||
val ruleChain = RuleChain(tempDirManager, EdtRule(), ActiveStoreRule(projectRule), DisposeModulesRule(projectRule))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("PropertyName", "ReplacePutWithAssignment", "ReplacePutWithAssignment")
|
||||
@file:Suppress("PropertyName", "ReplacePutWithAssignment")
|
||||
|
||||
package com.intellij.configurationStore.xml
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("PropertyName")
|
||||
|
||||
package com.intellij.configurationStore.xml
|
||||
@@ -162,7 +162,6 @@ internal class XmlSerializerTest {
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
// any instance of this class is equal
|
||||
@Suppress("SuspiciousEqualsCombination")
|
||||
return this === other || (other != null && javaClass == other.javaClass)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ fun ModalityState.asContextElement(): CoroutineContext = coroutineSupport().asCo
|
||||
/**
|
||||
* @return UI dispatcher which dispatches within the [context modality state][asContextElement].
|
||||
*/
|
||||
@Suppress("unused") // unused receiver
|
||||
@Suppress("UnusedReceiverParameter")
|
||||
val Dispatchers.EDT: CoroutineContext get() = coroutineSupport().edtDispatcher()
|
||||
|
||||
private fun coroutineSupport() = ApplicationManager.getApplication().getService(CoroutineSupport::class.java)
|
||||
|
||||
@@ -66,7 +66,6 @@ open class MessageBusImpl : MessageBus {
|
||||
|
||||
// separate disposable must be used, because container will dispose bus connections in a separate step
|
||||
private var connectionDisposable: Disposable? = Disposer.newDisposable()
|
||||
@Suppress("LeakingThis")
|
||||
@JvmField
|
||||
internal var messageDeliveryListener: MessageDeliveryListener? = null
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceNegatedIsEmptyWithIsNotEmpty", "ReplaceGetOrSet", "ReplacePutWithAssignment")
|
||||
@file:Suppress("ReplaceGetOrSet")
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
import com.intellij.diagnostic.PluginException
|
||||
@@ -211,7 +211,6 @@ class ClassLoaderConfigurator(
|
||||
val coreUrlClassLoader = coreLoader as? UrlClassLoader
|
||||
if (coreUrlClassLoader == null) {
|
||||
if (!java.lang.Boolean.getBoolean("idea.use.core.classloader.for.plugin.path")) {
|
||||
@Suppress("SpellCheckingInspection")
|
||||
log.error("You must run JVM with -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader")
|
||||
}
|
||||
setPluginClassLoaderForModuleAndOldSubDescriptors(module, coreLoader)
|
||||
|
||||
@@ -135,7 +135,6 @@ class IdeaPluginDescriptorImpl(raw: RawPluginDescriptor,
|
||||
dataLoader: DataLoader,
|
||||
moduleName: String?): IdeaPluginDescriptorImpl {
|
||||
raw.name = name
|
||||
@Suppress("TestOnlyProblems")
|
||||
val result = IdeaPluginDescriptorImpl(raw, path = path, isBundled = isBundled, id = id, moduleName = moduleName,
|
||||
useCoreClassLoader = useCoreClassLoader)
|
||||
result.descriptorPath = descriptorPath
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplacePutWithAssignment", "ReplaceGetOrSet")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet")
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplaceGetOrSet", "ReplacePutWithAssignment", "ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ReplaceGetOrSet", "ReplacePutWithAssignment", "ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.plugins
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
@@ -7,7 +7,6 @@ import java.nio.file.Path
|
||||
import java.util.*
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
@Suppress("ReplaceNegatedIsEmptyWithIsNotEmpty")
|
||||
class PluginXmlPathResolver(private val pluginJarFiles: List<Path>) : PathResolver {
|
||||
companion object {
|
||||
// don't use Kotlin emptyList here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:JvmName("XmlReader")
|
||||
@file:Suppress("ReplaceNegatedIsEmptyWithIsNotEmpty", "ReplacePutWithAssignment", "ReplaceGetOrSet")
|
||||
package com.intellij.ide.plugins
|
||||
@@ -10,11 +10,11 @@ import com.intellij.openapi.extensions.ExtensionDescriptor
|
||||
import com.intellij.openapi.extensions.ExtensionPointDescriptor
|
||||
import com.intellij.openapi.extensions.LoadingOrder
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.util.xml.dom.createNonCoalescingXmlStreamReader
|
||||
import com.intellij.util.xml.dom.NoOpXmlInterner
|
||||
import com.intellij.util.xml.dom.XmlInterner
|
||||
import com.intellij.util.lang.ZipFilePool
|
||||
import com.intellij.util.messages.ListenerDescriptor
|
||||
import com.intellij.util.xml.dom.NoOpXmlInterner
|
||||
import com.intellij.util.xml.dom.XmlInterner
|
||||
import com.intellij.util.xml.dom.createNonCoalescingXmlStreamReader
|
||||
import com.intellij.util.xml.dom.readXmlAsModel
|
||||
import org.codehaus.stax2.XMLStreamReader2
|
||||
import org.codehaus.stax2.typed.TypedXMLStreamException
|
||||
@@ -896,7 +896,6 @@ private inline fun XMLStreamReader.consumeChildElements(crossinline consumer: (n
|
||||
|
||||
var depth = 1
|
||||
while (true) {
|
||||
@Suppress("DuplicatedCode")
|
||||
when (next()) {
|
||||
XMLStreamConstants.START_ELEMENT -> {
|
||||
depth++
|
||||
|
||||
@@ -42,7 +42,6 @@ abstract class HoledIcon(private val icon: Icon) : RetrievableIcon, ScalableIcon
|
||||
val path = Path2D.Float(Path2D.WIND_EVEN_ODD)
|
||||
path.append(area, false)
|
||||
path.append(hole, false)
|
||||
@Suppress("GraphicsSetClipInspection")
|
||||
g.clip = path // safe because based on old clip
|
||||
}
|
||||
icon.paintIcon(c, g, 0, 0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.credentialStore
|
||||
|
||||
import com.intellij.credentialStore.gpg.Pgp
|
||||
@@ -99,7 +99,6 @@ class PasswordSafeConfigurableUi(private val settings: PasswordSafeSettings) : C
|
||||
(PasswordSafe.instance as PasswordSafeImpl).closeCurrentStore(isSave = false, isEvenMemoryOnly = providerType != ProviderType.MEMORY_ONLY)
|
||||
|
||||
val passwordSafe = PasswordSafe.instance as PasswordSafeImpl
|
||||
@Suppress("CascadeIf")
|
||||
if (oldProviderType != providerType) {
|
||||
when (providerType) {
|
||||
ProviderType.MEMORY_ONLY -> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("PackageDirectoryMismatch")
|
||||
package com.intellij.ide.passwordSafe.impl
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
|
||||
open class BasePasswordSafe @NonInjectable constructor(val settings: PasswordSafeSettings, provider: CredentialStore? = null /* TestOnly */) : PasswordSafe() {
|
||||
@Suppress("unused")
|
||||
constructor() : this(service<PasswordSafeSettings>(), null)
|
||||
|
||||
override var isRememberPasswordByDefault: Boolean
|
||||
|
||||
@@ -148,7 +148,6 @@ open class KeePassFileManager(private val file: Path,
|
||||
return CredentialStoreUiService.getInstance().showChangeMasterPasswordDialog(contextComponent, ::doSetNewMasterPassword)
|
||||
}
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
protected fun doSetNewMasterPassword(current: CharArray, new: CharArray): Boolean {
|
||||
val db = loadKdbx(file, KdbxPassword.createAndClear(current.toByteArrayAndClear()))
|
||||
saveDatabase(file, db, createMasterKey(new.toByteArrayAndClear()), masterKeyFileStorage, secureRandom.value)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.credentialStore
|
||||
|
||||
import com.intellij.jna.DisposableMemory
|
||||
@@ -202,7 +202,6 @@ private interface SecretLibrary : Library {
|
||||
fun secret_error_get_quark(): Int
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@Structure.FieldOrder("domain", "code", "message")
|
||||
internal class GError(p: Pointer) : Structure(p) {
|
||||
@JvmField var domain: Int? = null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.credentialStore
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
@@ -194,7 +194,6 @@ internal class SecKeychainAttributeInfo : Structure() {
|
||||
@JvmField var format: Pointer? = null
|
||||
}
|
||||
|
||||
@Suppress("FunctionName")
|
||||
private fun SecKeychainAttributeInfo(vararg ids: Int): SecKeychainAttributeInfo {
|
||||
val info = SecKeychainAttributeInfo()
|
||||
val length = ids.size
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.credentialStore.keePass
|
||||
|
||||
import com.intellij.credentialStore.CredentialAttributes
|
||||
@@ -45,7 +45,6 @@ internal open class BaseKeePassFileManagerTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("TestFunctionName")
|
||||
internal class TestKeePassFileManager(
|
||||
file: Path,
|
||||
masterKeyFile: Path,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.credentialStore.keePass
|
||||
|
||||
import com.intellij.credentialStore.*
|
||||
@@ -156,7 +156,6 @@ class KeePassCredentialStoreTest {
|
||||
private fun randomString() = UUID.randomUUID().toString()
|
||||
|
||||
// avoid this constructor in production sources to avoid m
|
||||
@Suppress("TestFunctionName")
|
||||
internal fun createStore(baseDir: Path): KeePassCredentialStore {
|
||||
return KeePassCredentialStore(dbFile = baseDir.resolve(DB_FILE_NAME),
|
||||
masterKeyFile = baseDir.resolve(MASTER_KEY_FILE_NAME))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.diff.actions
|
||||
|
||||
import com.intellij.diff.*
|
||||
@@ -141,7 +141,6 @@ internal class SwitchToRecentEditorActionGroup : ActionGroup(), DumbAware {
|
||||
return BlankDiffWindowUtil.getRecentFiles().map2Array { MySwitchAction(it) }
|
||||
}
|
||||
|
||||
@Suppress("DialogTitleCapitalization")
|
||||
private class MySwitchAction(val content: RecentBlankContent) : BlankSwitchContentActionBase() {
|
||||
init {
|
||||
templatePresentation.setTextWithMnemonic {
|
||||
|
||||
@@ -384,7 +384,6 @@ class UISettings @NonInjectable constructor(private val notRoamableOptions: NotR
|
||||
state.markModifiedTabsWithAsterisk = value
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
var overrideConsoleCycleBufferSize: Boolean
|
||||
get() = state.overrideConsoleCycleBufferSize
|
||||
set(value) {
|
||||
@@ -460,7 +459,6 @@ class UISettings @NonInjectable constructor(private val notRoamableOptions: NotR
|
||||
/** Not tabbed pane. */
|
||||
const val TABS_NONE = 0
|
||||
|
||||
@Suppress("ObjectPropertyName")
|
||||
@Volatile
|
||||
private var cachedInstance: UISettings? = null
|
||||
|
||||
@@ -730,25 +728,25 @@ class UISettings @NonInjectable constructor(private val notRoamableOptions: NotR
|
||||
}
|
||||
|
||||
//<editor-fold desc="Deprecated stuff.">
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use fontFace", replaceWith = ReplaceWith("fontFace"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var FONT_FACE: String? = null
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use fontSize", replaceWith = ReplaceWith("fontSize"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var FONT_SIZE: Int? = 0
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use hideToolStripes", replaceWith = ReplaceWith("hideToolStripes"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var HIDE_TOOL_STRIPES = true
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use consoleCommandHistoryLimit", replaceWith = ReplaceWith("consoleCommandHistoryLimit"))
|
||||
@JvmField
|
||||
@Transient
|
||||
@@ -760,37 +758,37 @@ class UISettings @NonInjectable constructor(private val notRoamableOptions: NotR
|
||||
@Transient
|
||||
var CYCLE_SCROLLING = true
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use showMainToolbar", replaceWith = ReplaceWith("showMainToolbar"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var SHOW_MAIN_TOOLBAR = false
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use showCloseButton", replaceWith = ReplaceWith("showCloseButton"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var SHOW_CLOSE_BUTTON = true
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use presentationMode", replaceWith = ReplaceWith("presentationMode"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var PRESENTATION_MODE = false
|
||||
|
||||
@Suppress("unused", "PropertyName", "SpellCheckingInspection")
|
||||
@Suppress("PropertyName", "SpellCheckingInspection")
|
||||
@Deprecated("Use overrideLafFonts", replaceWith = ReplaceWith("overrideLafFonts"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var OVERRIDE_NONIDEA_LAF_FONTS = false
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use presentationModeFontSize", replaceWith = ReplaceWith("presentationModeFontSize"))
|
||||
@JvmField
|
||||
@Transient
|
||||
var PRESENTATION_MODE_FONT_SIZE = 24
|
||||
|
||||
@Suppress("unused", "PropertyName")
|
||||
@Suppress("PropertyName")
|
||||
@Deprecated("Use editorTabLimit", replaceWith = ReplaceWith("editorTabLimit"))
|
||||
@JvmField
|
||||
@Transient
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.execution.process.mediator.daemon
|
||||
|
||||
import com.google.protobuf.ByteString
|
||||
@@ -96,7 +96,7 @@ internal class ProcessManager : Closeable {
|
||||
else -> throw IllegalArgumentException("Unknown process output FD $fd for PID $handleId")
|
||||
}
|
||||
val buffer = ByteArray(8192)
|
||||
@Suppress("BlockingMethodInNonBlockingContext", "EXPERIMENTAL_API_USAGE") // note the .flowOn(Dispatchers.IO) below
|
||||
@Suppress("EXPERIMENTAL_API_USAGE") // note the .flowOn(Dispatchers.IO) below
|
||||
return flow<ByteString> {
|
||||
while (true) {
|
||||
val n = inputStream.read(buffer)
|
||||
|
||||
@@ -893,9 +893,7 @@ private fun userApprovesStopForSameTypeConfigurations(project: Project, configNa
|
||||
private fun userApprovesStopForIncompatibleConfigurations(project: Project,
|
||||
configName: String,
|
||||
runningIncompatibleDescriptors: List<RunContentDescriptor>): Boolean {
|
||||
@Suppress("DuplicatedCode")
|
||||
val config = RunManagerImpl.getInstanceImpl(project).config
|
||||
@Suppress("DuplicatedCode")
|
||||
if (!config.isStopIncompatibleRequiresConfirmation) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -200,7 +200,6 @@ class RunnerAndConfigurationSettingsImpl @JvmOverloads constructor(
|
||||
|
||||
isEditBeforeRun = (element.getAttributeBooleanValue(EDIT_BEFORE_RUN))
|
||||
val value = element.getAttributeValue(ACTIVATE_TOOLWINDOW_BEFORE_RUN)
|
||||
@Suppress("PlatformExtensionReceiverOfInline")
|
||||
isActivateToolWindowBeforeRun = value == null || value.toBoolean()
|
||||
folderName = element.getAttributeValue(FOLDER_NAME)
|
||||
val factory = manager.getFactory(element.getAttributeValue(CONFIGURATION_TYPE_ATTRIBUTE), element.getAttributeValue(FACTORY_NAME_ATTRIBUTE), !isTemplate) ?: return
|
||||
@@ -235,7 +234,6 @@ class RunnerAndConfigurationSettingsImpl @JvmOverloads constructor(
|
||||
}
|
||||
else {
|
||||
wasSingletonSpecifiedExplicitly = true
|
||||
@Suppress("PlatformExtensionReceiverOfInline")
|
||||
configuration.isAllowRunningInParallel = !singletonStr.toBoolean()
|
||||
}
|
||||
|
||||
@@ -493,7 +491,6 @@ class RunnerAndConfigurationSettingsImpl @JvmOverloads constructor(
|
||||
if (runner == null) {
|
||||
iterator.remove()
|
||||
}
|
||||
@Suppress("IfThenToSafeAccess")
|
||||
add(state, runner, if (runner == null) null else createSettings(runner))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.jetbrains.annotations.NonNls
|
||||
/**
|
||||
* @param order corresponding sorting happens here: [com.intellij.execution.actions.BaseRunConfigurationAction.getOrderedConfiguration]
|
||||
*/
|
||||
@Suppress("ComponentNotRegistered")
|
||||
class ExecutorAction private constructor(val origin: AnAction,
|
||||
val executor: Executor,
|
||||
val order: Int) :
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.execution.target
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
@@ -14,7 +14,6 @@ class TargetEnvironmentsConfigurable(private val project: Project,
|
||||
defaultLanguageRuntime: LanguageRuntimeType<*>? = null)
|
||||
: SearchableConfigurable, MasterDetails {
|
||||
|
||||
@Suppress("unused")
|
||||
constructor(project: Project) : this(project, null, null)
|
||||
|
||||
private val editor = TargetEnvironmentsMasterDetails(project, initialSelectedName, defaultLanguageRuntime)
|
||||
|
||||
@@ -435,7 +435,6 @@ private class RunToolbarWidgetRunAction(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UnregisteredNamedColor")
|
||||
private enum class RunButtonColors {
|
||||
BLUE {
|
||||
override fun updateColors(button: RunDropDownButton) {
|
||||
|
||||
@@ -23,7 +23,6 @@ final class ProjectNotificationAware(private val project: Project) : ExternalSys
|
||||
AutoImportProjectNotificationAware.getInstance(project).notificationExpire()
|
||||
}
|
||||
|
||||
@Suppress("SSBasedInspection")
|
||||
override fun dispose() {
|
||||
AutoImportProjectNotificationAware.getInstance(project).dispose()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.externalSystem.service.execution.configuration
|
||||
|
||||
import com.intellij.execution.Executor
|
||||
@@ -38,7 +38,6 @@ abstract class ExternalSystemRunConfigurationExtension : RunConfigurationExtensi
|
||||
*
|
||||
* @see com.intellij.execution.RunConfigurationExtension.updateJavaParameters from java plugin
|
||||
*/
|
||||
@Suppress("KDocUnresolvedReference")
|
||||
open fun updateVMParameters(
|
||||
configuration: ExternalSystemRunConfiguration,
|
||||
javaParameters: SimpleJavaParameters,
|
||||
|
||||
@@ -66,7 +66,6 @@ class NotificationGroup private constructor(val displayId: String,
|
||||
registeredGroups[displayId] = this
|
||||
|
||||
if (title == null) {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
title = registeredTitles[displayId]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ui.content
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
@@ -9,7 +9,6 @@ import java.util.function.Supplier
|
||||
import javax.swing.JComponent
|
||||
|
||||
class TabDescriptor(val component: JComponent, private val displayNamePointer: Supplier<@TabTitle String>) : Disposable {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
@get:TabTitle
|
||||
val displayName: @TabTitle String
|
||||
get() = displayNamePointer.get()
|
||||
@@ -44,7 +43,6 @@ class TabDescriptor(val component: JComponent, private val displayNamePointer: S
|
||||
class TabGroupId @JvmOverloads constructor(@NonNls val id: String,
|
||||
private val displayNamePointer: Supplier<@TabTitle String>,
|
||||
val splitByDefault: Boolean = false) {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
@get:TabTitle
|
||||
val displayName: @TabTitle String
|
||||
get() = displayNamePointer.get()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.codeInsight.hints
|
||||
|
||||
import com.intellij.lang.Language
|
||||
@@ -227,7 +227,6 @@ class NoSettings {
|
||||
* Similar to [com.intellij.openapi.util.Key], but it also requires language to be unique.
|
||||
* Allows type-safe access to settings of provider.
|
||||
*/
|
||||
@Suppress("unused")
|
||||
data class SettingsKey<T>(val id: String) {
|
||||
fun getFullId(language: Language): String = language.id + "." + id
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("MayBeConstant")
|
||||
|
||||
package com.intellij.codeInsight.daemon.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.codeInsight.documentation.actions
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.codeInsight.navigation
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ internal class PsiFileNavigationTarget(
|
||||
|
||||
val locationAndIcon = fileLocation(project, file)
|
||||
?: return builder.presentation()
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
builder = builder.locationText(locationAndIcon.text, locationAndIcon.icon)
|
||||
|
||||
return builder.presentation()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.codeInsight.navigation.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.codeInsight.navigation.impl
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.actions
|
||||
|
||||
import com.intellij.ide.actions.CopyReferenceUtil.*
|
||||
@@ -106,7 +106,6 @@ object CopyTBXReferenceAction {
|
||||
|
||||
private fun getSelectionParameters(editor: Editor, caret: Caret, index: String): String? =
|
||||
getSelectionRange(editor, caret)?.let {
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
"&$SELECTION$index=$it"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("UnregisteredNamedColor")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package com.intellij.ide.bookmark.actions
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ide.bookmark.ui
|
||||
|
||||
import com.intellij.ide.ui.customization.CustomActionsSchema
|
||||
@@ -11,7 +11,6 @@ import com.intellij.ui.PopupHandler
|
||||
import com.intellij.util.ui.tree.TreeUtil
|
||||
import javax.swing.JTree
|
||||
|
||||
@Suppress("ComponentNotRegistered")
|
||||
internal class ContextMenuActionGroup(private val tree: JTree) : DumbAware, ActionGroup() {
|
||||
|
||||
override fun getChildren(event: AnActionEvent?): Array<AnAction> {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.actions
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.impl
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.ui
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems") // KTIJ-19938
|
||||
|
||||
package com.intellij.lang.documentation.ide.ui
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("TestOnlyProblems", "DEPRECATION") // KTIJ-19938
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.intellij.lang.documentation.ide.ui
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.paths
|
||||
|
||||
import com.intellij.codeInsight.highlighting.HyperlinkAnnotator
|
||||
@@ -18,7 +18,6 @@ import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.pom.Navigatable
|
||||
import com.intellij.psi.PsiElement
|
||||
|
||||
@Suppress("NonDefaultConstructor")
|
||||
class UrlReference(private val element: PsiElement,
|
||||
private val rangeInElement: TextRange,
|
||||
val url: String) : PsiHighlightedReference {
|
||||
@@ -36,7 +35,6 @@ class UrlReference(private val element: PsiElement,
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("NonDefaultConstructor")
|
||||
private class UrlSymbol(
|
||||
@NlsSafe private val url: String
|
||||
) : Pointer<UrlSymbol>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("ConvertSecondaryConstructorToPrimary", "UnnecessaryVariable")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("ConvertSecondaryConstructorToPrimary")
|
||||
package com.intellij.openapi.projectRoots.impl
|
||||
|
||||
import com.intellij.execution.wsl.WslDistributionManager
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.projectRoots.impl.jdkDownloader
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode
|
||||
@@ -182,7 +182,6 @@ data class JdkItem(
|
||||
}
|
||||
|
||||
enum class JdkPackageType(@NonNls val type: String) {
|
||||
@Suppress("unused")
|
||||
ZIP("zip") {
|
||||
override fun openDecompressor(archiveFile: Path): Decompressor {
|
||||
val decompressor = Decompressor.Zip(archiveFile)
|
||||
@@ -193,7 +192,7 @@ enum class JdkPackageType(@NonNls val type: String) {
|
||||
}
|
||||
},
|
||||
|
||||
@Suppress("SpellCheckingInspection", "unused")
|
||||
@Suppress("SpellCheckingInspection")
|
||||
TAR_GZ("targz") {
|
||||
override fun openDecompressor(archiveFile: Path) = Decompressor.Tar(archiveFile)
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.projectRoots.impl.jdkDownloader
|
||||
|
||||
import com.intellij.openapi.components.service
|
||||
@@ -14,7 +14,6 @@ object RuntimeChooserUtil {
|
||||
|
||||
val result = RuntimeChooserDialog(null, model).showDialogAndGetResult()
|
||||
|
||||
@Suppress("MoveVariableDeclarationIntoWhen")
|
||||
return when (result) {
|
||||
is RuntimeChooserDialogResult.Cancel -> Unit
|
||||
is RuntimeChooserDialogResult.UseDefault -> service<RuntimeChooserPaths>().resetCustomJdk()
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.intellij.internal.statistic.service.fus.collectors.CounterUsagesColle
|
||||
|
||||
internal class SuggestedRefactoringFeatureUsage : CounterUsagesCollector() {
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
companion object {
|
||||
private val GROUP = EventLogGroup("suggested.refactorings", 2)
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ fun ScanningStatistics.ScannedFile.toJson(): JsonScanningStatistics.JsonScannedF
|
||||
wasFullyIndexedByInfrastructureExtension = wasFullyIndexedByInfrastructureExtension
|
||||
)
|
||||
|
||||
@Suppress("DuplicatedCode")
|
||||
fun IndexingFileSetStatistics.toJsonStatistics(visibleTimeToAllThreadsTimeRatio: Double): JsonFileProviderIndexStatistics {
|
||||
val jsonIndexedFiles = if (IndexDiagnosticDumper.shouldDumpPathsOfIndexedFiles) {
|
||||
indexedFiles.map { it.toJson() }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@file:Suppress("unused", "DuplicatedCode", "HardCodedStringLiteral")
|
||||
@file:Suppress("unused", "HardCodedStringLiteral")
|
||||
|
||||
package com.intellij.util.indexing.diagnostic.presentation
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.util.indexing.impl.storage
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
@@ -68,7 +68,6 @@ private class IndexStorageDescriptorPopupContext(private val project: Project,
|
||||
return model
|
||||
}
|
||||
|
||||
@Suppress("HardCodedStringLiteral")
|
||||
override fun getRenderer(): ListCellRenderer<IndexStorageDescriptor> {
|
||||
return SimpleListCellRenderer.create { label, value, _ -> label.text = value.presentableName }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
@file:Suppress("unused")
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package com.intellij.openapi.roots
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user