public class LinkedFolderCreationMainPage
extends org.eclipse.jface.wizard.WizardPage
implements org.eclipse.swt.widgets.Listener
This page may be used by clients as-is; it may be also be subclassed to suit.
Subclasses may extend
handleEvent
Constructor and Description |
---|
LinkedFolderCreationMainPage(org.eclipse.jface.viewers.IStructuredSelection selection)
Creates a new folder creation wizard page.
|
Modifier and Type | Method and Description |
---|---|
void |
createControl(org.eclipse.swt.widgets.Composite parent)
(non-Javadoc) Method declared on IDialogPage.
|
protected org.eclipse.core.resources.IFolder |
createFolderHandle(org.eclipse.core.runtime.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.
|
org.eclipse.core.resources.IFolder |
createNewLinkedFolder()
Creates a new folder resource in the selected container and with the selected name.
|
protected void |
doCreateControls(org.eclipse.swt.widgets.Composite parent)
Creates the widget for advanced options.
|
protected void |
doShellResizing(org.eclipse.swt.widgets.Composite parent)
Shows/hides the advanced option widgets.
|
protected org.eclipse.core.runtime.IPath |
getContainerFullPath() |
protected java.lang.String |
getFolderName() |
void |
handleEvent(org.eclipse.swt.widgets.Event ev)
The
WizardNewFolderCreationPage implementation of this Listener method handles all
events and enablements for controls on this page. |
protected void |
initializeContainerPath()
Initializes this page's container path.
|
protected org.eclipse.core.runtime.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, setVisible
public LinkedFolderCreationMainPage(org.eclipse.jface.viewers.IStructuredSelection selection)
pageName
- the name of the pageselection
- the current resource selectionpublic void createControl(org.eclipse.swt.widgets.Composite parent)
createControl
in interface org.eclipse.jface.dialogs.IDialogPage
protected void doCreateControls(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositeprotected java.lang.String getFolderName()
protected org.eclipse.core.resources.IFolder createFolderHandle(org.eclipse.core.runtime.IPath folderPath)
createFolder
.folderPath
- the path of the folder resource to create a handle forprotected void createLinkTarget()
public org.eclipse.core.resources.IFolder createNewLinkedFolder()
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 doShellResizing(org.eclipse.swt.widgets.Composite parent)
public void handleEvent(org.eclipse.swt.widgets.Event ev)
WizardNewFolderCreationPage
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
protected void initializeContainerPath()
protected org.eclipse.core.runtime.IStatus validateLinkedResource()
protected boolean validatePage()
true
if all controls are valid, and false
if at least one is invalidprotected org.eclipse.core.runtime.IPath getContainerFullPath()