Class WizardExportResourcesPage
- All Implemented Interfaces:
IDialogPage,IMessageProvider,IWizardPage,Listener,IOverwriteQuery
Clients may subclass this page to inherit its common destination resource selection facilities.
Subclasses must implement
createDestinationGroup
Subclasses may override
allowNewContainerName
Subclasses may extend
handleEventinternalSaveWidgetValuesupdateWidgetEnablements
-
Field Summary
Fields inherited from class org.eclipse.ui.dialogs.WizardDataTransferPage
COMBO_HISTORY_LENGTH, SIZING_TEXT_FIELD_WIDTHFields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWizardExportResourcesPage(String pageName, IStructuredSelection selection) Creates an export wizard page. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanTheaddToHierarchyToCheckedStoreimplementation of thisWizardDataTransferPagemethod returnsfalse.protected ButtoncreateButton(Composite parent, int id, String label, boolean defaultButton) Creates a new button with the given id.protected final voidcreateButtonsGroup(Composite parent) Creates the buttons for selecting specific types or selecting all or none of the elements.voidcreateControl(Composite parent) Creates the top level control for this dialog page under the given parent composite.protected abstract voidcreateDestinationGroup(Composite parent) Creates the export destination specification visual components.protected final voidcreateResourcesGroup(Composite parent) Creates the checkbox tree and list for selecting resources.protected booleanensureResourcesLocal(List resources) Deprecated.Only retained for backwards compatibility.protected ListextractNonLocalResources(List originalList) Returns a new subcollection containing only those resources which are not local.protected StringGet the title for an error dialog.protected ListReturns this page's collection of currently-specified resources to be exported.protected IteratorReturns this page's collection of currently-specified resources to be exported.protected booleanReturns {trueif the page tree and list providers should show linked resources.protected ListReturns the resource extensions currently specified to be exported.protected ListReturns this page's collection of currently-specified resources to be exported.protected voidQueries the user for the types of resources to be exported and selects them in the checkbox group.protected booleanhasExportableExtension(String resourceName) Returns whether the extension of the given resource name is an extension that has been specified for export by the user.protected voidPersists additional setting that are to be restored in the next instance of this page.protected Object[]Queries the user for the resource types that are to be exported and returns these types as an array.protected voidRestores resource specification control settings that were persisted in the previous instance of this page.protected booleanSave any editors that the user wants to save before export.protected voidPersists resource specification control setting that are to be restored in the next instance of this page.protected voidSet the initial selections in the resource group.protected voidupdateContentProviders(boolean showLinked) Updates the resources tree to show or hide linked resourcesprotected voidCheck if widgets are enabled or disabled by a change in the dialog.Methods inherited from class org.eclipse.ui.dialogs.WizardDataTransferPage
addToHistory, addToHistory, createBoldLabel, createOptionsGroup, createOptionsGroupButtons, createPlainLabel, createSpacer, determinePageCompletion, displayErrorDialog, displayErrorDialog, getPathFromText, queryForContainer, queryForContainer, queryOverwrite, queryYesNoQuestion, restoreWidgetValues, updatePageCompletion, validateDestinationGroup, validateOptionsGroup, validateSourceGroupMethods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toStringMethods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisibleMethods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSizeMethods inherited from interface org.eclipse.swt.widgets.Listener
handleEvent
-
Constructor Details
-
WizardExportResourcesPage
Creates an export wizard page. If the current resource selection is not empty then it will be used as the initial collection of resources selected for export.- Parameters:
pageName- the name of the pageselection-IStructuredSelectionofIResource- See Also:
-
-
Method Details
-
allowNewContainerName
protected boolean allowNewContainerName()TheaddToHierarchyToCheckedStoreimplementation of thisWizardDataTransferPagemethod returnsfalse. Subclasses may override this method.- Specified by:
allowNewContainerNamein classWizardDataTransferPage- Returns:
trueif new ones are okay, andfalseif only existing ones are allowed
-
createButton
Creates a new button with the given id.The
Dialogimplementation 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.- Parameters:
parent- the parent compositeid- the id of the button (seeIDialogConstants.*_IDconstants for standard dialog button ids)label- the label from the buttondefaultButton-trueif the button is to be the default button, andfalseotherwise
-
createButtonsGroup
Creates the buttons for selecting specific types or selecting all or none of the elements.- Parameters:
parent- the parent control
-
createControl
Description copied from interface:IDialogPageCreates the top level control for this dialog page under the given parent composite.Implementors are responsible for ensuring that the created control can be accessed via
getControl- Parameters:
parent- the parent composite
-
createDestinationGroup
Creates the export destination specification visual components.Subclasses must implement this method.
- Parameters:
parent- the parent control
-
createResourcesGroup
Creates the checkbox tree and list for selecting resources.- Parameters:
parent- the parent control
-
getErrorDialogTitle
Description copied from class:WizardDataTransferPageGet the title for an error dialog. Subclasses should override.- Overrides:
getErrorDialogTitlein classWizardDataTransferPage
-
ensureResourcesLocal
Deprecated.Only retained for backwards compatibility.Obsolete method. This was implemented to handle the case where ensureLocal() needed to be called but it doesn't use it any longer. -
extractNonLocalResources
Returns a new subcollection containing only those resources which are not local.- Parameters:
originalList- the original list of resources (element type:IResource)- Returns:
- the new list of non-local resources (element type:
IResource)
-
getShowLinkedResources
protected boolean getShowLinkedResources()Returns {trueif the page tree and list providers should show linked resources. Default is false.- Since:
- 3.12
-
updateContentProviders
protected void updateContentProviders(boolean showLinked) Updates the resources tree to show or hide linked resources- Parameters:
showLinked- {trueif the page should show linked resources- Since:
- 3.12
-
getSelectedResources
Returns this page's collection of currently-specified resources to be exported. This is the primary resource selection facility accessor for subclasses.- Returns:
- a collection of resources currently selected for export (element
type:
IResource)
-
getSelectedResourcesIterator
Returns this page's collection of currently-specified resources to be exported. This is the primary resource selection facility accessor for subclasses.- Returns:
- an iterator over the collection of resources currently selected for
export (element type:
IResource). This will include white checked folders and individually checked files.
-
getTypesToExport
Returns the resource extensions currently specified to be exported.- Returns:
- the resource extensions currently specified to be exported (element
type:
String)
-
getWhiteCheckedResources
Returns this page's collection of currently-specified resources to be exported. This returns both folders and files - for just the files use getSelectedResources.- Returns:
- a collection of resources currently selected for export (element
type:
IResource)
-
handleTypesEditButtonPressed
protected void handleTypesEditButtonPressed()Queries the user for the types of resources to be exported and selects them in the checkbox group. -
hasExportableExtension
Returns whether the extension of the given resource name is an extension that has been specified for export by the user.- Parameters:
resourceName- the resource name- Returns:
trueif the resource name is suitable for export based upon its extension
-
internalSaveWidgetValues
protected void internalSaveWidgetValues()Persists additional setting that are to be restored in the next instance of this page.The
WizardImportPageimplementation of this method does nothing. Subclasses may extend to persist additional settings. -
queryResourceTypesToExport
Queries the user for the resource types that are to be exported and returns these types as an array.- Returns:
- the resource types selected for export (element type:
String), ornullif the user canceled the selection
-
restoreResourceSpecificationWidgetValues
protected void restoreResourceSpecificationWidgetValues()Restores resource specification control settings that were persisted in the previous instance of this page. Subclasses wishing to restore persisted values for their controls may extend. -
saveWidgetValues
protected void saveWidgetValues()Persists resource specification control setting that are to be restored in the next instance of this page. Subclasses wishing to persist additional setting for their controls should extend hook methodinternalSaveWidgetValues.- Overrides:
saveWidgetValuesin classWizardDataTransferPage
-
setupBasedOnInitialSelections
protected void setupBasedOnInitialSelections()Set the initial selections in the resource group. -
saveDirtyEditors
protected boolean saveDirtyEditors()Save any editors that the user wants to save before export.- Returns:
- boolean if the save was successful.
-
updateWidgetEnablements
protected void updateWidgetEnablements()Check if widgets are enabled or disabled by a change in the dialog.- Overrides:
updateWidgetEnablementsin classWizardDataTransferPage
-