private bool VisitPrimaryContext(PrimaryContext ctx) { var nodeText = ctx.GetText(); if (PaintCodeColorClassMembers.Contains(nodeText)) { _rewriter.Replace(ctx.Start, ctx.Stop, nodeText.Pascalize()); } else if (ColorClassMethods.ContainsKey(nodeText)) { _rewriter.Replace(ctx.Start, ctx.Stop, $"Color.{ColorClassMethods[nodeText]}"); } else if (JavaConstantConventionRegex.IsMatch(nodeText)) { _rewriter.Replace(ctx.Start, ctx.Stop, $"Color.{nodeText.ToLowerInvariant().Pascalize()}"); } return(true); }