use of org.jboss.tools.hibernate.orm.test.utils.project.TestProject in project jbosstools-hibernate by jbosstools.
the class HBMInfoExtractorTest method setUp.
@Before
public void setUp() throws Exception {
// $NON-NLS-1$
testProj = new TestProject("HBMInfoProj" + System.currentTimeMillis());
IPackageFragmentRoot sourcePackageFragment = testProj.createSourceFolder();
List<IPath> libs = testProj.copyLibs(testProj.getFolder("lib"));
testProj.generateClassPath(libs, sourcePackageFragment);
testProj.fullBuild();
sourceLocator = new HBMInfoExtractorStub(RuntimeServiceManager.getInstance().getDefaultService());
}
use of org.jboss.tools.hibernate.orm.test.utils.project.TestProject in project jbosstools-hibernate by jbosstools.
the class MappingTestHelper method setUp.
public void setUp() throws Exception {
testProject = new TestProject("JUnitTestProj" + System.currentTimeMillis());
String consoleConfigName = testProject.getIProject().getName();
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(// $NON-NLS-1$
PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.ui.resourcePerspective"));
IPackagesViewPart packageExplorer = null;
try {
packageExplorer = (IPackagesViewPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(JavaUI.ID_PACKAGES);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
packageExplorer.selectAndReveal(testProject.getIJavaProject());
configureTestProject();
createCfgXMLFile();
copyHbmXmlAndJavaFiles();
IPath cfgFilePath = new Path(testProject.getIProject().getName() + File.separator + TestProject.SRC_FOLDER + File.separator + ConsoleConfigUtils.CFG_FILE_NAME);
ConsoleConfigUtils.createConsoleConfig(consoleConfigName, cfgFilePath, testProject.getIProject().getName());
ProjectUtils.toggleHibernateOnProject(testProject.getIProject(), true, consoleConfigName);
testProject.fullBuild();
}
use of org.jboss.tools.hibernate.orm.test.utils.project.TestProject in project jbosstools-hibernate by jbosstools.
the class AnnotationsMappingTestHelper method beforeClass.
public void beforeClass() throws Exception {
testProject = new TestProject("JUnitTestProj" + System.currentTimeMillis());
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(// $NON-NLS-1$
PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.ui.resourcePerspective"));
IPackagesViewPart packageExplorer = null;
try {
packageExplorer = (IPackagesViewPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(JavaUI.ID_PACKAGES);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
packageExplorer.selectAndReveal(testProject.getIJavaProject());
IPackageFragmentRoot sourcePackageFragment = testProject.createSourceFolder();
createCfgXMLFile();
copyHbmXmlAndJavaFiles();
List<IPath> libs = testProject.copyLibs(testProject.getFolder("lib"));
testProject.generateClassPath(libs, sourcePackageFragment);
testProject.fullBuild();
}
use of org.jboss.tools.hibernate.orm.test.utils.project.TestProject in project jbosstools-hibernate by jbosstools.
the class CoreMappingTestHelper method beforeClass.
public void beforeClass() throws Exception {
testProject = new TestProject("JUnitTestProj" + System.currentTimeMillis());
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(// $NON-NLS-1$
PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.ui.resourcePerspective"));
IPackagesViewPart packageExplorer = null;
try {
packageExplorer = (IPackagesViewPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(JavaUI.ID_PACKAGES);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
packageExplorer.selectAndReveal(testProject.getIJavaProject());
configureTestProject();
copyHbmXmlAndJavaFiles();
}
use of org.jboss.tools.hibernate.orm.test.utils.project.TestProject in project jbosstools-hibernate by jbosstools.
the class JpaMappingTestHelper method beforeClass.
public void beforeClass() throws Exception {
testProject = new TestProject("JUnitTestProj" + System.currentTimeMillis());
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(// $NON-NLS-1$
PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.ui.resourcePerspective"));
IPackagesViewPart packageExplorer = null;
try {
packageExplorer = (IPackagesViewPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(JavaUI.ID_PACKAGES);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
packageExplorer.selectAndReveal(testProject.getIJavaProject());
configureTestProject();
copyHbmXmlAndJavaFiles();
}
Aggregations