mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[platform] making the "Analyze" button in internal error dialog visible in IJ and plugin projects
(cherry-picked from commit 7c19b50dd65439519f04e5f34b10cea3985b2522) IJ-CR-149029 GitOrigin-RevId: c2316d10d39dc2a605a6e4974f9b782dcfb3bf57
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5f4980f553
commit
107779f96b
@@ -2,7 +2,6 @@
|
||||
package com.intellij.diagnostic
|
||||
|
||||
import com.intellij.CommonBundle
|
||||
import com.intellij.diagnostic.IdeErrorsDialog.ReportAction.entries
|
||||
import com.intellij.diagnostic.MessagePool.TooManyErrorsException
|
||||
import com.intellij.icons.AllIcons
|
||||
import com.intellij.ide.DataManager
|
||||
@@ -28,7 +27,9 @@ import com.intellij.openapi.extensions.ExtensionPointName
|
||||
import com.intellij.openapi.extensions.ExtensionPointName.Companion.create
|
||||
import com.intellij.openapi.extensions.PluginId
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.IntelliJProjectUtil
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.project.ProjectTypeService
|
||||
import com.intellij.openapi.ui.DialogWrapper
|
||||
import com.intellij.openapi.ui.LoadingDecorator
|
||||
import com.intellij.openapi.ui.Messages
|
||||
@@ -309,15 +310,14 @@ open class IdeErrorsDialog @ApiStatus.Internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun createLeftSideActions(): Array<Action> {
|
||||
if (myProject != null && !myProject.isDefault && PluginManagerCore.isPluginInstalled(PluginId.getId(ITNProxy.EA_PLUGIN_ID))) {
|
||||
@Suppress("UnresolvedPluginConfigReference")
|
||||
ActionManager.getInstance().getAction("Unscramble")?.let {
|
||||
return arrayOf(AnalyzeAction(it))
|
||||
override fun createLeftSideActions(): Array<Action> =
|
||||
ActionManager.getInstance().getAction("Unscramble")
|
||||
?.takeIf {
|
||||
IntelliJProjectUtil.isIntelliJPlatformProject(myProject) ||
|
||||
ProjectTypeService.getProjectTypes(myProject).any { it.id == "INTELLIJ_PLUGIN" } // `DevKitProjectTypeProvider.IDE_PLUGIN_PROJECT`
|
||||
}
|
||||
}
|
||||
return emptyArray()
|
||||
}
|
||||
?.let { arrayOf(AnalyzeAction(it)) }
|
||||
?: emptyArray()
|
||||
|
||||
override fun getDimensionServiceKey(): String? = "IDE.errors.dialog"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user