Search in sources :

Example 1 with SimpleTestProjectWithMapping

use of org.hibernate.eclipse.console.test.project.SimpleTestProjectWithMapping in project jbosstools-hibernate by jbosstools.

the class JavaHBMQueryTest method setUp.

protected void setUp() throws Exception {
    project = new SimpleTestProjectWithMapping(PROJ_NAME);
    IPackageFragmentRoot sourceFolder = project.createSourceFolder();
    IPackageFragment pf = sourceFolder.createPackageFragment(SimpleTestProject.PACKAGE_NAME, false, null);
    ConsoleConfigUtils.customizeCfgXmlForPack(pf);
    List<IPath> libs = new ArrayList<IPath>();
    project.generateClassPath(libs, sourceFolder);
    project.setDefaultConsoleConfiguration(CONSOLE_NAME);
    project.fullBuild();
    // setup console configuration
    IPath cfgFilePath = new Path(project.getIProject().getName() + File.separator + TestProject.SRC_FOLDER + File.separator + ConsoleConfigUtils.CFG_FILE_NAME);
    ConsoleConfigUtils.createConsoleConfig(PROJ_NAME, cfgFilePath, CONSOLE_NAME);
    ConsoleConfiguration cc = KnownConfigurations.getInstance().find(CONSOLE_NAME);
    // $NON-NLS-1$
    assertNotNull("Console Configuration not found", cc);
    cc.build();
}
Also used : SimpleTestProjectWithMapping(org.hibernate.eclipse.console.test.project.SimpleTestProjectWithMapping) IPath(org.eclipse.core.runtime.IPath) Path(org.eclipse.core.runtime.Path) IPackageFragment(org.eclipse.jdt.core.IPackageFragment) ConsoleConfiguration(org.hibernate.console.ConsoleConfiguration) IPath(org.eclipse.core.runtime.IPath) ArrayList(java.util.ArrayList) IPackageFragmentRoot(org.eclipse.jdt.core.IPackageFragmentRoot)

Aggregations

ArrayList (java.util.ArrayList)1 IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 IPackageFragment (org.eclipse.jdt.core.IPackageFragment)1 IPackageFragmentRoot (org.eclipse.jdt.core.IPackageFragmentRoot)1 ConsoleConfiguration (org.hibernate.console.ConsoleConfiguration)1 SimpleTestProjectWithMapping (org.hibernate.eclipse.console.test.project.SimpleTestProjectWithMapping)1