Author: akazakov
Date: 2008-03-11 13:18:30 -0400 (Tue, 11 Mar 2008)
New Revision: 6859
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-03-11
17:13:48 UTC (rev 6858)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-03-11
17:18:30 UTC (rev 6859)
@@ -47,12 +47,20 @@
public static String SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_IS_NOT_SELECTED;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_DOES_NOT_EXIST;
+
public static String SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST;
public static String SEAM_SETTINGS_PREFERENCE_PAGE_VIEW_FOLDER_DOES_NOT_EXIST;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST;
+
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST;
+
public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST;
+ public static String SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST;
+
public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR;
public static String SEAM_VALIDATOR_CONFIGURATION_BLOCK_IGNORE;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-03-11
17:13:48 UTC (rev 6858)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-03-11
17:18:30 UTC (rev 6859)
@@ -85,6 +85,10 @@
SEAM_SETTINGS_PREFERENCE_PAGE_ADD=Add
SEAM_PREFERENCE_PAGE_SEAM_RUNTIMES=Seam Runtimes
SEAM_SETTINGS_PREFERENCE_PAGE_INSTALLED_RUNTIMES=Installed Runtimes
-SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST=
-SEAM_SETTINGS_PREFERENCE_PAGE_VIEW_FOLDER_DOES_NOT_EXIST=
-SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST=
\ No newline at end of file
+SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_DOES_NOT_EXIST=Runtime "{0}" does
not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST=Seam EJB project "{0}"
does not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_VIEW_FOLDER_DOES_NOT_EXIST=View Folder "{0}" does
not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST=Model source folder
"{0}" does not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST=Action/Form/Conversation
source folder "{0}" does not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST=Seam test project
"{0}" does not exist.
+SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST=Test source folder
"{0}" does not exist.
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-03-11
17:13:48 UTC (rev 6858)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-03-11
17:18:30 UTC (rev 6859)
@@ -36,6 +36,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -429,7 +430,7 @@
} else {
String value = getValue(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME);
if(SeamRuntimeManager.getInstance().findRuntimeByName(value) == null) {
- setErrorMessage("Runtime " + value + " does not exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_SEAM_RUNTIME_DOES_NOT_EXIST,
new String[]{value}));
setValid(false);
return;
}
@@ -438,7 +439,7 @@
boolean deployAsEar =
ISeamFacetDataModelProperties.DEPLOY_AS_EAR.equals(getValue(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS));
if(deployAsEar &&
!validateProjectName(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT)) {
String ejbProjectName =
getValue(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT).trim();
- setErrorMessage("Seam EJB project " + ejbProjectName + " does not
exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_EJB_PROJECT_DOES_NOT_EXIST,
new String[]{ejbProjectName}));
return;
}
@@ -446,7 +447,7 @@
if(viewFolder.length()>0) {
IResource folder = ResourcesPlugin.getWorkspace().getRoot().findMember(viewFolder);
if(folder==null || !folder.exists()) {
- setErrorMessage("View Folder " + viewFolder + " does not
exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_VIEW_FOLDER_DOES_NOT_EXIST,
new String[]{viewFolder}));
setValid(false);
return;
}
@@ -454,25 +455,25 @@
if(!validateSourceFolder(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER,
ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME)) {
String modelSourceFolder =
getValue(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER).trim();
- setErrorMessage("Model source folder " + modelSourceFolder + " does not
exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_MODEL_SOURCE_FOLDER_DOES_NOT_EXIST,
new String[]{modelSourceFolder}));
return;
}
if(!validateSourceFolder(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER,
ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME)) {
String sourceFolder =
getValue(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER).trim();
- setErrorMessage("Action/Form/Conversation source folder " + sourceFolder +
" does not exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_ACTION_SOURCE_FOLDER_DOES_NOT_EXIST,
new String[]{sourceFolder}));
return;
}
if(isTestEnabled()) {
if(!validateSourceFolder(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER,
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME)){
String sourceFolder =
getValue(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER).trim();
- setErrorMessage("Test source folder " + sourceFolder + " does not
exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_SOURCE_FOLDER_DOES_NOT_EXIST,
new String[]{sourceFolder}));
return;
}
if(!validateProjectName(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT)) {
String testProjectName =
getValue(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT).trim();
- setErrorMessage("Test project " + testProjectName + " does not
exist.");
+ setErrorMessage(NLS.bind(SeamPreferencesMessages.SEAM_SETTINGS_PREFERENCE_PAGE_TEST_PROJECT_DOES_NOT_EXIST,
new String[]{testProjectName}));
return;
}
}