Author: dmaliarevich
Date: 2010-10-07 12:24:41 -0400 (Thu, 07 Oct 2010)
New Revision: 25570
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-7247 , initial values correction.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java 2010-10-07
16:02:55 UTC (rev 25569)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizard.java 2010-10-07
16:24:41 UTC (rev 25570)
@@ -80,6 +80,10 @@
}
page2.setFileName(fileName);
/*
+ * The new file should not exist
+ */
+ page2.setAllowExistingResources(false);
+ /*
* Add all the pages to the wizard
*/
addPage(page1);
@@ -107,8 +111,9 @@
return false;
}
/*
- * Add "key=value" to the bundle if file is not new,
- * If it is new, it got input by getInitialContent()
+ * Add "key=value" to the bundle file that is already exists.
+ * When the file is new key and value will be written to the file content
+ * via getInitialContent() method of the page2 during the file creation.
*/
if (bundleFile.exists() && !page1.isNewFile()) {
InputStream is = new ByteArrayInputStream(page1.getKeyValuePair().getBytes());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-10-07
16:02:55 UTC (rev 25569)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-10-07
16:24:41 UTC (rev 25570)
@@ -338,6 +338,14 @@
if (rbCombo.getItemCount() > 0) {
rbCombo.select(0);
setResourceBundlePath(rbCombo.getText());
+ } else {
+ /*
+ *
https://jira.jboss.org/browse/JBIDE-7247
+ * Select 'Create new file' checkbox and
+ * disable bundle group if no bundles are found.
+ */
+ newFile.setSelection(true);
+ enableBundleGroup(false);
}
}
/*
@@ -717,7 +725,7 @@
@Override
public boolean canFlipToNextPage() {
return isPageComplete() && (getNextPage() != null)
- && (newFile.getSelection() == true);
+ && isNewFile();
}
/**