private function initializeWriter(WriterAbstract $writer, ProjectDescriptor $project)
    {
        $event = WriterInitializationEvent::createInstance($this)->setWriter($writer);
        Dispatcher::getInstance()->dispatch(self::EVENT_PRE_INITIALIZATION, $event);

        if ($writer instanceof Initializable) {
            $writer->initialize($project);
        }

        Dispatcher::getInstance()->dispatch(self::EVENT_POST_INITIALIZATION, $event);
    }