Author: vyemialyanchyk
Date: 2010-10-01 09:54:34 -0400 (Fri, 01 Oct 2010)
New Revision: 25394
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
Log:
https://jira.jboss.org/browse/JBIDE-7228 - fixed
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-10-01
13:31:53 UTC (rev 25393)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-10-01
13:54:34 UTC (rev 25394)
@@ -463,6 +463,7 @@
public static String ExporterSettingsTab_has_to_be_folder_or_project;
public static String ExporterSettingsTab_must_be_file;
public static String ExporterSettingsTab_output_directory_for;
+ public static String ExporterSettingsTab_query_should_have_not_empty_value;
public static String
ExporterSettingsTab_problem_when_reading_hibernate_tools_launch_configuration;
public static String ExporterSettingsTab_project_for_is_closed;
public static String ExporterSettingsTab_properties;
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-10-01
13:31:53 UTC (rev 25393)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-10-01
13:54:34 UTC (rev 25394)
@@ -476,6 +476,7 @@
ExporterSettingsTab_select_all=Select all
ExporterSettingsTab_select_exporter_you_want_to_add=Select the exporter(s) you want to
add
ExporterSettingsTab_template_directory_for=Template directory for
+ExporterSettingsTab_query_should_have_not_empty_value=Query for {0} should not be an
empty string
ExporterSettingsTab_select_dir=Select directory
ExporterSettingsTab_select_dir2=Select directory from filesystem or workspace.
ExporterSettingsTab_select_path=Select path
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2010-10-01
13:31:53 UTC (rev 25393)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterSettingsTab.java 2010-10-01
13:54:34 UTC (rev 25394)
@@ -795,31 +795,31 @@
return;
}
-
+ String msg = null;
// hard-coded checks: this should be delegated to extension point that knows about the
different exporters.
//Iterator iterator = observableFactoryList.getList().iterator(); // check all
exporters
for (ExporterFactory ef : selectedExporters) {// check only selected exporters
String str = ef.getProperties().get(ExporterFactoryStrings.OUTPUTDIR);
- String msg = null;
- if(str!=null) {
+ if (str != null) {
msg = PathHelper.checkDirectory(str,
HibernateConsoleMessages.ExporterSettingsTab_output_directory_for + " " +
ef.getExporterDefinition().getDescription(), true); //$NON-NLS-1$
- if(msg!=null) {
- updateStatus(msg);
- return;
+ if (msg != null) {
+ break;
}
}
-
str = ef.getProperties().get(ExporterFactoryStrings.TEMPLATE_PATH);
- if(str!=null) {
+ if (str != null) {
msg = PathHelper.checkDirectory(str,
HibernateConsoleMessages.ExporterSettingsTab_template_directory_for + " " +
ef.getExporterDefinition().getDescription(), true); //$NON-NLS-1$
- if(msg!=null) {
- updateStatus(msg);
- return;
+ if (msg != null) {
+ break;
}
}
-
+ str = ef.getProperties().get(ExporterFactoryStrings.QUERY_STRING);
+ if (str != null && str.length() == 0) {
+ msg =
NLS.bind(HibernateConsoleMessages.ExporterSettingsTab_query_should_have_not_empty_value,
ef.getExporterDefinition().getDescription());
+ break;
+ }
}
- updateStatus( null );
+ updateStatus(msg);
}
protected String checkDirectory(IPath path, String name) {