boolean (Context context, PsiElement from, PsiExpression returnValue) { if (from instanceof PsiDeclarationStatement) { final PsiElement[] declaredElements = ((PsiDeclarationStatement)from).getDeclaredElements(); if (declaredElements.length == 1 && declaredElements[0] instanceof PsiVariable) { context.setInitializer((PsiVariable)declaredElements[0], returnValue); return true; } } return false; }