// 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.
package com.intellij.execution.services;

import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import org.jetbrains.annotations.NotNull;

public class AddServiceActionGroup extends DefaultActionGroup {
  @Override
  public boolean canBePerformed(@NotNull DataContext context) {
    return false;
  }
}

@@ -176,16 +176,72 @@
 vices;%0A%0A
+import com.intellij.openapi.actionSystem.AnActionEvent;%0A
 import c
@@ -286,16 +286,16 @@
 ontext;%0A
-
 import c
@@ -394,71 +394,336 @@
 l;%0A%0A
-public class AddServiceActionGroup extends DefaultActionGroup %7B
+import static com.intellij.execution.services.ServiceViewActionProvider.getSelectedView;%0A%0Apublic class AddServiceActionGroup extends DefaultActionGroup %7B%0A  @Override%0A  public void update(@NotNull AnActionEvent e) %7B%0A    ServiceView selectedView = getSelectedView(e);%0A    e.getPresentation().setEnabled(selectedView != null);%0A  %7D%0A
 %0A  @

fix Add Service action group enablement