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

Camelcade / Perl5-IDEA / #525521817

11 Apr 2026 04:54PM UTC coverage: 76.061% (+0.07%) from 75.988%
#525521817

push

github

hurricup
Disabled idempotence checking in tests.

I guess we can't achieve that because of names cache.

14772 of 22606 branches covered (65.35%)

Branch coverage included in aggregate %.

31104 of 37709 relevant lines covered (82.48%)

0.82 hits per line

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

35.71
/plugin/common/src/main/java/com/perl5/lang/perl/psi/light/PerlDelegatingLightElement.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.light;
18

19
import com.intellij.lang.Language;
20
import com.intellij.openapi.project.Project;
21
import com.intellij.openapi.util.TextRange;
22
import com.intellij.psi.*;
23
import com.intellij.psi.impl.light.LightElement;
24
import com.intellij.psi.scope.PsiScopeProcessor;
25
import com.intellij.psi.search.GlobalSearchScope;
26
import com.intellij.psi.search.SearchScope;
27
import com.intellij.psi.tree.IElementType;
28
import com.intellij.util.IncorrectOperationException;
29
import org.jetbrains.annotations.NotNull;
30
import org.jetbrains.annotations.Nullable;
31

32
import javax.swing.*;
33

34

35
public class PerlDelegatingLightElement<Delegate extends PsiElement> extends LightElement {
36
  private final IElementType myElementType;
37
  private final @NotNull Delegate myDelegate;
38

39
  public PerlDelegatingLightElement(@NotNull Delegate delegate, @NotNull IElementType elementType) {
40
    super(delegate.getManager(), delegate.getLanguage());
1✔
41
    myDelegate = delegate;
1✔
42
    myElementType = elementType;
1✔
43
  }
1✔
44

45
  public IElementType getElementType() {
46
    return myElementType;
1✔
47
  }
48

49
  public @NotNull Delegate getDelegate() {
50
    return myDelegate;
1!
51
  }
52

53
  @Override
54
  public String toString() {
55
    return getClass().getSimpleName() + "(" + getElementType().toString() + ")";
×
56
  }
57

58
  @Override
59
  public PsiElement getFirstChild() {
60
    return getDelegate().getFirstChild();
1✔
61
  }
62

63
  @Override
64
  public PsiElement getLastChild() {
65
    return getDelegate().getLastChild();
1✔
66
  }
67

68
  @Override
69
  public final PsiReference getReference() {
70
    return getDelegate().getReference();
×
71
  }
72

73
  @Override
74
  public final PsiReference @NotNull [] getReferences() {
75
    return getDelegate().getReferences();
×
76
  }
77

78
  @Override
79
  public PsiReference findReferenceAt(int offset) {
80
    return getDelegate().findReferenceAt(offset);
×
81
  }
82

83
  @Override
84
  public PsiElement addRange(PsiElement first, PsiElement last) throws IncorrectOperationException {
85
    return getDelegate().addRange(first, last);
×
86
  }
87

88
  @Override
89
  public PsiElement addRangeBefore(@NotNull PsiElement first, @NotNull PsiElement last, PsiElement anchor)
90
    throws IncorrectOperationException {
91
    return getDelegate().addRangeBefore(first, last, anchor);
×
92
  }
93

94
  @Override
95
  public PsiElement addRangeAfter(PsiElement first, PsiElement last, PsiElement anchor) throws IncorrectOperationException {
96
    return getDelegate().addRangeAfter(first, last, anchor);
×
97
  }
98

99
  @Override
100
  public void deleteChildRange(PsiElement first, PsiElement last) throws IncorrectOperationException {
101
    getDelegate().deleteChildRange(first, last);
×
102
  }
×
103

104
  @Override
105
  public boolean textContains(char c) {
106
    return getDelegate().textContains(c);
×
107
  }
108

109
  @Override
110
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
111
                                     @NotNull ResolveState state,
112
                                     PsiElement lastParent,
113
                                     @NotNull PsiElement place) {
114
    return getDelegate().processDeclarations(processor, state, lastParent, place);
×
115
  }
116

117
  @Override
118
  public PsiElement getContext() {
119
    return getDelegate().getContext();
×
120
  }
121

122
  @Override
