Author: dgeraskov
Date: 2011-02-11 08:41:22 -0500 (Fri, 11 Feb 2011)
New Revision: 29113
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
Log:
https://issues.jboss.org/browse/JBIDE-8233
Validate the name of reveng.strategy
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-11
12:54:26 UTC (rev 29112)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2011-02-11
13:41:22 UTC (rev 29113)
@@ -33,6 +33,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
@@ -328,6 +329,16 @@
return;
}
}
+
+ if(reverseEngineeringStrategy.isEnabled() &&
reverseEngineeringStrategy.getText().trim().length()>0) {
+ IStatus val=
JavaConventions.validateJavaTypeName(getReverseEngineeringStrategy(),JavaCore.VERSION_1_5,
JavaCore.VERSION_1_5 );
+ if (val.getSeverity() == IStatus.ERROR ) {
+ updateStatus(val.getMessage() );
+ return;
+ } else if (val.getSeverity() == IStatus.WARNING){
+ warning = val.getMessage();
+ }
+ }
if(useOwnTemplates.isSelected() ) {
msg = PathHelper.checkDirectory(templatedir.getText(),
HibernateConsoleMessages.CodeGenerationSettingsTab_template_dir, true);