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

Camelcade / Perl5-IDEA / #525521551

26 May 2025 11:24AM UTC coverage: 82.32% (+0.001%) from 82.319%
#525521551

push

github

hurricup
Migrated to the presentation property

1 of 1 new or added line in 1 file covered. (100.0%)

148 existing lines in 15 files now uncovered.

30897 of 37533 relevant lines covered (82.32%)

0.82 hits per line

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

46.67
/plugin/core/src/main/java/com/perl5/lang/perl/psi/impl/PerlImplicitElement.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.psi.impl;
18

19
import com.intellij.navigation.ItemPresentation;
20
import com.intellij.psi.PsiElement;
21
import com.intellij.psi.PsiFile;
22
import com.intellij.psi.PsiManager;
23
import com.intellij.psi.impl.light.LightElement;
24
import com.perl5.lang.perl.PerlLanguage;
25
import com.perl5.lang.perl.idea.presentations.PerlItemPresentationSimple;
26
import org.jetbrains.annotations.NotNull;
27
import org.jetbrains.annotations.Nullable;
28

29
import java.util.Objects;
30

31
public abstract class PerlImplicitElement extends LightElement {
32
  private final @Nullable PsiElement myParent;
33

34

35
  public PerlImplicitElement(@NotNull PsiManager manager,
36
                             @Nullable PsiElement parent) {
37
    super(manager, PerlLanguage.INSTANCE);
1✔
38
    myParent = parent;
1✔
39
  }
1✔
40

41
  @Override
42
  public @Nullable PsiElement getParent() {
43
    return myParent;
1✔
44
  }
45

46
  @Override
47
  public int getTextOffset() {
UNCOV
48
    return getParent() == null ? 0 : getParent().getTextOffset();
×
49
  }
50

51
  @Override
52
  public PsiFile getContainingFile() {
53
    PsiElement parent = getParent();
1✔
54
    return parent == null ? null : parent.getContainingFile();
1✔
55
  }
56

57
  @Override
58
  public ItemPresentation getPresentation() {
UNCOV
59
    return new PerlItemPresentationSimple(this, getName());
×
60
  }
61

62

63
  @Override
64
  public boolean equals(Object o) {
UNCOV
65
    if (this == o) {
×
66
      return true;
×
67
    }
UNCOV
68
    if (o == null || getClass() != o.getClass()) {
×
UNCOV
69
      return false;
×
70
    }
71

72
    PerlImplicitElement element = (PerlImplicitElement)o;
×
73

UNCOV
74
    return Objects.equals(myParent, element.myParent);
×
75
  }
76

77
  @Override
78
  public int hashCode() {
79
    return myParent != null ? myParent.hashCode() : 0;
1✔
80
  }
81
}
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