Author: dazarov
Date: 2007-10-30 05:59:13 -0400 (Tue, 30 Oct 2007)
New Revision: 4574
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1210
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-30
00:40:52 UTC (rev 4573)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-30
09:59:13 UTC (rev 4574)
@@ -208,6 +208,8 @@
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_ALREADY_EXISTS;
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_AN_INSTANCEOF_OF_LIST;
+
+ public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR;
public static String SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-30
00:40:52 UTC (rev 4573)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-30
09:59:13 UTC (rev 4574)
@@ -54,6 +54,7 @@
SEAM_RUNTIME_LIST_FIELD_EDITOR_INPUTELEMENT_MUST_BE=inputElement must be
SEAM_RUNTIME_LIST_FIELD_EDITOR_NAME_CANNOT_BE_EMPTY=Name cannot be empty
SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_READ_JAR_FILE=Cannot read jboss-seam.jar file
+SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR=Cannot find jboss-seam.jar
file
SEAM_PROJECT_WIZARD_PAGE1_FILE_EXTENSION_MUST_BE_MPE=File extension must be
"mpe"
SEAM_RUNTIME_LIST_FIELD_EDITOR_AN_INSTANCEOF_OF_LIST=an instance of
List<SeamRuntime>.
SEAM_RUNTIME_LIST_FIELD_EDITOR_CREATE_A_SEAM_RUNTIME=Create a Seam Runtime
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-10-30
00:40:52 UTC (rev 4573)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-10-30
09:59:13 UTC (rev 4574)
@@ -399,7 +399,11 @@
}
String seamVersion = getSeamVersion(homeDir.getValueAsString());
- if("".equals(seamVersion)) { //$NON-NLS-1$
+ if(seamVersion == null){
+ setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_FIND_JBOSS_SEAM_JAR);
+ setPageComplete(false);
+ return;
+ }else if("".equals(seamVersion)) { //$NON-NLS-1$
setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER);
setPageComplete(false);
return;
@@ -426,6 +430,7 @@
File seamJarFile = new File(path, "jboss-seam.jar"); //$NON-NLS-1$
if(!seamJarFile.exists()) {
seamJarFile = new File(path, "lib/jboss-seam.jar"); // hack to make it work
for seam2
+ if(!seamJarFile.exists()) return null;
}
InputStream str=null;
ZipFile seamJar;