Author: max.andersen(a)jboss.com
Date: 2007-11-20 13:29:13 -0500 (Tue, 20 Nov 2007)
New Revision: 4992
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
Log:
JBIDE-1336 Seam generate entities based on existing should not overwrite entities.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-11-20
17:33:58 UTC (rev 4991)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-11-20
18:29:13 UTC (rev 4992)
@@ -111,8 +111,10 @@
// Create exporters
// TODO Add others exporters
List<String> exporters = new ArrayList<String>();
-
- exporters.add("hbmtemplate0"); //$NON-NLS-1$
+
+ if(isReverseEngineer) {
+ exporters.add("hbmtemplate0"); //$NON-NLS-1$
+ }
exporters.add("hbmtemplate1"); //$NON-NLS-1$
exporters.add("hbmtemplate2"); //$NON-NLS-1$
exporters.add("hbmtemplate3"); //$NON-NLS-1$
@@ -122,9 +124,14 @@
exporters.add("hbmtemplate7"); //$NON-NLS-1$
exporters.add("hbmtemplate8"); //$NON-NLS-1$
exporters.add("hbmtemplate9"); //$NON-NLS-1$
+
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS, exporters);
- wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate0",
true); //$NON-NLS-1$
- wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS +
".hbmtemplate0.extension_id", "org.hibernate.tools.hbm2java");
//$NON-NLS-1$ //$NON-NLS-2$
+
+ if(isReverseEngineer) {
+ wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate0",
true); //$NON-NLS-1$
+ wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS +
".hbmtemplate0.extension_id", "org.hibernate.tools.hbm2java");
//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate1",
true); //$NON-NLS-1$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS +
".hbmtemplate1.extension_id", "org.hibernate.tools.hbmtemplate");
//$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate2",
true); //$NON-NLS-1$
Show replies by date