void (final GuiEditor editor, final RadComponent insertedComponent) { // Try to create field in the corresponding bound class final String classToBind = editor.getRootContainer().getClassToBind(); if (classToBind != null) { final PsiClass aClass = FormEditingUtil.findClassToBind(editor.getModule(), classToBind); if (aClass != null && aClass.findFieldByName(insertedComponent.getBinding(), true) == null) { if (!FileModificationService.getInstance().preparePsiElementForWrite(aClass)) { return; } ApplicationManager.getApplication().runWriteAction( () -> CreateFieldFix.runImpl(editor.getProject(), editor.getRootContainer(), aClass, insertedComponent.getComponentClassName(), insertedComponent.getBinding(), false, // silently skip all errors (if any) null) ); } } }