blob: c2037debdd48a0cae31d8076aa6cf5f2f0e94e10 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2018 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.cdo.benchmarks.tests;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.URI;
import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
/**
* @author VL222926
*
*/
public class PapyrusModelCreation extends AbstractModelCreation {
/**
* @see org.eclipse.papyrus.cdo.perfo.tests.impl.IPapyrusModelCreation#initPapyrusEnvironnement(java.lang.String, java.lang.String, List<String>)
*
* @param folderName
* @param modelName
* @throws Exception
*/
@Override
public void initPapyrusEnvironnement(String folderName, String modelName, List<String> profilesName) throws Exception {
createProject(folderName);
createModelSet(folderName, modelName, profilesName);
}
private void createProject(final String projectName) throws CoreException {
IProgressMonitor progressMonitor = new NullProgressMonitor();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject(projectName);
project.create(progressMonitor);
project.open(progressMonitor);
}
/**
* @see org.eclipse.papyrus.cdo.benchmarks.tests.AbstractModelCreation#createBaseURI()
*
* @return
*/
@Override
protected URI createBaseURI() {
return null;
}
}