public abstract class WizardResourceImportPage extends WizardDataTransferPage
Clients may subclass this page to inherit its common destination resource selection facilities.
Subclasses must implement
createSourceGroupSubclasses may override
allowNewContainerNameSubclasses may extend
handleEvent| Modifier and Type | Field and Description |
|---|---|
protected List |
selectedTypes |
protected org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup |
selectionGroup |
COMBO_HISTORY_LENGTH, SIZING_TEXT_FIELD_WIDTHERROR, INFORMATION, NONE, WARNING| Modifier | Constructor and Description |
|---|---|
protected |
WizardResourceImportPage(String name,
IStructuredSelection selection)
Creates an import wizard page.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowNewContainerName()
The
WizardResourceImportPage implementation of this
WizardDataTransferPage method returns true. |
void |
createControl(Composite parent)
(non-Javadoc)
Method declared on IDialogPage.
|
protected void |
createDestinationGroup(Composite parent)
Creates the import destination specification controls.
|
protected void |
createFileSelectionGroup(Composite parent)
Create the import source selection widget
|
protected abstract void |
createSourceGroup(Composite parent)
Creates the import source specification controls.
|
protected boolean |
determinePageCompletion()
Returns whether this page is complete.
|
protected IPath |
getContainerFullPath()
Returns the path of the container resource specified in the container
name entry field, or
null if no name has been typed in. |
protected String |
getErrorDialogTitle()
Get the title for an error dialog.
|
protected abstract ITreeContentProvider |
getFileProvider()
Returns a content provider for
FileSystemElements that returns
only files as children. |
protected abstract ITreeContentProvider |
getFolderProvider()
Returns a content provider for
FileSystemElements that returns
only folders as children. |
protected IPath |
getResourcePath()
Return the path for the resource field.
|
protected List |
getSelectedResources()
Returns this page's list of currently-specified resources to be
imported.
|
protected void |
getSelectedResources(org.eclipse.ui.internal.ide.dialogs.IElementFilter filter,
IProgressMonitor monitor)
Returns this page's list of currently-specified resources to be
imported filtered by the IElementFilter.
|
protected String |
getSourceConflictMessage()
Returns the error message for when the source conflicts
with the destination.
|
protected IContainer |
getSpecifiedContainer()
Returns the container resource specified in the container name entry field,
or
null if such a container does not exist in the workbench. |
protected List |
getTypesToImport()
Returns a collection of the currently-specified resource types for
use by the type selection dialog.
|
protected void |
handleContainerBrowseButtonPressed()
Opens a container selection dialog and displays the user's subsequent
container resource selection in this page's container name field.
|
void |
handleEvent(Event event)
The
WizardResourceImportPage implementation of this
Listener method handles all events and enablements for controls
on this page. |
protected void |
handleTypesEditButtonPressed()
Open a registered type selection dialog and note the selections
in the receivers types-to-export field
|
protected void |
initialPopulateContainerField()
Sets the initial contents of the container name field.
|
protected void |
setAllSelections(boolean value)
Set all of the selections in the selection group to value
|
void |
setContainerFieldValue(String value)
Sets the value of this page's container resource field, or stores
it for future use if this page's controls do not exist yet.
|
protected void |
setupSelectionsBasedOnSelectedTypes()
Update the tree to only select those elements that match the selected types.
|
protected boolean |
sourceConflictsWithDestination(IPath sourcePath)
Returns whether or not the source location conflicts
with the destination resource.
|
protected void |
updateSelections(Map map)
Update the selections with those in map .
|
protected void |
updateWidgetEnablements()
Check if widgets are enabled or disabled by a change in the dialog.
|
protected boolean |
validateDestinationGroup()
Returns whether this page's destination specification controls currently all
contain valid values.
|
addToHistory, addToHistory, createBoldLabel, createOptionsGroup, createOptionsGroupButtons, createPlainLabel, createSpacer, displayErrorDialog, displayErrorDialog, getPathFromText, queryForContainer, queryForContainer, queryOverwrite, queryYesNoQuestion, restoreWidgetValues, saveWidgetValues, updatePageCompletion, validateOptionsGroup, validateSourceGroupcanFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toStringconvertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisibleprotected List selectedTypes
protected org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup selectionGroup
protected WizardResourceImportPage(String name, IStructuredSelection selection)
name - the name of the pageselection - the current resource selectionprotected boolean allowNewContainerName()
WizardResourceImportPage implementation of this
WizardDataTransferPage method returns true.
Subclasses may override this method.allowNewContainerName in class WizardDataTransferPagetrue if new ones are okay, and false
if only existing ones are allowedpublic void createControl(Composite parent)
parent - the parent compositeprotected final void createDestinationGroup(Composite parent)
parent - the parent controlprotected void createFileSelectionGroup(Composite parent)
protected abstract void createSourceGroup(Composite parent)
Subclasses must implement this method.
parent - the parent controlprotected String getErrorDialogTitle()
WizardDataTransferPagegetErrorDialogTitle in class WizardDataTransferPageprotected IPath getContainerFullPath()
null if no name has been typed in.
The container specified by the full path might not exist and would need to be created.
nullprotected abstract ITreeContentProvider getFileProvider()
FileSystemElements that returns
only files as children.protected abstract ITreeContentProvider getFolderProvider()
FileSystemElements that returns
only folders as children.protected IPath getResourcePath()
protected List getSelectedResources()
IResource)protected void getSelectedResources(org.eclipse.ui.internal.ide.dialogs.IElementFilter filter,
IProgressMonitor monitor)
throws InterruptedException
InterruptedExceptionprotected IContainer getSpecifiedContainer()
null if such a container does not exist in the workbench.nullprotected List getTypesToImport()
protected void handleContainerBrowseButtonPressed()
public void handleEvent(Event event)
WizardResourceImportPage implementation of this
Listener method handles all events and enablements for controls
on this page. Subclasses may extend.event - Eventprotected void handleTypesEditButtonPressed()
protected final void initialPopulateContainerField()
protected void setAllSelections(boolean value)
value - booleanpublic void setContainerFieldValue(String value)
value - Stringprotected void setupSelectionsBasedOnSelectedTypes()
protected void updateSelections(Map map)
map - Map - key tree elements, values Lists of list elementsprotected void updateWidgetEnablements()
updateWidgetEnablements in class WizardDataTransferPageprotected final boolean validateDestinationGroup()
WizardDataTransferPage
The WizardDataTransferPage implementation of this method returns
true. Subclasses may reimplement this hook method.
validateDestinationGroup in class WizardDataTransferPagetrue indicating validity of all controls in the
destination specification groupprotected final String getSourceConflictMessage()
protected boolean sourceConflictsWithDestination(IPath sourcePath)
false is returned.sourcePath - the path being checkedtrue if the source location conflicts with the
destination resource, false if notprotected boolean determinePageCompletion()
WizardDataTransferPagevalidateSourceGroup and/or validateOptionsGroup.determinePageCompletion in class WizardDataTransferPagetrue if this page is complete, and false if
incompleteWizardDataTransferPage.validateSourceGroup(),
WizardDataTransferPage.validateOptionsGroup()Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.