void (@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; if (!(startElement instanceof XmlAttribute attribute)) return; final List<PsiMethod> eventHandlerMethods = getEventHandlerMethods(attribute); if (eventHandlerMethods.size() != 1) return; final PsiMethod method = eventHandlerMethods.get(0); final PsiParameter[] parameters = method.getParameterList().getParameters(); if (parameters.length != 1) return; final String parameterName = parameters[0].getName(); final PsiClassType declaredType = JavaFxPsiUtil.getDeclaredEventType(attribute); if (declaredType == null) return; final ParameterInfoImpl parameterInfo = ParameterInfoImpl.create(0).withName(parameterName).withType(declaredType); if (ApplicationManager.getApplication().isUnitTestMode()) { final ChangeSignatureProcessor processor = new ChangeSignatureProcessor(project, method, false, null, method.getName(), method.getReturnType(), new ParameterInfoImpl[]{parameterInfo}); processor.run(); } else { final List<ParameterInfoImpl> parameterInfos = Collections.singletonList(parameterInfo); final JavaChangeSignatureDialog dialog = JavaChangeSignatureDialog.createAndPreselectNew(project, method, parameterInfos, false, null); dialog.setParameterInfos(parameterInfos); dialog.show(); } }