Internal API analyzer false positive

my extensions

        <toolWindow factoryClass="shop.itbug.salvorstool.window.ActixApiWindowFactory" id="Actix Endpoints"
                    anchor="right"
                    icon="/icons/logo.svg"/>
        <toolWindow factoryClass="shop.itbug.salvorstool.window.SalvoApiWindowFactory" id="Salvo Endpoints"
                    anchor="right"
                    icon="/icons/logo.svg"/>

and

import com.intellij.openapi.project.Project
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.ui.content.ContentFactory

class SalvoApiWindowFactory : ToolWindowFactory {
    override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
        val contentFactory = ContentFactory.getInstance()
        val apiWindow = SalvoApiWindowFactoryUtils.create(project)
        val apiWindowContent =
            contentFactory.createContent(SalvoApiWindowFactoryUtils.installActions(apiWindow), "Salvo api", false)
        apiWindowContent.setDisposer(apiWindow)
        toolWindow.contentManager.addContent(apiWindowContent)
    }

}
import com.intellij.openapi.project.Project
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.ui.content.ContentFactory

class ActixApiWindowFactory : ToolWindowFactory {

    override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
        val actixApiWindow = ActixApiWindow(project)
        val content = ContentFactory.getInstance().createContent(actixApiWindow, "Actix", false)
        content.setDisposer(actixApiWindow)
        toolWindow.contentManager.addContent(content)
    }

}

1 Like

This is a known issue: https://youtrack.jetbrains.com/issue/MP-7604

Edit: Linked to correct issue