use of org.eclipse.core.resources.ProjectScope in project jbosstools-hibernate by jbosstools.
the class SimpleTestProjectWithMapping method setDefaultConsoleConfiguration.
public void setDefaultConsoleConfiguration(String ccName) throws BackingStoreException, CoreException {
IScopeContext scope = new ProjectScope(getIProject());
Preferences node = scope.getNode(HibernatePropertiesConstants.HIBERNATE_CONSOLE_NODE);
node.putBoolean(HibernatePropertiesConstants.HIBERNATE3_ENABLED, true);
// $NON-NLS-1$
node.put(HibernatePropertiesConstants.DEFAULT_CONFIGURATION, ccName);
node.flush();
addHibernateNature();
}
use of org.eclipse.core.resources.ProjectScope in project erlide_eclipse by erlang.
the class ProjectConfiguratorFactory method getConfig.
@Override
public IProjectConfigurator getConfig(final ProjectConfigType configType, final IErlProject project) {
IProjectConfigurator result = null;
switch(configType) {
case INTERNAL:
final String configName = configType.getConfigName();
final IEclipsePreferences node = new ProjectScope(project.getWorkspaceProject()).getNode(configName);
result = new PreferencesProjectConfigurator(node);
break;
case REBAR:
case EMAKE:
result = getConfig(configType, new File(project.getWorkspaceProject().getLocation().toPortableString()));
break;
default:
break;
}
return result;
}
Aggregations