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

Camelcade / Perl5-IDEA / #525521660

24 Aug 2025 01:28PM UTC coverage: 75.89% (-6.3%) from 82.227%
#525521660

push

github

hurricup
Migrated coverage reporting to https://github.com/nbaztec/coveralls-jacoco-gradle-plugin

See: https://github.com/kt3k/coveralls-gradle-plugin/issues/119

14751 of 22639 branches covered (65.16%)

Branch coverage included in aggregate %.

31091 of 37767 relevant lines covered (82.32%)

0.82 hits per line

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

77.78
/plugin/backend/src/main/java/com/perl5/lang/perl/idea/annotators/PerlBaseAnnotator.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.annotators;
18

19
import com.intellij.codeInspection.util.InspectionMessage;
20
import com.intellij.lang.annotation.AnnotationBuilder;
21
import com.intellij.lang.annotation.AnnotationHolder;
22
import com.intellij.lang.annotation.Annotator;
23
import com.intellij.lang.annotation.HighlightSeverity;
24
import com.intellij.openapi.editor.colors.CodeInsightColors;
25
import com.intellij.openapi.editor.colors.EditorColorsManager;
26
import com.intellij.openapi.editor.colors.EditorColorsScheme;
27
import com.intellij.openapi.editor.colors.TextAttributesKey;
28
import com.intellij.openapi.editor.markup.TextAttributes;
29
import com.intellij.psi.PsiElement;
30
import org.jetbrains.annotations.NotNull;
31
import org.jetbrains.annotations.Nullable;
32

33

34
public abstract class PerlBaseAnnotator implements Annotator {
1✔
35
  final EditorColorsScheme currentScheme = EditorColorsManager.getInstance().getGlobalScheme();
1✔
36

37
  public TextAttributes adjustTextAttributes(TextAttributes textAttributes, boolean isDeprecated) {
38
    if (isDeprecated) {
1!
39
      textAttributes = TextAttributes.merge(textAttributes, currentScheme.getAttributes(CodeInsightColors.DEPRECATED_ATTRIBUTES));
×
40
    }
41
    return textAttributes;
1✔
42
  }
43

44
  public static void createInfoAnnotation(@NotNull AnnotationHolder holder,
45
                                          @Nullable PsiElement element,
46
                                          @InspectionMessage @Nullable String message,
47
                                          @NotNull TextAttributesKey key) {
48
    if (element == null) {
1!
49
      return;
×
50
    }
51
    AnnotationBuilder annotationBuilder = message == null ?
1✔
52
                                          holder.newSilentAnnotation(HighlightSeverity.INFORMATION) :
1✔
53
                                          holder.newAnnotation(HighlightSeverity.INFORMATION, message);
1✔
54
    annotationBuilder.range(element).textAttributes(key).create();
1✔
55
  }
1✔
56
}
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