Author: dgeraskov
Date: 2011-02-04 06:42:06 -0500 (Fri, 04 Feb 2011)
New Revision: 29000
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
Log:
https://issues.jboss.org/browse/JBIDE-8231
Invalid console configuration will be shown as <None>
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 2011-02-04
08:02:41 UTC (rev 28999)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2011-02-04
11:42:06 UTC (rev 29000)
@@ -58,6 +58,7 @@
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ImageConstants;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
@@ -457,7 +458,12 @@
if (attributes == null) {
return;
}
- consoleConfigurationName.setText(attributes.getConsoleConfigurationName());
+ if (attributes.getConsoleConfigurationName() == null
+ ||
!KnownConfigurations.getInstance().isKnownConfiguration(attributes.getConsoleConfigurationName())){
+ consoleConfigurationName.setText(NULL_CONFIG);
+ } else {
+ consoleConfigurationName.setText(attributes.getConsoleConfigurationName());
+ }
preferRawCompositeIds.setSelection(attributes.isPreferBasicCompositeIds());
autoManyToMany.setSelection( attributes.detectManyToMany() );
autoVersioning.setSelection( attributes.detectOptimisticLock() );