Author: dgeraskov
Date: 2009-12-23 08:38:23 -0500 (Wed, 23 Dec 2009)
New Revision: 19550
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.properties
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5570
copy hibernate.properties into seam project
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2009-12-23
13:37:11 UTC (rev 19549)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2009-12-23
13:38:23 UTC (rev 19550)
@@ -307,7 +307,7 @@
protected File webInfClassesMetaInf;
protected File persistenceFile;
protected File hibernateConsoleLaunchFile;
- //protected File hibernateConsolePropsFile;
+ protected File hibernateConsolePropsFile;
/**
*
@@ -498,10 +498,10 @@
viewFilterSetCollection, false);
}
- /*AntCopyUtils.copyFileToFolder(
+ AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
project.getLocation().toFile(),
- hibernateDialectFilterSet, false);*/
+ hibernateDialectFilterSet, false);
WtpUtils.setClasspathEntryAsExported(project, new
Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
} else {
@@ -684,8 +684,8 @@
ejbProjectFolder, ejbProjectFolder.getName() + ".launch"), //$NON-NLS-1$
new FilterSetCollection(ejbFilterSet), false);
- /*AntCopyUtils.copyFileToFolder(hibernateConsolePropsFile,
- ejbProjectFolder, hibernateDialectFilterSet, false);*/
+ AntCopyUtils.copyFileToFolder(hibernateConsolePropsFile,
+ ejbProjectFolder, hibernateDialectFilterSet, false);
}
enum ProjectType {
@@ -783,12 +783,12 @@
} else {
try {
hibernateConsoleLaunchFile = new
File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),
"hibernatetools/hibernate-console.launch");
+ hibernateConsolePropsFile = new
File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),
"hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
//hibernateConsoleLaunchFile = new File(seamGenHomeFolder,
"hibernatetools/hibernate-console.launch"); //$NON-NLS-1$
}
- //hibernateConsolePropsFile = new File(seamGenHomeFolder,
"hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
//final File hibernateConsolePref = new File(seamGenHomeFolder,
"hibernatetools/.settings/org.hibernate.eclipse.console.prefs"); //$NON-NLS-1$
persistenceFile = new File(seamGenResFolder, "META-INF/persistence-" +
(isWarConfiguration(model) ? DEV_WAR_PROFILE : DEV_EAR_PROFILE) + ".xml");
//$NON-NLS-1$ //$NON-NLS-2$
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-12-23
13:37:11 UTC (rev 19549)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2009-12-23
13:38:23 UTC (rev 19550)
@@ -90,7 +90,7 @@
protected File seamGenResFolder;
protected File persistenceFile;
protected File hibernateConsoleLaunchFile;
- //protected File hibernateConsolePropsFile;
+ protected File hibernateConsolePropsFile;
protected FilterSet jdbcFilterSet;
protected FilterSet encodedJdbcFilterSet;
@@ -137,11 +137,11 @@
try {
hibernateConsoleLaunchFile = new
File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),
"hibernatetools/hibernate-console.launch");
+ hibernateConsolePropsFile = new
File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),
"hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
//hibernateConsoleLaunchFile = new File(seamGenHomeFolder,
"hibernatetools/hibernate-console.launch"); //$NON-NLS-1$
- //hibernateConsolePropsFile = new File(seamGenHomeFolder,
"hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
dataSourceDsFile = new File(seamGenResFolder, "datasource-ds.xml");
//$NON-NLS-1$
IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
@@ -443,10 +443,10 @@
new File(ejbProjectFolder, ejbProjectFolder.getName() + ".launch"),
//$NON-NLS-1$
new FilterSetCollection(ejbFilterSet), true);
- /*AntCopyUtils.copyFileToFolder(
+ AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
ejbProjectFolder,
- hibernateDialectFilterSet, true);*/
+ hibernateDialectFilterSet, true);
}
protected void createEarProject() {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch 2009-12-23
13:37:11 UTC (rev 19549)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch 2009-12-23
13:38:23 UTC (rev 19550)
@@ -10,4 +10,5 @@
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="@projectName@"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY"
value="JPA"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONNECTION_PROFILE_NAME"
value="@connectionProfile@"/>
+<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE"
value="/@projectName(a)/hibernate-console.properties"/>
</launchConfiguration>
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.properties
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.properties 2009-12-23
13:38:23 UTC (rev 19550)
@@ -0,0 +1,4 @@
+#File used by hibernate tools to override <datasource> and other container specific
settings in persistence.xml
+hibernate.connection.provider_class
org.hibernate.connection.DriverManagerConnectionProvider
+hibernate.datasource=
+hibernate.transaction.manager_lookup_class=
\ No newline at end of file
Property changes on:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch 2009-12-23
13:37:11 UTC (rev 19549)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch 2009-12-23
13:38:23 UTC (rev 19550)
@@ -10,4 +10,5 @@
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="@projectName@"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY"
value="JPA"/>
<stringAttribute key="org.hibernate.eclipse.launch.USE_JPA_PROJECT_PROFILE"
value="true"/>
+<stringAttribute key="org.hibernate.eclipse.launch.PROPERTY_FILE"
value="/@projectName(a)/hibernate-console.properties"/>
</launchConfiguration>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-12-23
13:37:11 UTC (rev 19549)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2009-12-23
13:38:23 UTC (rev 19550)
@@ -115,7 +115,7 @@
// Database group
private IFieldEditor connProfileSelEditor;
- private IFieldEditor jBossHibernateDbTypeEditor ;
+ //private IFieldEditor jBossHibernateDbTypeEditor ;
private IFieldEditor dbSchemaName;
@@ -284,11 +284,11 @@
model.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
getJpaConnectionProfile());
}
- if (jBossHibernateDbTypeEditor != null) {
+ /*if (jBossHibernateDbTypeEditor != null) {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE,
this.jBossHibernateDbTypeEditor.getValueAsString());
- }
+ }*/
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS,
@@ -469,23 +469,23 @@
}
public void createDatabaseGoupControl() {
- disposeControls(jBossHibernateDbTypeEditor);
+ //disposeControls(jBossHibernateDbTypeEditor);
disposeControls(connProfileSelEditor);
disposeControls(dbSchemaName);
disposeControls(dbCatalogName);
disposeControls(dbTablesExists);
disposeControls(recreateTablesOnDeploy);
if (!needToShowConnectionProfile){
- jBossHibernateDbTypeEditor = null;
+ //jBossHibernateDbTypeEditor = null;
connProfileSelEditor = null;
dbSchemaName = null;
dbCatalogName = null;
} else {
- jBossHibernateDbTypeEditor = IFieldEditorFactory.INSTANCE
+ /*jBossHibernateDbTypeEditor = IFieldEditorFactory.INSTANCE
.createComboEditor(ISeamFacetDataModelProperties.DB_TYPE,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE_TYPE,
Arrays.asList(HIBERNATE_HELPER.getDialectNames()),
- getDefaultDbType(), false);
+ getDefaultDbType(), false);*/
connProfileSelEditor = SeamWizardFactory
.createConnectionProfileSelectionFieldEditor(
getConnectionProfileDefaultValue(), new IValidator() {
@@ -506,7 +506,7 @@
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE_CATALOG_NAME,
""); //$NON-NLS-1$
- jBossHibernateDbTypeEditor
+ /*jBossHibernateDbTypeEditor
.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
SeamInstallWizardPage.this.model
@@ -516,7 +516,7 @@
.getNewValue().toString()));
}
});
- registerEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);
+ registerEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);*/
registerEditor(connProfileSelEditor, databaseGroup, 4);
registerEditor(dbSchemaName, databaseGroup, 4);
registerEditor(dbCatalogName, databaseGroup, 4);