boolean (final IComponent component) { if (component.getBinding() != null) { final PsiClass fieldClass = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(component.getComponentClassName(), scope); if (fieldClass != null) { PsiType fieldType = JavaPsiFacade.getInstance(psiManager.getProject()).getElementFactory().createType(fieldClass); try { PsiField field = JavaPsiFacade.getInstance(psiManager.getProject()).getElementFactory().createField(component.getBinding(), fieldType); formClass.add(field); } catch (IncorrectOperationException e) { exception.set(e); return false; } } } return true; }