void (@NotNull PsiElement element, @NotNull String newName, @NotNull Map<PsiElement, String> allRenames, @NotNull SearchScope scope) { final NestedControllerCandidate nestedControllerCandidate = findNestedControllerCandidate(element); if (nestedControllerCandidate != null) { final Collection<PsiFile> fxmls = findFxmlWithController(nestedControllerCandidate); for (PsiFile fxml : fxmls) { final Ref<Boolean> found = new Ref<>(false); fxml.accept(new XmlRecursiveElementVisitor() { @Override public void visitXmlTag(@NotNull XmlTag tag) { super.visitXmlTag(tag); if (found.get()) return; if (FxmlConstants.FX_INCLUDE.equals(tag.getName())) { final String value = tag.getAttributeValue(FxmlConstants.FX_ID); if (StringUtil.equals(nestedControllerCandidate.fxId, value)) { found.set(true); } } } }); if (found.get()) { allRenames.put(nestedControllerCandidate.nestedControllerField, newName + FxmlConstants.CONTROLLER_SUFFIX); return; } } } }