use of org.hibernate.console.ConsoleConfiguration in project jbosstools-hibernate by jbosstools.
the class OrmDiagram method getConsoleConfig.
public ConsoleConfiguration getConsoleConfig() {
final KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
ConsoleConfiguration consoleConfig = knownConfigurations.find(consoleConfigName);
return consoleConfig;
}
use of org.hibernate.console.ConsoleConfiguration in project jbosstools-hibernate by jbosstools.
the class OrmDiagram method getStoreFolderPath.
public IPath getStoreFolderPath() {
IPath storePath = null;
ConsoleConfiguration consoleConfig = getConsoleConfig();
IJavaProject javaProject = ProjectUtils.findJavaProject(consoleConfig);
if (javaProject != null && javaProject.getProject() != null) {
storePath = javaProject.getProject().getLocation();
} else {
storePath = UiPlugin.getDefault().getStateLocation();
}
// $NON-NLS-1$
return storePath.append(".settings").append(HIBERNATE_MAPPING_LAYOUT_FOLDER_NAME);
}
use of org.hibernate.console.ConsoleConfiguration in project jbosstools-hibernate by jbosstools.
the class Shape method getConsoleConfig.
public ConsoleConfiguration getConsoleConfig() {
final KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
ConsoleConfiguration consoleConfig = knownConfigurations.find(consoleConfigName);
return consoleConfig;
}
use of org.hibernate.console.ConsoleConfiguration in project jbosstools-hibernate by jbosstools.
the class OrmLabelProvider method getConfig.
protected IConfiguration getConfig() {
final ConsoleConfiguration consoleConfig = getConsoleConfig();
if (consoleConfig != null) {
if (!consoleConfig.hasConfiguration()) {
try {
consoleConfig.build();
consoleConfig.buildMappings();
} catch (Exception he) {
// $NON-NLS-1$
HibernateConsolePlugin.getDefault().logErrorMessage("HibernateException: ", he);
}
}
return consoleConfig.getConfiguration();
}
return null;
}
use of org.hibernate.console.ConsoleConfiguration in project jbosstools-hibernate by jbosstools.
the class ConsoleConfigUtils method deleteConsoleConfig.
/**
* Delete console configuration with given name.
* @param name
*/
public static void deleteConsoleConfig(String name) {
final KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
final ConsoleConfiguration consoleConfig = knownConfigurations.find(name);
if (consoleConfig != null) {
consoleConfig.reset();
}
knownConfigurations.removeConfiguration(consoleConfig, false);
}
Aggregations