File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/io/protostuff/jetbrains/plugin/psi Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11package io .protostuff .jetbrains .plugin .psi ;
22
33import com .intellij .lang .ASTNode ;
4+ import com .intellij .psi .PsiElement ;
45import org .antlr .jetbrains .adapter .psi .ANTLRPsiNode ;
56import org .jetbrains .annotations .NotNull ;
67
8+ import java .util .ArrayList ;
9+ import java .util .Collection ;
10+ import java .util .List ;
11+
12+ import static io .protostuff .jetbrains .plugin .ProtoParserDefinition .R_FIELD_MODIFIER ;
13+
714/**
815 * @author Kostiantyn Shchepanovskyi
916 */
@@ -13,4 +20,15 @@ public GroupNode(@NotNull ASTNode node) {
1320 super (node );
1421 }
1522
23+ @ Override
24+ public Collection <PsiElement > keywords () {
25+ ASTNode node = getNode ();
26+ List <PsiElement > result = new ArrayList <>();
27+ result .addAll (Util .findKeywords (getNode ()));
28+ ASTNode fieldModifier = node .findChildByType (R_FIELD_MODIFIER );
29+ if (fieldModifier != null ) {
30+ result .addAll (Util .findKeywords (fieldModifier ));
31+ }
32+ return result ;
33+ }
1634}
You can’t perform that action at this time.
0 commit comments