diff --git a/src/main/kotlin/com/vaadin/plugin/actions/DebugUsingHotSwapAgentAction.kt b/src/main/kotlin/com/vaadin/plugin/actions/DebugUsingHotSwapAgentAction.kt index af46af2..ca5ec62 100644 --- a/src/main/kotlin/com/vaadin/plugin/actions/DebugUsingHotSwapAgentAction.kt +++ b/src/main/kotlin/com/vaadin/plugin/actions/DebugUsingHotSwapAgentAction.kt @@ -3,29 +3,12 @@ package com.vaadin.plugin.actions import com.intellij.execution.Executor import com.intellij.execution.ExecutorRegistry import com.intellij.execution.dashboard.actions.ExecutorAction -import com.intellij.execution.dashboard.tree.RunConfigurationNode import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.actionSystem.PlatformCoreDataKeys import com.vaadin.plugin.hotswapagent.HotswapAgentExecutor import com.vaadin.plugin.utils.VaadinIcons -import org.jetbrains.idea.maven.execution.MavenRunConfiguration -import org.jetbrains.plugins.gradle.service.execution.GradleRunConfiguration class DebugUsingHotSwapAgentAction : ExecutorAction() { override fun update(event: AnActionEvent, isRunning: Boolean) { - if (event.dataContext.getData(PlatformCoreDataKeys.SELECTED_ITEM) != null) { - if (event.dataContext.getData(PlatformCoreDataKeys.SELECTED_ITEM) is RunConfigurationNode) { - val runConfiguration = - (event.dataContext.getData(PlatformCoreDataKeys.SELECTED_ITEM) as RunConfigurationNode) - .configurationSettings - .configuration - if (runConfiguration is MavenRunConfiguration || runConfiguration is GradleRunConfiguration) { - event.presentation.isVisible = false - event.presentation.text = null - return - } - } - } if (isRunning) { event.presentation.text = "Rerun using HotSwapAgent" event.presentation.icon = VaadinIcons.RERUN_HOTSWAP diff --git a/src/main/kotlin/com/vaadin/plugin/hotswapagent/HotswapAgentExecutor.kt b/src/main/kotlin/com/vaadin/plugin/hotswapagent/HotswapAgentExecutor.kt index eb4dac7..fe1d7aa 100644 --- a/src/main/kotlin/com/vaadin/plugin/hotswapagent/HotswapAgentExecutor.kt +++ b/src/main/kotlin/com/vaadin/plugin/hotswapagent/HotswapAgentExecutor.kt @@ -1,13 +1,8 @@ package com.vaadin.plugin.hotswapagent -import com.intellij.execution.JavaRunConfigurationBase -import com.intellij.execution.RunManager import com.intellij.execution.executors.DefaultDebugExecutor -import com.intellij.openapi.project.Project import com.vaadin.plugin.utils.VaadinIcons import javax.swing.Icon -import org.jetbrains.idea.maven.execution.MavenRunConfiguration -import org.jetbrains.plugins.gradle.service.execution.GradleRunConfiguration class HotswapAgentExecutor : DefaultDebugExecutor() { @@ -54,10 +49,4 @@ class HotswapAgentExecutor : DefaultDebugExecutor() { override fun getDisabledIcon(): Icon { return super.getDisabledIcon() } - - override fun isApplicable(project: Project): Boolean { - val selectedConfiguration = RunManager.getInstance(project).selectedConfiguration?.configuration - return selectedConfiguration is JavaRunConfigurationBase && - (selectedConfiguration !is MavenRunConfiguration || selectedConfiguration !is GradleRunConfiguration) - } }