123
  public @NotNull GlobalSearchScope getResolveScope() {
124
    return getDelegate().getResolveScope();
1!
125
  }
126

127
  @Override
128
  public @NotNull SearchScope getUseScope() {
129
    return getDelegate().getUseScope();
1!
130
  }
131

132
  @Override
133
  public @NotNull Project getProject() {
134
    return getDelegate().getProject();
1!
135
  }
136

137
  @Override
138
  public boolean isEquivalentTo(PsiElement another) {
139
    return getDelegate().isEquivalentTo(another);
1✔
140
  }
141

142
  @Override
143
  public @Nullable Icon getIcon(int flags) {
144
    return getDelegate().getIcon(flags);
×
145
  }
146

147
  @Override
148
  public @NotNull Language getLanguage() {
149
    return getDelegate().getLanguage();
1!
150
  }
151

152
  @Override
153
  public PsiManager getManager() {
154
    return getDelegate().getManager();
×
155
  }
156

157
  @Override
158
  public PsiElement getParent() {
159
    return getDelegate();
1✔
160
  }
161

162
  @Override
163
  public PsiFile getContainingFile() {
164
    return getDelegate().getContainingFile();
1✔
165
  }
166

167
  @Override
168
  public TextRange getTextRange() {
169
    return getDelegate().getTextRange();
×
170
  }
171

172
  @Override
173
  public int getStartOffsetInParent() {
174
    return getDelegate().getStartOffsetInParent();
×
175
  }
176

177
  @Override
178
  public char @NotNull [] textToCharArray() {
179
    return getDelegate().textToCharArray();
×
180
  }
181

182
  @Override
183
  public boolean textMatches(@NotNull CharSequence text) {
184
    return getDelegate().textMatches(text);
×
185
  }
186

187
  @Override
188
  public boolean textMatches(@NotNull PsiElement element) {
189
    return getDelegate().textMatches(element);
×
190
  }
191

192
  @Override
193
  public PsiElement findElementAt(int offset) {
194
    return getDelegate().findElementAt(offset);
×
195
  }
196

197
  @Override
198
  public int getTextOffset() {
199
    return getDelegate().getTextOffset();
×
200
  }
201

202
  @Override
203
  public boolean isWritable() {
204
    return getDelegate().isWritable();
×
205
  }
206

207
  @Override
208
  public PsiElement add(@NotNull PsiElement element) throws IncorrectOperationException {
209
    return getDelegate().add(element);
×
210
  }
211

212
  @Override
213
  public PsiElement addBefore(@NotNull PsiElement element, PsiElement anchor) throws IncorrectOperationException {
214
    return getDelegate().addBefore(element, anchor);
×
215
  }
216

217
  @Override
218
  public PsiElement addAfter(@NotNull PsiElement element, PsiElement anchor) throws IncorrectOperationException {
219
    return getDelegate().addAfter(element, anchor);
×
220
  }
221

222
  @Override
223
  public void delete() throws IncorrectOperationException {
224
    getDelegate().delete();
×
225
  }
×
226

227
  @Override
228
  public PsiElement replace(@NotNull PsiElement newElement) throws IncorrectOperationException {
229
    return getDelegate().replace(newElement);
×
230
  }
231

232
  @Override
233
  public String getText() {
234
    return getDelegate().getText();
×
235
  }
236

237
  @Override
238
  public PsiElement copy() {
239
    return getDelegate().copy();
×
240
  }
241

242
  @Override
243
  public @NotNull PsiElement getNavigationElement() {
244
    return getDelegate().getNavigationElement();
×
245
  }
246

247
  @Override
248
  public PsiElement getPrevSibling() {
249
    return getDelegate().getPrevSibling();
1✔
250
  }
251

252
  @Override
253
  public PsiElement getNextSibling() {
254
    return getDelegate().getNextSibling();
×
255
  }
256

257
  @Override
258
  public boolean equals(Object o) {
259
    if (!(o instanceof PerlDelegatingLightElement<?> lightElement)) {
1!
260
      return false;
×
261
    }
262

263
    return myDelegate.equals(lightElement.myDelegate);
1✔
264
  }
265

266
  @Override
267
  public int hashCode() {
268
    return getDelegate().hashCode();
1✔
269
  }
270
}
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