public function export($instances, $selfedit="false") {
		if ($selfedit == "true") {
			$moufManager = MoufManager::getMoufManager();
		} else {
			$moufManager = MoufManager::getMoufManagerHiddenInstance();
		}
		
		$instancesList = explode("\n", $instances);
		$cleaninstancesList = array();
		foreach ($instancesList as $instance) {
			$instance = trim($instance, "\r ");
			if (!empty($instance)) {
				$cleaninstancesList[] = $instance;
			}
		}

		$exportService = new ExportService();
		$this->generatedCode = $exportService->export($cleaninstancesList, $moufManager);
	}