edu.cmu.sei.aadl.model.core.presentation
Class CoreModelWizard

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by edu.cmu.sei.aadl.model.core.presentation.CoreModelWizard
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizard, org.eclipse.ui.INewWizard, org.eclipse.ui.IWorkbenchWizard

public class CoreModelWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.INewWizard

This is a simple wizard for creating a new model file.


Nested Class Summary
 class CoreModelWizard.ButtonAndTextListener
           
 class CoreModelWizard.CoreModelWizardInitialObjectCreationPage
          This is the page where the type of object to create is selected
 class CoreModelWizard.CoreModelWizardNewFileCreationPage
          This is the one page of the wizard
 
Field Summary
static int AADL_PACKAGE
          Specifies an Aadl Package.
static int AADL_PROPERTY_SET
          Specifies an Aadl Property Set.
static int AADL_SPEC
          Specifies an Aadl Spec.
static java.lang.String copyright
           
protected  CoreFactory coreFactory
          This caches an instance of the model factory
protected  CorePackage corePackage
          This caches an instance of the model package
protected  CoreModelWizard.CoreModelWizardInitialObjectCreationPage initialObjectCreationPage
          This is the initial object creation page
protected  java.util.List initialObjectNames
          Caches the names of the types that can be created as the root object
protected  int initialObjectType
           
protected  CoreModelWizard.CoreModelWizardNewFileCreationPage newFileCreationPage
          This is the file creation page
protected  edu.cmu.sei.aadl.model.core.presentation.CoreModelWizard.CoreModelWizardNewObjectCreationPage newObjectCreationPage
          This is the only page of the wizard.
protected  org.eclipse.core.resources.IProject project
          Selected project in the package explorer.
protected  org.eclipse.jface.viewers.IStructuredSelection selection
          Remember the selection during initialization for populating the default container
protected  org.eclipse.ui.IWorkbench workbench
          Remember the workbench during initialization
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
CoreModelWizard()
           
 
Method Summary
 void addPages()
          The framework calls this to create the contents of the wizard
protected  java.util.Collection getInitialObjectNames()
          Returns the names of the types that can be created as the root object
 org.eclipse.core.resources.IFile getModelFile()
          Get the file from the page
 void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)
          This just records the information
 boolean performFinish()
          Do the work after everything is specified
 void setInitialObjectType(int initialObjectType)
          Specifies which radio button should be selected when the wizard page is displayed.
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, 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
 
Methods inherited from interface org.eclipse.jface.wizard.IWizard
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

AADL_SPEC

public static final int AADL_SPEC
Specifies an Aadl Spec. Used by the setInitialObjectType method.

See Also:
Constant Field Values

AADL_PACKAGE

public static final int AADL_PACKAGE
Specifies an Aadl Package. Used by the setInitalObjectType method.

See Also:
Constant Field Values

AADL_PROPERTY_SET

public static final int AADL_PROPERTY_SET
Specifies an Aadl Property Set. Used by the setInitalObjectType method.

See Also:
Constant Field Values

corePackage

protected CorePackage corePackage
This caches an instance of the model package.


coreFactory

protected CoreFactory coreFactory
This caches an instance of the model factory.


newFileCreationPage

protected CoreModelWizard.CoreModelWizardNewFileCreationPage newFileCreationPage
This is the file creation page.


initialObjectCreationPage

protected CoreModelWizard.CoreModelWizardInitialObjectCreationPage initialObjectCreationPage
This is the initial object creation page.


selection

protected org.eclipse.jface.viewers.IStructuredSelection selection
Remember the selection during initialization for populating the default container.


newObjectCreationPage

protected edu.cmu.sei.aadl.model.core.presentation.CoreModelWizard.CoreModelWizardNewObjectCreationPage newObjectCreationPage
This is the only page of the wizard. Instanciated in addPages and accessed in performFinish.


workbench

protected org.eclipse.ui.IWorkbench workbench
Remember the workbench during initialization.


initialObjectNames

protected java.util.List initialObjectNames
Caches the names of the types that can be created as the root object.


project

protected org.eclipse.core.resources.IProject project
Selected project in the package explorer. This will become the selected project in the wizard's page.


initialObjectType

protected int initialObjectType
Constructor Detail

CoreModelWizard

public CoreModelWizard()
Method Detail

init

public void init(org.eclipse.ui.IWorkbench workbench,
                 org.eclipse.jface.viewers.IStructuredSelection selection)
This just records the information.

Specified by:
init in interface org.eclipse.ui.IWorkbenchWizard

getInitialObjectNames

protected java.util.Collection getInitialObjectNames()
Returns the names of the types that can be created as the root object.


setInitialObjectType

public void setInitialObjectType(int initialObjectType)
Specifies which radio button should be selected when the wizard page is displayed.

Parameters:
initialObjectType - AADL_SPEC, AADL_PACKAGE, or AADL_PROPERTY_SET.

performFinish

public boolean performFinish()
Do the work after everything is specified. Generates the appropriate files with the appropriate code within.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard

addPages

public void addPages()
The framework calls this to create the contents of the wizard.

Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard

getModelFile

public org.eclipse.core.resources.IFile getModelFile()
Get the file from the page.