public abstract class WizardExportResourcesPage extends WizardDataTransferPage
Clients may subclass this page to inherit its common destination resource selection facilities.
Subclasses must implement
createDestinationGroup
Subclasses may override
allowNewContainerName
Subclasses may extend
handleEvent
internalSaveWidgetValues
updateWidgetEnablements
COMBO_HISTORY_LENGTH, SIZING_TEXT_FIELD_WIDTH
ERROR, INFORMATION, NONE, WARNING
Modifier | Constructor and Description |
---|---|
protected |
WizardExportResourcesPage(String pageName,
IStructuredSelection selection)
Creates an export wizard page.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowNewContainerName()
The
addToHierarchyToCheckedStore implementation of this
WizardDataTransferPage method returns false . |
protected Button |
createButton(Composite parent,
int id,
String label,
boolean defaultButton)
Creates a new button with the given id.
|
protected void |
createButtonsGroup(Composite parent)
Creates the buttons for selecting specific types or selecting all or none of the
elements.
|
void |
createControl(Composite parent)
(non-Javadoc)
Method declared on IDialogPage.
|
protected abstract void |
createDestinationGroup(Composite parent)
Creates the export destination specification visual components.
|
protected void |
createResourcesGroup(Composite parent)
Creates the checkbox tree and list for selecting resources.
|
protected boolean |
ensureResourcesLocal(List resources)
Deprecated.
Only retained for backwards compatibility.
|
protected List |
extractNonLocalResources(List originalList)
Returns a new subcollection containing only those resources which are not
local.
|
protected String |
getErrorDialogTitle()
Get the title for an error dialog.
|
protected List |
getSelectedResources()
Returns this page's collection of currently-specified resources to be
exported.
|
protected Iterator |
getSelectedResourcesIterator()
Returns this page's collection of currently-specified resources to be
exported.
|
protected List |
getTypesToExport()
Returns the resource extensions currently specified to be exported.
|
protected List |
getWhiteCheckedResources()
Returns this page's collection of currently-specified resources to be
exported.
|
protected void |
handleTypesEditButtonPressed()
Queries the user for the types of resources to be exported and selects
them in the checkbox group.
|
protected boolean |
hasExportableExtension(String resourceName)
Returns whether the extension of the given resource name is an extension that
has been specified for export by the user.
|
protected void |
internalSaveWidgetValues()
Persists additional setting that are to be restored in the next instance of
this page.
|
protected Object[] |
queryResourceTypesToExport()
Queries the user for the resource types that are to be exported and returns
these types as an array.
|
protected void |
restoreResourceSpecificationWidgetValues()
Restores resource specification control settings that were persisted
in the previous instance of this page.
|
protected boolean |
saveDirtyEditors()
Save any editors that the user wants to save before export.
|
protected void |
saveWidgetValues()
Persists resource specification control setting that are to be restored
in the next instance of this page.
|
protected void |
setupBasedOnInitialSelections()
Set the initial selections in the resource group.
|
protected void |
updateWidgetEnablements()
Check if widgets are enabled or disabled by a change in the dialog.
|
addToHistory, addToHistory, createBoldLabel, createOptionsGroup, createOptionsGroupButtons, createPlainLabel, createSpacer, determinePageCompletion, displayErrorDialog, displayErrorDialog, getPathFromText, queryForContainer, queryForContainer, queryOverwrite, queryYesNoQuestion, restoreWidgetValues, updatePageCompletion, validateDestinationGroup, validateOptionsGroup, validateSourceGroup
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
handleEvent
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
protected WizardExportResourcesPage(String pageName, IStructuredSelection selection)
pageName
- the name of the pageselection
- IStructuredSelection
of IResource
IDE.computeSelectedResources(IStructuredSelection)
protected boolean allowNewContainerName()
addToHierarchyToCheckedStore
implementation of this
WizardDataTransferPage
method returns false
.
Subclasses may override this method.allowNewContainerName
in class WizardDataTransferPage
true
if new ones are okay, and false
if only existing ones are allowedprotected Button createButton(Composite parent, int id, String label, boolean defaultButton)
The Dialog
implementation of this framework method
creates a standard push button, registers for selection events
including button presses and registers
default buttons with its shell.
The button id is stored as the buttons client data.
Note that the parent's layout is assumed to be a GridLayout and
the number of columns in this layout is incremented.
Subclasses may override.
parent
- the parent compositeid
- the id of the button (see
IDialogConstants.*_ID
constants
for standard dialog button ids)label
- the label from the buttondefaultButton
- true
if the button is to be the
default button, and false
otherwiseprotected final void createButtonsGroup(Composite parent)
parent
- the parent controlpublic void createControl(Composite parent)
parent
- the parent compositeprotected abstract void createDestinationGroup(Composite parent)
Subclasses must implement this method.
parent
- the parent controlprotected final void createResourcesGroup(Composite parent)
parent
- the parent controlprotected String getErrorDialogTitle()
WizardDataTransferPage
getErrorDialogTitle
in class WizardDataTransferPage
@Deprecated protected boolean ensureResourcesLocal(List resources)
protected List extractNonLocalResources(List originalList)
originalList
- the original list of resources (element type:
IResource
)IResource
)protected List getSelectedResources()
IResource
)protected Iterator getSelectedResourcesIterator()
IResource
). This will include
white checked folders and individually checked files.protected List getTypesToExport()
String
)protected List getWhiteCheckedResources()
IResource
)protected void handleTypesEditButtonPressed()
protected boolean hasExportableExtension(String resourceName)
resourceName
- the resource nametrue
if the resource name is suitable for export based
upon its extensionprotected void internalSaveWidgetValues()
The WizardImportPage
implementation of this method does
nothing. Subclasses may extend to persist additional settings.
protected Object[] queryResourceTypesToExport()
String
), or null
if the user canceled the
selectionprotected void restoreResourceSpecificationWidgetValues()
protected void saveWidgetValues()
internalSaveWidgetValues
.saveWidgetValues
in class WizardDataTransferPage
protected void setupBasedOnInitialSelections()
protected boolean saveDirtyEditors()
protected void updateWidgetEnablements()
updateWidgetEnablements
in class WizardDataTransferPage
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.