Class AbstractFiletypeWizardPage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.wizard.WizardPage
-
- net.ssehub.easy.dslCore.ui.wizards.AbstractFiletypeWizardPage
-
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage,org.eclipse.jface.dialogs.IMessageProvider,org.eclipse.jface.wizard.IWizardPage
- Direct Known Subclasses:
CommentsFiletypeWizardPage,IVMLFiletypeWizardPage,VILFiletypeWizardPage,VTLFiletypeWizardPage
public class AbstractFiletypeWizardPage extends org.eclipse.jface.wizard.WizardPageThe "New" wizard page allows setting the container for the new file as well as the file name. The page will only accept file name without the extension OR with the correct file extension (cf.IWizardPageDescriptor.getFileExtension()).- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.TextcontainerTextprivate IWizardPageDescriptordescriptorprivate org.eclipse.swt.widgets.TextfileTextprivate org.eclipse.jface.viewers.ISelectionselection
-
Constructor Summary
Constructors Constructor Description AbstractFiletypeWizardPage(org.eclipse.jface.viewers.ISelection selection, IWizardPageDescriptor descriptor)Constructor for NewWizardPage's.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateControl(org.eclipse.swt.widgets.Composite parent)Creates the top level control for this dialog page under the given parent composite.private voiddialogChanged()Ensures that both text fields are set.java.lang.StringgetContainerName()The currently path/folder of the file to create.java.lang.StringgetFileName()Returns the name of the file to create (including its file extension).private voidhandleBrowse()Uses the standard container selection dialog to choose the new value for the container field.private voidinitialize()Tests if the current workbench selection is a suitable container to use.private voidupdateStatus(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
-
-
-
-
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
-
descriptor
private IWizardPageDescriptor descriptor
-
-
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).
-
-