DynamicElementSettings (GrArgumentLabel label, PsiClass targetClass) { DynamicElementSettings settings = new DynamicElementSettings(); assert targetClass != null; String className = targetClass.getQualifiedName(); className = className == null ? targetClass.getContainingFile().getName() : className; settings.setContainingClassName(className); settings.setName(label.getName()); return settings; }