public class WizardNewFolderMainPage extends WizardPage implements Listener
This page may be used by clients as-is; it may be also be subclassed to suit.
Subclasses may extend
handleEvent
ERROR, INFORMATION, NONE, WARNING
Constructor and Description |
---|
WizardNewFolderMainPage(String pageName,
IStructuredSelection selection)
Creates a new folder creation wizard page.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createAdvancedControls(Composite parent)
Creates the widget for advanced options.
|
protected IContainer |
createContainerHandle(IPath containerPath)
Creates a container resource handle for the container with the given workspace path.
|
void |
createControl(Composite parent)
(non-Javadoc) Method declared on IDialogPage.
|
protected void |
createFolder(IFolder folderHandle,
IProgressMonitor monitor)
Deprecated.
As of 3.3, use
createNewFolder() which uses the
undoable operation support. |
protected IFolder |
createFolderHandle(IPath folderPath)
Creates a folder resource handle for the folder with the given workspace
path.
|
protected void |
createLinkTarget()
Creates the link target path if a link target has been specified.
|
IFolder |
createNewFolder()
Creates a new folder resource in the selected container and with the
selected name.
|
protected void |
handleAdvancedButtonSelect()
Shows/hides the advanced option widgets.
|
void |
handleEvent(Event ev)
The
WizardNewFolderCreationPage implementation of this
Listener method handles all events and enablements for
controls on this page. |
protected void |
initializePage()
Initializes this page's controls.
|
void |
setVisible(boolean visible)
The
DialogPage implementation of this
IDialogPage method sets the control to the given
visibility state. |
protected IStatus |
validateLinkedResource()
Checks whether the linked resource target is valid.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
public WizardNewFolderMainPage(String pageName, IStructuredSelection selection)
pageName
- the name of the pageselection
- the current resource selectionprotected void createAdvancedControls(Composite parent)
parent
- the parent compositepublic void createControl(Composite parent)
createControl
in interface IDialogPage
parent
- the parent compositeprotected void createFolder(IFolder folderHandle, IProgressMonitor monitor) throws CoreException
createNewFolder()
which uses the
undoable operation support.folderHandle
- the folder handle to create a folder resource formonitor
- the progress monitor to show visual progress withCoreException
- if the operation failsOperationCanceledException
- if the operation is canceledprotected IFolder createFolderHandle(IPath folderPath)
createFolder
.folderPath
- the path of the folder resource to create a handle forcreateFolder(org.eclipse.core.resources.IFolder, org.eclipse.core.runtime.IProgressMonitor)
protected IContainer createContainerHandle(IPath containerPath)
containerPath
- the path of the container resource to create a handle forcreateFolder(org.eclipse.core.resources.IFolder, org.eclipse.core.runtime.IProgressMonitor)
protected void createLinkTarget()
public IFolder createNewFolder()
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 this page currently contain valid values.
Note that this page caches the new folder once it has been successfully created; subsequent invocations of this method will answer the same folder resource without attempting to create it again.
This method should be called within a workspace modify operation since it creates resources.
null
if the folder
was not createdprotected void handleAdvancedButtonSelect()
public void handleEvent(Event ev)
WizardNewFolderCreationPage
implementation of this
Listener
method handles all events and enablements for
controls on this page. Subclasses may extend.handleEvent
in interface Listener
ev
- the event which occurredprotected void initializePage()
public void setVisible(boolean visible)
DialogPage
DialogPage
implementation of this
IDialogPage
method sets the control to the given
visibility state. Subclasses may extend.setVisible
in interface IDialogPage
setVisible
in class DialogPage
visible
- true
to make this page visible,
and false
to hide itprotected IStatus validateLinkedResource()
protected boolean validatePage()
true
if all controls are valid, and
false
if at least one is invalid
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.