Class NewWizard

All Implemented Interfaces:
IShellProvider, IWizard, INewWizard, IWorkbenchWizard
Direct Known Subclasses:
NewContextMenuWizard, NewDBTransactionWizard, NewFolderWizard, NewFontFacesWizard, NewImageDefinitionWizard, NewPanelWizard, NewScreenWizard, NewSelectorWizard, NewStyleWizard, NewSVGDefinitionWizard, NewTextTableWizard, NewVirtualSpaceWizard, NewWebServiceWizard

public class NewWizard extends Wizard implements INewWizard
Wizard to create a new IIZI files, e.g. a panel, a text table, etc. It provides the base wizard and the first page.
Author:
Christopher Mindus
  • Field Details

    • model

      protected final ModuleModel model
      The module model.
    • lastViewer

      protected final StructuredViewer lastViewer
      The last viewer.
    • initSelectedParentFolder

      protected FolderPropCnr initSelectedParentFolder
      The selected parent folder, null for not found.
  • Constructor Details

    • NewWizard

      public NewWizard(String wizardTitle, String image)
      Creates the common wizard.
    • NewWizard

      public NewWizard(String wizardTitle, ImageDescriptor imageDescriptor)
      Creates the common wizard.
  • Method Details

    • init

      public void init(IWorkbench workbench, IStructuredSelection selection)
      Initializes this creation wizard using the passed workbench and object selection.
      Specified by:
      init in interface IWorkbenchWizard
    • getInitSelectedFolderPath

      public String getInitSelectedFolderPath()
      Gets the path of parent folder that was selected at initialization of dialog in the Explorer.
      Returns:
      The folder path, or null for none.
    • performFinish

      public boolean performFinish()
      Finishes the dialog.
      Specified by:
      performFinish in interface IWizard
      Specified by:
      performFinish in class Wizard
      Returns:
      true to indicate the finish request was accepted, and false to indicate that the finish request was refused.
    • addPage

      public void addPage(IWizardPage page)
      Overrides:
      addPage in class Wizard
    • createNewFile

      protected DesignerProp createNewFile(PropCnr container)
      Creates the new file in the wizard and opens the editor.
      Parameters:
      container - The contents of the new file.
      Returns:
      The DesignerProp for the new file, or null for error.
    • createNewFile

      protected DesignerProp createNewFile(PropCnr container, boolean doOpenEditor)
      Creates the new file in the wizard and opens the editor.
      Parameters:
      container - The contents of the new file.
      doOpenEditor - Flag to open the editor or not.
      Returns:
      The DesignerProp for the new file, or null for error.
    • createNewFile

      protected DesignerProp createNewFile(PropCnr container, IFileCreated fileCreated, boolean doOpenEditor)
      Creates the new file in the wizard.
      Parameters:
      container - The contents of the new file.
      fileCreated - Interface to call when file has been created (from that thread), or null for none.
      doOpenEditor - Flag to open the editor or not.
      Returns:
      The DesignerProp for the new file, or null for error.
    • createNewFile

      protected DesignerProp createNewFile(String label, IFile newFileHandle, PropCnr container, IFileCreated fileCreated, boolean doOpenEditor)
      Creates a new file.
      Parameters:
      label - The label for the undo operation.
      newFileHandle - The file handle for the new file to create.
      container - The initial file contents.
      fileCreated - Interface to call when file has been created (from that thread), or null for none.
      doOpenEditor - Flag to open the editor or not.
      Returns:
      The DesignerProp for the new file, or null for error.