public class AbstractFileNewWizardPage
extends org.eclipse.jface.wizard.WizardPage
implements org.eclipse.swt.widgets.Listener
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.core.resources.IResource |
initialSelection |
protected AbstractFileNewWizard |
wizard |
Constructor and Description |
---|
AbstractFileNewWizardPage(AbstractFileNewWizard wizard,
org.eclipse.core.resources.IResource initialSelection)
Creates a new complete OCL file creation wizard page.
|
Modifier and Type | Method and Description |
---|---|
void |
createControl(org.eclipse.swt.widgets.Composite parent)
(non-Javadoc) Method declared on IDialogPage.
|
org.eclipse.core.resources.IFile |
createNewFile()
Creates a new complete OCL file resource in the selected container and
with the selected name.
|
java.io.InputStream |
getInitialContents()
Returns a stream containing the initial contents to be given to new
complete OCL file resource instances.
|
void |
handleEvent(org.eclipse.swt.widgets.Event event)
The
WizardNewFileCreationPage implementation of this
Listener method handles all events and enablements for
controls on this page. |
AbstractFileDialog |
initDialog(org.eclipse.core.resources.IResource initialSelection) |
void |
setVisible(boolean visible) |
protected boolean |
validatePage()
Returns whether this page's controls currently all contain valid values.
|
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
@NonNull protected final AbstractFileNewWizard wizard
@Nullable protected final org.eclipse.core.resources.IResource initialSelection
public AbstractFileNewWizardPage(@NonNull AbstractFileNewWizard wizard, @Nullable org.eclipse.core.resources.IResource initialSelection)
public void createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in interface org.eclipse.jface.dialogs.IDialogPage
public org.eclipse.core.resources.IFile createNewFile()
In normal usage, this method is invoked after the user has pressed Finish on the wizard; the enablement of the Finish button implies that all controls on on this page currently contain valid values.
Note that this page caches the new complete OCL file once it has been successfully created; subsequent invocations of this method will answer the same file resource without attempting to create it again.
This method should be called within a workspace modify operation since it creates resources.
null
if the file was
not createdpublic java.io.InputStream getInitialContents()
public void handleEvent(org.eclipse.swt.widgets.Event event)
WizardNewFileCreationPage
implementation of this
Listener
method handles all events and enablements for
controls on this page. Subclasses may extend.handleEvent
in interface org.eclipse.swt.widgets.Listener
@NonNull public AbstractFileDialog initDialog(@Nullable org.eclipse.core.resources.IResource initialSelection)
public void setVisible(boolean visible)
setVisible
in interface org.eclipse.jface.dialogs.IDialogPage
setVisible
in class org.eclipse.jface.dialogs.DialogPage
protected boolean validatePage()
true
if all controls are valid, and
false
if at least one is invalid