mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
25 lines
924 B
Java
25 lines
924 B
Java
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
|
package com.intellij.platform.execution.serviceView;
|
|
|
|
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
|
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
|
import com.intellij.openapi.project.DumbAware;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import static com.intellij.platform.execution.serviceView.ServiceViewActionProvider.getSelectedView;
|
|
|
|
final class AddServiceActionGroup extends DefaultActionGroup implements DumbAware {
|
|
|
|
@Override
|
|
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
|
return ActionUpdateThread.BGT;
|
|
}
|
|
|
|
@Override
|
|
public void update(@NotNull AnActionEvent e) {
|
|
e.getPresentation().setEnabled(getSelectedView(e) != null);
|
|
e.getPresentation().setPerformGroup(false);
|
|
}
|
|
}
|