• R/O
  • SSH
  • HTTPS

dbviewer: Commit


Commit MetaInfo

Revisión259 (tree)
Tiempo2012-07-16 23:19:15
Autormakopoppo

Log Message

(empty log message)

Cambiar Resumen

Diferencia incremental

--- DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/ImpDBConfigWizard.java (revision 258)
+++ DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/ImpDBConfigWizard.java (revision 259)
@@ -81,7 +81,7 @@
8181 viewer.setSelection(new StructuredSelection(registDb), true);
8282 }
8383 } catch (SameDbNameException e) {
84- config.setDbName(config.getDbName() + Messages.getString("ImpDBConfigWizard.0")); //$NON-NLS-1$
84+ config.setDbName(Messages.getFormattedString("ImpDBConfigWizard.0", new Object[]{config.getDbName()})); //$NON-NLS-1$
8585 saveDBConfig(config);
8686 }
8787 }
--- DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/Messages.java (revision 258)
+++ DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/Messages.java (revision 259)
@@ -5,6 +5,7 @@
55 */
66 package zigen.plugin.db.ui.wizard;
77
8+import java.text.MessageFormat;
89 import java.util.MissingResourceException;
910 import java.util.ResourceBundle;
1011
@@ -23,4 +24,14 @@
2324 return '!' + key + '!';
2425 }
2526 }
27+
28+ public static String getFormattedString(String key, Object[] args) {
29+ try {
30+ String str = RESOURCE_BUNDLE.getString(key);
31+ return MessageFormat.format(str, args);
32+ } catch (MissingResourceException e) {
33+ return '!' + key + '!';
34+ }
35+ }
36+
2637 }
--- DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/ExpDBConfigWizard.java (revision 258)
+++ DBViewer/branches/2.0.0/src/zigen/plugin/db/ui/wizard/ExpDBConfigWizard.java (revision 259)
@@ -99,7 +99,7 @@
9999
100100 private boolean confirmOverwrite(Shell shell, String fileName) {
101101 MessageBox msg = new MessageBox(shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION);
102- msg.setMessage(Messages.getString("ExpDBConfigWizard.6") + fileName + Messages.getString("ExpDBConfigWizard.7")); //$NON-NLS-1$ //$NON-NLS-2$
102+ msg.setMessage(Messages.getFormattedString("ExpDBConfigWizard.6", new Object[]{fileName})); //$NON-NLS-1$
103103 msg.setText(Messages.getString("ExpDBConfigWizard.8")); //$NON-NLS-1$
104104 int res = msg.open();
105105 if (res == SWT.YES) {
Show on old repository browser