Author: vyemialyanchyk
Date: 2008-08-14 08:20:41 -0400 (Thu, 14 Aug 2008)
New Revision: 9722
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/console/wizards/ConsoleConfigurationWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
Log:
JBIDE-2608
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 2008-08-14
12:19:46 UTC (rev 9721)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-08-14
12:20:41 UTC (rev 9722)
@@ -203,6 +203,7 @@
public static String ConsoleConfigurationWizardPage_name_must_specified;
public static String ConsoleConfigurationWizardPage_naming_strategy;
public static String ConsoleConfigurationWizardPage_need_to_specify_classpath;
+ public static String
ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml;
public static String ConsoleConfigurationWizardPage_need_to_specify_project;
public static String ConsoleConfigurationWizardPage_persistence_unit;
public static String ConsoleConfigurationWizardPage_problem_while_initializing_cc;
@@ -424,6 +425,7 @@
public static String
ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_properties;
public static String ConsoleConfigurationMainTab_configuration_file;
public static String ConsoleConfigurationMainTab_configuration_file_2;
+ public static String
ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml;
public static String ConsoleConfigurationMainTab_core;
public static String ConsoleConfigurationMainTab_create_hibernate_properties_file;
public static String ConsoleConfigurationMainTab_create_new;
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 2008-08-14
12:19:46 UTC (rev 9721)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-08-14
12:20:41 UTC (rev 9722)
@@ -194,6 +194,7 @@
ConsoleConfigurationWizardPage_name_must_specified=A name must be specified
ConsoleConfigurationWizardPage_naming_strategy=&Naming strategy:
ConsoleConfigurationWizardPage_need_to_specify_classpath=Need to specify a classpath when
not using a project classpath
+ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml=If you
have both 'Property file' and 'Configuration file', the settings of
'Configuration file' will override the settings used in 'Property file'.
ConsoleConfigurationWizardPage_need_to_specify_project=Need to specify a project or setup
a classpath
ConsoleConfigurationWizardPage_persistence_unit=&Persistence unit:
ConsoleConfigurationWizardPage_problem_while_initializing_cc=Problem while initializing
ConsoleConfigurationWizardPage
@@ -415,6 +416,7 @@
ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_properties=Choose file to use
as hibernate.properties
ConsoleConfigurationMainTab_configuration_file=Configuration file:
ConsoleConfigurationMainTab_configuration_file_2=Configuration file
+ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml=If you have
both 'Property file' and 'Configuration file', the settings of
'Configuration file' will override the settings used in 'Property file'.
ConsoleConfigurationMainTab_core=Core
ConsoleConfigurationMainTab_create_hibernate_properties_file=Create Hibernate Properties
file (.properties)
ConsoleConfigurationMainTab_create_new=Create &new...
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-14
12:19:46 UTC (rev 9721)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2008-08-14
12:20:41 UTC (rev 9722)
@@ -682,6 +682,7 @@
private void dialogChanged() {
String propertyFilename = propertyFileText.getText();
String configurationFilename = configurationFileText.getText();
+ setMessage(null);
configurationFileText.setEnabled( !configurationFileWillBeCreated &&
!getConfigurationMode().equals( ConfigurationMode.JPA ) );
confbutton.setEnabled( !getConfigurationMode().equals( ConfigurationMode.JPA ) );
@@ -744,6 +745,12 @@
updateStatus(
HibernateConsoleMessages.ConsoleConfigurationWizardPage_need_to_specify_classpath );
return;
}
+
+ if ((configurationFilename != null && configurationFilename.trim().length()
> 0) &&
+ (propertyFilename != null && propertyFilename.trim().length() > 0)) {
+ setMessage(HibernateConsoleMessages.ConsoleConfigurationWizardPage_both_hibernate_properties_and_hibernate_cfg_xml,
WARNING);
+ return;
+ }
updateStatus(null);
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2008-08-14
12:19:46 UTC (rev 9721)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2008-08-14
12:20:41 UTC (rev 9722)
@@ -384,6 +384,12 @@
}
}
+ if ((configurationFilename != null && configurationFilename.trim().length()
> 0) &&
+ (propertyFilename != null && propertyFilename.trim().length() > 0)) {
+ setMessage(HibernateConsoleMessages.ConsoleConfigurationMainTab_both_hibernate_properties_and_hibernate_cfg_xml);
+ return true;
+ }
+
/*if((useProjectClassPath() && StringHelper.isEmpty( getProjectName() ))
&& classPathViewer.getTable().getItemCount()==0) {
setErrorMessage( "Need to specify a project or setup a classpath" );
return;
Show replies by date