Class AbstractFiletypeWizardPage

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.swt.widgets.Text containerText  
      private IWizardPageDescriptor descriptor  
      private org.eclipse.swt.widgets.Text fileText  
      private org.eclipse.jface.viewers.ISelection selection  
      • Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider

        ERROR, INFORMATION, NONE, WARNING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createControl​(org.eclipse.swt.widgets.Composite parent)
      Creates the top level control for this dialog page under the given parent composite.
      private void dialogChanged()
      Ensures that both text fields are set.
      java.lang.String getContainerName()
      The currently path/folder of the file to create.
      java.lang.String getFileName()
      Returns the name of the file to create (including its file extension).
      private void handleBrowse()
      Uses the standard container selection dialog to choose the new value for the container field.
      private void initialize()
      Tests if the current workbench selection is a suitable container to use.
      private void updateStatus​(java.lang.String message)
      Displays/Removes errors.
      • Methods inherited from class org.eclipse.jface.wizard.WizardPage

        canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
      • Methods inherited from class org.eclipse.jface.dialogs.DialogPage

        convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage

        dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
    • Field Detail

      • containerText

        private org.eclipse.swt.widgets.Text containerText
      • fileText

        private org.eclipse.swt.widgets.Text fileText
      • selection

        private org.eclipse.jface.viewers.ISelection selection
    • Constructor Detail

      • AbstractFiletypeWizardPage

        public AbstractFiletypeWizardPage​(org.eclipse.jface.viewers.ISelection selection,
                                          IWizardPageDescriptor descriptor)
        Constructor for NewWizardPage's.
        Parameters:
        selection - The current object selection, as specified at #init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection).
        descriptor - Configuration of the editor (file extension, image, description, contents to create, ...)
    • Method Detail

      • createControl

        public void createControl​(org.eclipse.swt.widgets.Composite parent)
        Creates the top level control for this dialog page under the given parent composite.

        Implementors are responsible for ensuring that the created control can be accessed via getControl

        Parameters:
        parent - the parent composite
        See Also:
        IDialogPage.createControl(Composite)
      • initialize

        private void initialize()
        Tests if the current workbench selection is a suitable container to use.
      • handleBrowse

        private void handleBrowse()
        Uses the standard container selection dialog to choose the new value for the container field.
      • dialogChanged

        private void dialogChanged()
        Ensures that both text fields are set.
      • updateStatus

        private void updateStatus​(java.lang.String message)
        Displays/Removes errors.
        Parameters:
        message - An error message to display to the user, or null to delete it.
      • getContainerName

        public java.lang.String getContainerName()
        The currently path/folder of the file to create.
        Returns:
        The path/folder of the file to be create (maybe null).
      • getFileName

        public java.lang.String getFileName()
        Returns the name of the file to create (including its file extension).
        Returns:
        The name of the file to create (maybe null).