public function populateWorkspace(
        Workspace $workspace,
        Configuration $configuration,
        Directory $root,
        array $entityRoles,
        $isValidated = false,
        $importRoles = true
    )
    {
        $this->om->startFlushSuite();
        $data = $configuration->getData();
        $data = $this->reorderData($data);
        //now we need to reorder the data because well...

        //refactor how workspace are created because this sucks
        $this->data = $configuration->getData();
        $this->workspace = $workspace;
        $this->setImporters($configuration, $data);
        $this->setWorkspaceForImporter($workspace);

        if (!$isValidated) {
            $this->validate($data, false);
        }

        if ($importRoles) {
            $importedRoles = $this->getImporterByName('roles')->import($data['roles'], $workspace);
            $this->om->forceFlush();
        }

        foreach ($entityRoles as $key => $entityRole) {
            $importedRoles[$key] = $entityRole;
        }

        $this->log('Importing tools...');
        $tools = $this->getImporterByName('tools')->import($data['tools'], $workspace, $importedRoles, $root);
        $this->om->endFlushSuite();
    }