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

Camelcade / Perl5-IDEA / #525521637

21 Jul 2025 12:07PM UTC coverage: 82.347% (+0.08%) from 82.266%
#525521637

push

github

hurricup
#2842 Moved embedded perl extensions

30964 of 37602 relevant lines covered (82.35%)

0.82 hits per line

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

0.0
/plugin/backend/src/main/java/com/perl5/lang/perl/idea/sdk/versionManager/PerlInstallAction.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.sdk.versionManager;
18

19
import com.intellij.openapi.actionSystem.AnActionEvent;
20
import com.intellij.openapi.project.DumbAware;
21
import com.intellij.openapi.projectRoots.Sdk;
22
import com.perl5.PerlBundle;
23
import com.perl5.lang.perl.idea.actions.PerlActionBase;
24
import com.perl5.lang.perl.idea.project.PerlProjectManager;
25
import com.perl5.lang.perl.idea.sdk.host.PerlHostData;
26
import org.jetbrains.annotations.NotNull;
27
import org.jetbrains.annotations.Nullable;
28

29
import java.util.Objects;
30

31
public class PerlInstallAction extends PerlActionBase implements DumbAware {
32
  public PerlInstallAction() {
33
    super(PerlBundle.message("perl.vm.install.perl"));
×
34
  }
×
35

36
  @Override
37
  public void update(@NotNull AnActionEvent event) {
38
    super.update(event);
×
39
    InstallPerlHandler installHandler = getHandler(event);
×
40
    event.getPresentation().setIcon(installHandler == null ? null : installHandler.getVersionManageHandler().getIcon());
×
41
  }
×
42

43
  @Override
44
  protected boolean alwaysHideDisabled() {
45
    return true;
×
46
  }
47

48
  @Override
49
  protected boolean isEnabled(@NotNull AnActionEvent event) {
50
    return getHandler(event) != null;
×
51
  }
52

53
  private @Nullable InstallPerlHandler getHandler(AnActionEvent event) {
54
    Sdk perlSdk = PerlProjectManager.getSdk(event);
×
55
    return perlSdk == null ? null : PerlVersionManagerData.notNullFrom(perlSdk).getInstallPerlHandler();
×
56
  }
57

58
  @Override
59
  public void actionPerformed(@NotNull AnActionEvent e) {
60
    InstallPerlHandler handler = getHandler(e);
×
61
    if (handler != null) {
×
62
      handler.install(Objects.requireNonNull(PerlHostData.from(PerlProjectManager.getSdk(e))), Objects.requireNonNull(e.getProject()));
×
63
    }
64
  }
×
65
}
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