use of org.hibernate.eclipse.jdt.ui.wizards.ConfigurationActor in project jbosstools-hibernate by jbosstools.
the class HbmExporterTest method getConfigurationFor.
/**
* Method returns Configuration object for selected ICompilationUnits.
* Fails if configuration is null.
* @return
*/
protected IConfiguration getConfigurationFor(String... cuNames) {
Set<ICompilationUnit> selectionCU = new HashSet<ICompilationUnit>();
for (int i = 0; i < cuNames.length; i++) {
ICompilationUnit icu = Utils.findCompilationUnit(project.getIJavaProject(), cuNames[i]);
assertNotNull(icu);
selectionCU.add(icu);
}
ConfigurationActor actor = new ConfigurationActor(selectionCU);
Map<IJavaProject, IConfiguration> configurations = actor.createConfigurations(Integer.MAX_VALUE);
assertEquals(1, configurations.size());
IConfiguration config = configurations.get(project.getIJavaProject());
assertNotNull(config);
return config;
}
Aggregations