if (field instanceof ClasspathResourceButtonDialogField)
{
ClasspathResourceButtonDialogField classPathField =
(ClasspathResourceButtonDialogField) field;
Shell shell = field.getShell();
ResourceOnClasspathDialog dialog =
new ResourceOnClasspathDialog(shell, getJavaProject());
dialog.setTitle(JSFUICommonPlugin
.getResourceString("DialogField.ResourceButton.SelectFile"));//$NON-NLS-1$
dialog.setSuffixs(PROPERTIES_FILES_SUFFIXS);
if (dialog.open() == Window.OK) {
String oldValue = classPathField.getText();
String newValue = (String) dialog.getResult()[0];
if (oldValue != newValue) {
classPathField.setText(newValue);
}
}
}