1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 13:05:22 +02:00

[242714] Esc on Multiple Rename Dialog doesn't close the dialog

This commit is contained in:
David McKnight 2008-07-31 14:48:55 +00:00
parent 20933435f4
commit 79002cfacc

View file

@ -14,6 +14,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
* David McKnight (IBM) - [242714] Esc on Multiple Rename Dialog doesn't close the dialog
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.ui.dialogs; package org.eclipse.rse.internal.ui.dialogs;
@ -146,13 +147,16 @@ public class SystemRenameDialog extends SystemPromptDialog
public boolean canModify(Object element, String property) public boolean canModify(Object element, String property)
{ {
boolean modifiable = property.equals(ISystemPropertyConstants.P_NEWNAME); boolean modifiable = property.equals(ISystemPropertyConstants.P_NEWNAME);
if ((cellEditor != null) && (cellEditor.getControl() != null)) if (modifiable)
{ {
SystemRenameTableRow row = (SystemRenameTableRow)element; if ((cellEditor != null) && (cellEditor.getControl() != null))
int limit = row.getNameLengthLimit(); {
if (limit == -1) SystemRenameTableRow row = (SystemRenameTableRow)element;
limit = 1000; int limit = row.getNameLengthLimit();
((Text)cellEditor.getControl()).setTextLimit(limit); if (limit == -1)
limit = 1000;
((Text)cellEditor.getControl()).setTextLimit(limit);
}
} }
return modifiable; return modifiable;
} }
@ -529,6 +533,9 @@ public class SystemRenameDialog extends SystemPromptDialog
e.doit = true; e.doit = true;
} }
} }
else if (detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) {
e.doit = false;
}
else else
e.doit = true; e.doit = true;
ignoreSelection = false; ignoreSelection = false;