• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Camelcade / Perl5-IDEA / #525521581

06 Jun 2025 08:26AM UTC coverage: 82.33% (-0.02%) from 82.354%
#525521581

push

github

hurricup
Moved debugger properties to the respective bundle

18 of 26 new or added lines in 8 files covered. (69.23%)

158 existing lines in 31 files now uncovered.

30858 of 37481 relevant lines covered (82.33%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/plugin/core/src/main/java/com/perl5/lang/perl/idea/actions/PerlInstallPackageActionBase.java
1
/*
2
 * Copyright 2015-2025 Alexandr Evstigneev
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.perl5.lang.perl.idea.actions;
18

19
import com.intellij.openapi.actionSystem.AnActionEvent;
20
import com.intellij.openapi.ui.Messages;
21
import com.intellij.openapi.util.text.StringUtil;
22
import com.perl5.PerlBundle;
23
import com.perl5.lang.perl.adapters.PackageManagerAdapter;
24
import org.jetbrains.annotations.NotNull;
25
import org.jetbrains.annotations.Nullable;
26

27
import java.util.Arrays;
28

29
public abstract class PerlInstallPackageActionBase extends PerlActionBase {
30

31
  public PerlInstallPackageActionBase(@NotNull String managerName) {
32
    super(PerlBundle.message("perl.action.install.packages", managerName));
×
33
  }
×
34

35
  @Override
36
  protected boolean isEnabled(@NotNull AnActionEvent event) {
37
    return super.isEnabled(event) && getAdapter(event) != null;
×
38
  }
39

40
  @Override
41
  protected boolean alwaysHideDisabled() {
42
    return true;
×
43
  }
44

45
  protected abstract @Nullable PackageManagerAdapter getAdapter(@NotNull AnActionEvent e);
46

47
  @Override
48
  public void actionPerformed(@NotNull AnActionEvent e) {
49
    PackageManagerAdapter packageManagerAdapter = getAdapter(e);
×
50
    if (packageManagerAdapter == null) {
×
51
      return;
×
52
    }
53

54
    String packageNames = Messages.showInputDialog(
×
55
      e.getProject(),
×
UNCOV
56
      PerlBundle.message("dialog.message.enter.packages.names"),
×
57
      getTemplatePresentation().getText(),
×
58
      null
59
    );
60

61
    if (StringUtil.isEmpty(packageNames)) {
×
62
      return;
×
63
    }
64

65
    packageManagerAdapter.queueInstall(Arrays.asList(packageNames.split("[\\s,;]+")), false);
×
66
  }
×
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc