Author: vrubezhny
Date: 2007-12-19 14:00:22 -0500 (Wed, 19 Dec 2007)
New Revision: 5379
Modified:
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-1537 Error in creating seam runtime
The issue is fixed
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-12-19
17:32:04 UTC (rev 5378)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-12-19
19:00:22 UTC (rev 5379)
@@ -314,9 +314,9 @@
"version", SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_VERSION2,
Arrays.asList( //$NON-NLS-1$
new String[]{SeamVersion.SEAM_1_2.toString(), SeamVersion.SEAM_2_0.toString()}),
SeamVersion.SEAM_1_2.toString(), false);
- validSeamVersions = new ArrayList<SeamVersion>();
- validSeamVersions.add(SeamVersion.SEAM_1_2);
- validSeamVersions.add(SeamVersion.SEAM_2_0);
+ this.validSeamVersions = new ArrayList<SeamVersion>();
+ this.validSeamVersions.add(SeamVersion.SEAM_1_2);
+ this.validSeamVersions.add(SeamVersion.SEAM_2_0);
} else {
this.version = IFieldEditorFactory.INSTANCE.createComboEditor(
"version", SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_VERSION2,
validSeamVersions,
@@ -368,10 +368,12 @@
name.setValue(homeDirName);
String seamVersion = getSeamVersion(homeDir.getValueAsString());
- for (SeamVersion ver : validSeamVersions) {
- if
(seamVersion.matches(ver.toString().replace(".","\\.")+".*"))
{
- version.setValue(ver.toString());
- break;
+ if (validSeamVersions != null) {
+ for (SeamVersion ver : validSeamVersions) {
+ if
(seamVersion.matches(ver.toString().replace(".","\\.")+".*"))
{
+ version.setValue(ver.toString());
+ break;
+ }
}
}
}