Author: dgeraskov
Date: 2008-10-08 09:23:01 -0400 (Wed, 08 Oct 2008)
New Revision: 10740
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1913
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08
13:21:36 UTC (rev 10739)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08
13:23:01 UTC (rev 10740)
@@ -225,19 +225,21 @@
IPath[] paths = DialogSelectionHelper.chooseFileEntries(getShell(), (IPath)null,
new Path[0],
title, description,
new String[0], isPath, true, false);//$NON-NLS-1$
- strPath = paths[0].toOSString();
- if (isPath){
- for (int i = 1; i < paths.length; i++) {
- strPath += File.pathSeparator + paths[i].toOSString();
- }
- }
+ if (paths != null && paths.length > 0){
+ strPath = paths[0].toOSString();
+ if (isPath){
+ for (int i = 1; i < paths.length; i++) {
+ strPath += File.pathSeparator + paths[i].toOSString();
+ }
+ }
+ }
} else return;
String oldPath = ((Text)value).getText();
if (isPath && oldPath.trim().length() > 0 && strPath != null)
((Text)value).setText( oldPath + File.pathSeparator + strPath );
else {
- if (strPath == null) strPath = "";
- ((Text)value).setText( strPath );
+ if (strPath != null)
+ ((Text)value).setText( strPath );
}
}
};