org.mockcentral.editor.nodes.expectation.wizard
Class EditExpectationWizard

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by org.mockcentral.editor.nodes.expectation.wizard.EditExpectationWizard
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizard

public class EditExpectationWizard
extends org.eclipse.jface.wizard.Wizard

A Wizard used for editing Mock Object method expecttion data, including the method name and Mock Object method type. This wizard contains a single EditExpectationDataPage.

Author:
David Hutchinson

Field Summary
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
EditExpectationWizard(org.mockcentral.editor.nodes.expectation.ExpectationModel model, org.mockcentral.editor.nodes.expectation.MethodNameValidator methodNamevalidator, boolean isNewExpectation)
          Creates a new instance.
 
Method Summary
 void addPages()
           
 boolean canFinish()
           
 EditExpectationWizardDialogSettingsManager getDialogSettingsManager()
          Returns the EditExpectationWizardDialogSettingsManager.
 org.mockcentral.editor.nodes.expectation.ExpectationModel getModel()
          Returns the ExpectationElementDataBean.
 boolean performFinish()
           
protected  void setCanFinish(boolean canFinish)
          Sets the flag for whether this wizard can finish.
protected  void setDialog(EditExpectationWizardDialog dialog)
          Sets the EditExpectationWizardDialog.
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditExpectationWizard

public EditExpectationWizard(org.mockcentral.editor.nodes.expectation.ExpectationModel model,
                             org.mockcentral.editor.nodes.expectation.MethodNameValidator methodNamevalidator,
                             boolean isNewExpectation)
Creates a new instance.

Parameters:
model - the ExpectationModel containing the Mock Object method data.
methodNamevalidator - the MethodNameValidator used to ensure a valid method name.
isNewExpectation - a flag for whether this wizard is editing new Mock Object method expectation data.
Method Detail

getModel

public org.mockcentral.editor.nodes.expectation.ExpectationModel getModel()
Returns the ExpectationElementDataBean.

Returns:
the ExpectationElementDataBean.

getDialogSettingsManager

public EditExpectationWizardDialogSettingsManager getDialogSettingsManager()
Returns the EditExpectationWizardDialogSettingsManager.

Returns:
the EditExpectationWizardDialogSettingsManager.

performFinish

public boolean performFinish()
Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard

canFinish

public boolean canFinish()
Specified by:
canFinish in interface org.eclipse.jface.wizard.IWizard
Overrides:
canFinish in class org.eclipse.jface.wizard.Wizard

addPages

public void addPages()
Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard

setDialog

protected void setDialog(EditExpectationWizardDialog dialog)
Sets the EditExpectationWizardDialog. If a new expectation is being edited, this method loads a stored setting from the EditExpectationWizardDialogSettingsManager for the Mock Object method type.

Parameters:
dialog - the EditExpectationWizardDialog.

setCanFinish

protected void setCanFinish(boolean canFinish)
Sets the flag for whether this wizard can finish.

Parameters:
canFinish - the flag for whether this wizard can finish.