Author: akazakov
Date: 2008-03-06 12:42:44 -0500 (Thu, 06 Mar 2008)
New Revision: 6713
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePageNew.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.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/SeamSettingsPreferencePageNew.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePageNew.java 2008-03-06
17:31:03 UTC (rev 6712)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePageNew.java 2008-03-06
17:42:44 UTC (rev 6713)
@@ -29,11 +29,13 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
import org.jboss.tools.seam.ui.wizard.IParameter;
+import org.jboss.tools.seam.ui.wizard.SeamWizardFactory;
import org.jboss.tools.seam.ui.wizard.SeamWizardUtils;
import org.osgi.service.prefs.BackingStoreException;
@@ -68,20 +70,23 @@
@Override
protected Control createContents(Composite parent) {
IFieldEditor projectNameEditor =
IFieldEditorFactory.INSTANCE.createUneditableTextEditor(IParameter.SEAM_PROJECT_NAME,
SeamUIMessages.SEAM_SETTINGS_PREFERENCES_PAGE_SEAM_PROJECT, getSeamProjectName());
-// addEditor(projectNameEditor);
+ addEditor(projectNameEditor);
-// IFieldEditor jBossSeamHomeEditor = IFieldEditorFactory.INSTANCE
-// .createComboWithButton(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
-// SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_RUNTIME, getRuntimeNames(),
-// getSeamRuntimeDefaultValue(),
-// true, new NewSeamRuntimeAction(), (IValidator)null);
+ IFieldEditor seamRuntimeEditor =
SeamWizardFactory.createSeamRuntimeSelectionFieldEditor(getSeamRuntimeName());
+ addEditor(seamRuntimeEditor);
Control control = new GridLayoutComposite(parent);
-// projectNameEditor.setEnabled(false);
return control;
}
+ private String getSeamRuntimeName() {
+ if(preferences!=null) {
+ return preferences.get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
"");
+ }
+ return "";
+ }
+
private String getSeamProjectName() {
return warProject!=null ? warProject.getName() : project.getName();
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2008-03-06
17:31:03 UTC (rev 6712)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2008-03-06
17:42:44 UTC (rev 6713)
@@ -114,6 +114,9 @@
* @return Editor to select seam runtime
*/
public static IFieldEditor createSeamRuntimeSelectionFieldEditor(SeamVersion[]
seamVersions, String defaultValue, NewSeamRuntimeAction action) {
+ if(seamVersions.length==0) {
+ seamVersions = SeamVersion.ALL_VERSIONS;
+ }
IFieldEditor jBossSeamRuntimeEditor = IFieldEditorFactory.INSTANCE
.createComboWithButton(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_RUNTIME, getRuntimeNames(seamVersions),