NameSuggestionsField (GrVariable var) { List<String> names = new ArrayList<>(); if (var != null) { names.add(var.getName()); } names.addAll(suggestNames()); return new NameSuggestionsField(ArrayUtilRt.toStringArray(names), myProject, GroovyFileType.GROOVY_FILE_TYPE); }