Author: dgeraskov
Date: 2008-10-08 07:06:52 -0400 (Wed, 08 Oct 2008)
New Revision: 10737
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/AddPropertyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1913
Added despotic call of selectionChangeListener
Combo dialog layout fixed
Null path selection error 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 2008-10-08
10:57:44 UTC (rev 10736)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-10-08
11:06:52 UTC (rev 10737)
@@ -494,7 +494,9 @@
public static String ExporterSettingsTab_template_directory_for;
public static String ExporterSettingsTab_use_java5_syntax;
public static String ExporterSettingsTab_select_dir;
+ public static String ExporterSettingsTab_select_dir2;
public static String ExporterSettingsTab_select_path;
+ public static String ExporterSettingsTab_select_path2;
public static String GeneralExceptionStatusHandler_exception_while_generating_code;
public static String GeneralExceptionStatusHandler_generating_code;
public static String PathHelper_does_not_exist;
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-10-08
10:57:44 UTC (rev 10736)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-10-08
11:06:52 UTC (rev 10737)
@@ -486,7 +486,9 @@
ExporterSettingsTab_template_directory_for=Template directory for
ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
ExporterSettingsTab_select_dir=Select directory
+ExporterSettingsTab_select_dir2=Select directory from filesystem or workspace.
ExporterSettingsTab_select_path=Select path
+ExporterSettingsTab_select_path2=Select path from filesystem or workspace.
ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
GeneralExceptionStatusHandler_exception_while_generating_code=Exception while generating
code
GeneralExceptionStatusHandler_generating_code=Generating code
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
10:57:44 UTC (rev 10736)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08
11:06:52 UTC (rev 10737)
@@ -96,17 +96,23 @@
public void keyPressed(KeyEvent e) {}
public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) return;
+ if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) {
+ //linux doesn't call selectionChanged event on this events
+ propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ return;
+ }
- for (int i = 0; i < combo.getItemCount(); i++) {
+ for (int i = 0; i < combo.getItemCount(); i++) {
if (combo.getText().equals(combo.getItem(i))){
- combo.select(i);
- propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ if (combo.getSelectionIndex() != i){
+ combo.select(i);
+ propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ }
return;
}
- }
- disposeBrowseButton();
- createTextValueComposite(2);
+ }
+ disposeBrowseButton();
+ createTextValueComposite(2);
}
});
@@ -194,7 +200,7 @@
public void widgetSelected(SelectionEvent e) {
String title = isPath ? HibernateConsoleMessages.ExporterSettingsTab_select_path:
HibernateConsoleMessages.ExporterSettingsTab_select_dir;
- String description = title;
+ String description = isPath ?
HibernateConsoleMessages.ExporterSettingsTab_select_path2 :
HibernateConsoleMessages.ExporterSettingsTab_select_dir2;
MessageDialog dialog = new MessageDialog(getShell(),
title,
@@ -229,7 +235,10 @@
String oldPath = ((Text)value).getText();
if (isPath && oldPath.trim().length() > 0 && strPath != null)
((Text)value).setText( oldPath + File.pathSeparator + strPath );
- else ((Text)value).setText( strPath );
+ else {
+ if (strPath == null) strPath = "";
+ ((Text)value).setText( strPath );
+ }
}
};
}
@@ -313,7 +322,7 @@
}
value = new Combo(parent, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN | SWT.READ_ONLY);
GridData bgd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- bgd.horizontalSpan = 3;
+ bgd.horizontalSpan = 2;
value.setLayoutData(bgd);
((Combo)value).setItems(items);
((Combo)value).addModifyListener( modifyListener );