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

Camelcade / Perl5-IDEA / #525521723

01 Dec 2025 06:47AM UTC coverage: 75.985% (+0.002%) from 75.983%
#525521723

push

github

hurricup
Build 253.28294.251

14764 of 22633 branches covered (65.23%)

Branch coverage included in aggregate %.

31095 of 37720 relevant lines covered (82.44%)

0.82 hits per line

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

66.67
/plugin/backend/src/main/java/com/perl5/lang/perl/idea/structureView/PerlStructureViewModel.java
1
/*
2
 * Copyright 2015-2023 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.structureView;
18

19
import com.intellij.ide.structureView.StructureViewModel;
20
import com.intellij.ide.structureView.StructureViewModelBase;
21
import com.intellij.ide.structureView.StructureViewTreeElement;
22
import com.intellij.ide.util.treeView.smartTree.Filter;
23
import com.intellij.ide.util.treeView.smartTree.Grouper;
24
import com.intellij.ide.util.treeView.smartTree.Sorter;
25
import com.intellij.openapi.editor.Editor;
26
import com.intellij.psi.PsiFile;
27
import com.perl5.lang.perl.idea.structureView.elements.PerlLeafStructureViewElement;
28
import com.perl5.lang.perl.idea.structureView.elements.PerlStructureViewElement;
29
import com.perl5.lang.perl.idea.structureView.filters.*;
30
import com.perl5.lang.perl.idea.structureView.groupers.PerlAttributeGrouper;
31
import org.jetbrains.annotations.NotNull;
32

33

34
public class PerlStructureViewModel extends StructureViewModelBase implements StructureViewModel.ElementInfoProvider {
35
  private static final Filter[] FILTERS = new Filter[]{
1✔
36
    PerlPodFilter.INSTANCE,
37
    PerlVariableFilter.INSTANCE,
38
    PerlGlobFilter.INSTANCE,
39
    PerlConstantFilter.INSTANCE,
40
    PerlMethodFilter.INSTANCE,
41
    PerlDeclarationFilter.INSTANCE,
42
    PerlInheritedFilter.INSTANCE,
43
    PerlImportedFilter.INSTANCE
44
  };
45

46
  private static final Grouper[] GROUPERS = new Grouper[]{
1✔
47
    new PerlAttributeGrouper()
48
  };
49

50
  public PerlStructureViewModel(PsiFile psiFile, Editor editor) {
51
    super(psiFile, editor, new PerlStructureViewElement(psiFile) {
1✔
52
    });
53
  }
1✔
54

55
  @Override
56
  public Sorter @NotNull [] getSorters() {
57
    return new Sorter[]{Sorter.ALPHA_SORTER};
×
58
  }
59

60
  @Override
61
  public Grouper @NotNull [] getGroupers() {
62
    return GROUPERS;
1!
63
  }
64

65
  @Override
66
  public Filter @NotNull [] getFilters() {
67
    return FILTERS;
1!
68
  }
69

70
  @Override
71
  public boolean isAlwaysShowsPlus(StructureViewTreeElement structureViewTreeElement) {
72
    return false;
1✔
73
  }
74

75
  @Override
76
  public boolean isAlwaysLeaf(StructureViewTreeElement structureViewTreeElement) {
77
    return structureViewTreeElement instanceof PerlLeafStructureViewElement;
1✔
78
  }
79
}
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