[jbosstools-commits] JBoss Tools SVN: r7118 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Mar 25 12:32:28 EDT 2008


Author: scabanovich
Date: 2008-03-25 12:32:28 -0400 (Tue, 25 Mar 2008)
New Revision: 7118

Modified:
   trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardStep.java
   trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardWizard.java
Log:
JBIDE-1949

Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardStep.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardStep.java	2008-03-25 16:26:40 UTC (rev 7117)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardStep.java	2008-03-25 16:32:28 UTC (rev 7118)
@@ -158,4 +158,12 @@
 		return false;
 	}
 
+	public void save() {
+		if(attributes != null) attributes.store();
+	}
+
+	public void load() {
+		if(attributes != null) attributes.load();
+	}
+
 }

Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardWizard.java	2008-03-25 16:26:40 UTC (rev 7117)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/standard/DefaultStandardWizard.java	2008-03-25 16:32:28 UTC (rev 7118)
@@ -17,11 +17,12 @@
 import org.eclipse.ui.PlatformUI;
 
 import org.jboss.tools.common.meta.action.XEntityData;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardControlListener;
 import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
 import org.jboss.tools.common.meta.action.impl.WizardDataValidator;
 import org.jboss.tools.common.model.ui.ModelUIPlugin;
 
-public class DefaultStandardWizard extends Wizard {
+public class DefaultStandardWizard extends Wizard implements SpecialWizardControlListener {
 	protected SpecialWizardSupport support = null;
 	protected DefaultStandardStep[] steps = new DefaultStandardStep[0];
 	Composite pageContainer;
@@ -29,6 +30,7 @@
 	
 	public void setSupport(SpecialWizardSupport support) {
 		this.support = support;
+		support.setControlListener(this);
 	}
 
 	public boolean performFinish() {
@@ -123,5 +125,17 @@
 		wizardStep.isNextEnabled = isNextEnabled;
 		getContainer().updateButtons();
 	}
+
+	public void action(String name) {
+		try {
+			DefaultStandardStep step = steps[support.getStepId()];
+			step.save();
+			support.action(name);
+
+		} catch (Exception e) {
+			ModelUIPlugin.getPluginLog().logError(e);
+		}
+		
+	}
 	
 }




More information about the jbosstools-commits mailing list