use of org.ballerinalang.plugins.idea.psi.ValueTypeNameNode in project ballerina by ballerina-lang.
the class BallerinaAnnotator method annotateConstants.
private void annotateConstants(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
ValueTypeNameNode valueTypeNameNode = PsiTreeUtil.findChildOfType(element, ValueTypeNameNode.class);
if (valueTypeNameNode == null || valueTypeNameNode.getText().isEmpty()) {
return;
}
PsiElement nameIdentifier = ((ConstantDefinitionNode) element).getNameIdentifier();
if (nameIdentifier == null) {
return;
}
Annotation annotation = holder.createInfoAnnotation(nameIdentifier, null);
annotation.setTextAttributes(BallerinaSyntaxHighlightingColors.CONSTANT);
}
Aggregations