Skip to content

Commit

Permalink
only show Refresh for active contexts (#702)
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Jan 10, 2024
1 parent db478b1 commit 9c92e5b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.progress.Progressive
import com.redhat.devtools.intellij.common.actions.StructureTreeAction
import com.redhat.devtools.intellij.kubernetes.model.context.IActiveContext
import com.redhat.devtools.intellij.kubernetes.telemetry.TelemetryService
import com.redhat.devtools.intellij.kubernetes.telemetry.TelemetryService.sendTelemetry
import com.redhat.devtools.intellij.kubernetes.tree.util.getResourceKind
import javax.swing.tree.TreePath

class RefreshAction : StructureTreeAction(Any::class.java) {
class RefreshAction : StructureTreeAction(IActiveContext::class.java) {

override fun actionPerformed(event: AnActionEvent?, path: TreePath?, selectedNode: Any?) {
val descriptor = selectedNode?.getDescriptor() ?: return
Expand Down

0 comments on commit 9c92e5b

Please sign in to comment.