• 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

0.0
/tt2/backend/src/main/java/com/perl5/lang/tt2/idea/highlighting/TemplateToolkitSyntaxAnnotator.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.tt2.idea.highlighting;
18

19
import com.intellij.lang.annotation.AnnotationHolder;
20
import com.intellij.lang.annotation.Annotator;
21
import com.intellij.openapi.editor.colors.TextAttributesKey;
22
import com.intellij.psi.PsiElement;
23
import com.intellij.psi.tree.IElementType;
24
import com.perl5.lang.perl.idea.annotators.PerlBaseAnnotator;
25
import com.perl5.lang.tt2.lexer.TemplateToolkitSyntaxElements;
26
import org.jetbrains.annotations.NotNull;
27

28
import static com.perl5.lang.tt2.elementTypes.TemplateToolkitElementTypes.BLOCK_COMMENT;
29
import static com.perl5.lang.tt2.parser.TemplateToolkitElementTypesGenerated.*;
30

31

32
public class TemplateToolkitSyntaxAnnotator implements Annotator {
×
33
  @Override
34
  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
35
    IElementType tokenType = element.getNode().getElementType();
×
36
    TextAttributesKey targetKey = null;
×
37
    if (tokenType == TT2_IDENTIFIER || tokenType == TT2_SIGIL_SCALAR) {
×
38
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_IDENTIFIER_KEY;
×
39
    }
40
    else if (TemplateToolkitSyntaxElements.KEYWORDS_TOKENSET.contains(tokenType)) {
×
41
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_KEYWORD_KEY;
×
42
    }
43
    else if (TemplateToolkitSyntaxElements.ALL_OPERATORS_TOKENSET.contains(tokenType)) {
×
44
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_OPERATOR_KEY;
×
45
    }
46
    else if (tokenType == SQ_STRING_EXPR) {
×
47
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_SQ_STRING_KEY;
×
48
    }
49
    else if (tokenType == DQ_STRING_EXPR) {
×
50
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_DQ_STRING_KEY;
×
51
    }
52
    else if (tokenType == BLOCK_COMMENT) {
×
53
      targetKey = TemplateToolkitSyntaxHighlighter.TT2_COMMENT_KEY;
×
54
    }
55
    if (targetKey != null) {
×
56
      PerlBaseAnnotator.createInfoAnnotation(holder, element, null, targetKey);
×
57
    }
58
  }
×
59
}
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