void (@NotNull PsiElement element, @NotNull String newName, @NotNull Map<PsiElement, String> allRenames) { if (element instanceof GroovyFile) { final PsiClass script = ((GroovyFile)element).getScriptClass(); if (script != null && script.isValid()) { final String scriptName = FileUtilRt.getNameWithoutExtension(newName); if (StringUtil.isJavaIdentifier(scriptName)) { allRenames.put(script, scriptName); } } } }