File tree Expand file tree Collapse file tree 4 files changed +39
-3
lines changed
java/org/swim/annotations Expand file tree Collapse file tree 4 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ apply plugin: 'org.jetbrains.grammarkit'
14
14
sourceSets. main. java. srcDirs ' src/main/gen'
15
15
16
16
group ' org.swim'
17
- version ' 1.2.0 '
17
+ version ' 1.2.1 '
18
18
19
19
repositories {
20
20
mavenCentral()
@@ -27,7 +27,7 @@ dependencies {
27
27
28
28
// See https://github.com/JetBrains/gradle-intellij-plugin/
29
29
intellij {
30
- version = ' 2021.3'
30
+ version = ' 2021.3.1 '
31
31
plugins = [' PsiViewer:213-SNAPSHOT' , ' com.intellij.java' ]
32
32
updateSinceUntilBuild = false
33
33
}
Original file line number Diff line number Diff line change
1
+ package org .swim .annotations ;
2
+
3
+ import com .intellij .codeInspection .ProblemHighlightType ;
4
+ import com .intellij .lang .annotation .AnnotationHolder ;
5
+ import com .intellij .lang .annotation .Annotator ;
6
+ import com .intellij .lang .annotation .HighlightSeverity ;
7
+ import com .intellij .psi .PsiElement ;
8
+ import com .intellij .psi .PsiErrorElement ;
9
+ import org .jetbrains .annotations .NotNull ;
10
+
11
+ public class ReconAnnotator implements Annotator {
12
+ @ Override
13
+ public void annotate (@ NotNull PsiElement element , @ NotNull AnnotationHolder holder ) {
14
+
15
+ if (element instanceof PsiErrorElement ) {
16
+ holder .newAnnotation (HighlightSeverity .ERROR , "Unexpected character" )
17
+ .range (element .getTextRange ())
18
+ .highlightType (ProblemHighlightType .GENERIC_ERROR )
19
+ .create ();
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ package org .swim .annotations ;
2
+
3
+ import com .intellij .codeInsight .highlighting .HighlightErrorFilter ;
4
+ import com .intellij .psi .PsiErrorElement ;
5
+ import org .jetbrains .annotations .NotNull ;
6
+
7
+ public class ReconHighlightErrorFilter extends HighlightErrorFilter {
8
+ @ Override
9
+ public boolean shouldHighlightErrorElement (@ NotNull PsiErrorElement element ) {
10
+ return false ;
11
+ }
12
+ }
Original file line number Diff line number Diff line change 1
1
<idea-plugin >
2
2
<id >org.swim.recon</id >
3
3
<name >Recon</name >
4
- <
vendor email =
" [email protected] " url =
" https://www.swim.ai/" >Swim
.AI </
vendor >
4
+ <
vendor email =
" [email protected] " url =
" https://www.swim.ai/" >Swim</
vendor >
5
5
6
6
<description ><![CDATA[ Recon language support.
7
7
Recon is object notation with attributes, like if JSON and XML had a baby.]]>
26
26
<codeStyleSettingsProvider implementation =" org.swim.settings.ReconCodeStyleSettingsProvider" />
27
27
<langCodeStyleSettingsProvider
28
28
implementation =" org.swim.settings.ReconLanguageCodeStyleSettingsProvider" />
29
+ <annotator language =" Recon" implementationClass =" org.swim.annotations.ReconAnnotator" />
30
+ <highlightErrorFilter implementation =" org.swim.annotations.ReconHighlightErrorFilter" />
29
31
</extensions >
30
32
31
33
<actions >
You can’t perform that action at this time.
0 commit comments