Author: max.andersen(a)jboss.com
Date: 2008-04-12 03:57:32 -0400 (Sat, 12 Apr 2008)
New Revision: 7514
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/properties/HibernatePropertyPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
Log:
JBIDE-1617 enable schemaexport in codegen ui
JBIDE-1708 restore defaults on hibernate settings
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-04-12
02:12:16 UTC (rev 7513)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-04-12
07:57:32 UTC (rev 7514)
@@ -563,20 +563,62 @@
type="path"
value=""/>
</exporter>
- <!-- <exporter
- classname="org.hibernate.tool.hbm2x.seam.SeamExporter"
- description="JBoss Seam Skeleton App [beta] (misc)"
- icon="icons/hibernate_small_icon.gif"
- id="org.hibernate.tools.hbm2seam">
+ <exporter
+ classname="org.hibernate.tool.hbm2x.Hbm2DDLExporter"
+ description="Schema Export (.ddl)"
+ icon="icons/images/schema.gif"
+ id="org.hibernate.tools.hbm2ddl">
<property
- description="Application name"
- name="seam_appname"
- value="Seam Application"/>
+ description="Output directory"
+ name="outputdir"
+ type="directory"
+ value=""/>
<property
- description="Application short name"
- name="seam_shortname"
- value="seamapp"/>
- </exporter> -->
+ description="Output file name"
+ name="outputFileName"
+ type="string"
+ value="schema.sql"/>
+ <property
+ description="Export to database"
+ name="exportToDatabase"
+ type="boolean"
+ value="true"/> <!-- we set this to false in the ui to
avoid users to delete their databases with a single click -->
+ <property
+ description="Script to console"
+ name="scriptToConsole"
+ type="boolean"
+ value="true"/>
+ <property
+ description="Update schema"
+ name="schemaUpdate"
+ type="boolean"
+ value="false"/>
+ <property
+ description="Delimiter used in output file"
+ name="delimiter"
+ type="string"
+ value=";"/>
+ <property
+ description="Generate Drop statements"
+ name="drop"
+ type="boolean"
+ value="false"/>
+ <property
+ description="Generate Create statements"
+ name="create"
+ type="boolean"
+ value="true"/>
+ <property
+ description="Format generated SQL"
+ name="format"
+ type="boolean"
+ value="false"/>
+ <property
+ description="Halt on error"
+ name="haltOnError"
+ type="boolean"
+ value="false"/>
+ </exporter>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/properties/HibernatePropertyPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/properties/HibernatePropertyPage.java 2008-04-12
02:12:16 UTC (rev 7513)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/properties/HibernatePropertyPage.java 2008-04-12
07:57:32 UTC (rev 7514)
@@ -229,8 +229,8 @@
}
protected void performDefaults() {
- // Populate the owner text field with the default value
- //ownerText.setText(DEFAULT_OWNER);
+ enableHibernate.setSelection(false);
+ selectedConfiguration.setText("");
}
private IProject getProject() {
@@ -244,6 +244,7 @@
return null;
}
+
public void loadValues() {
IProject project = getProject();
IScopeContext scope = new ProjectScope(project);
@@ -267,6 +268,7 @@
return true;
}
+
private void enableSettings(boolean selection) {
for (int i = 0; i < settings.length; i++) {
Control comp = settings[i];
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-04-12
02:12:16 UTC (rev 7513)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-04-12
07:57:32 UTC (rev 7514)
@@ -57,6 +57,7 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.util.Assert;
import org.eclipse.text.edits.TextEdit;
+import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.JDBCMetaDataConfiguration;
import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy;
@@ -240,8 +241,12 @@
} catch (CoreException e) {
throw new HibernateConsoleRuntimeException("Error while setting up " +
exporterFactories[i].getExporterDefinition(), e);
}
-
+
+ try {
exporter.start();
+ } catch(HibernateException he) {
+ throw new HibernateConsoleRuntimeException("Error while running " +
exporterFactories[i].getExporterDefinition().getDescription(), he);
+ }
monitor.worked(1);
}
return artifactCollector;
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2008-04-12
02:12:16 UTC (rev 7513)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2008-04-12
07:57:32 UTC (rev 7514)
@@ -265,7 +265,7 @@
return;
}
- String msg = PathHelper.checkDirectory(outputdir.getText(), "output
directory", false);
+ String msg = PathHelper.checkDirectory(outputdir.getText(), "Output
directory", false);
if (msg!=null) {
updateStatus(msg);
Show replies by date