|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.dialogs.DialogPage | +--org.eclipse.jface.wizard.WizardPage | +--org.eclipse.ui.dialogs.WizardDataTransferPage | +--org.eclipse.ui.dialogs.WizardExportResourcesPage
Abstract superclass for a typical export wizard's main page.
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
Field Summary |
Fields inherited from class org.eclipse.ui.dialogs.WizardDataTransferPage |
COMBO_HISTORY_LENGTH, SIZING_TEXT_FIELD_WIDTH |
Fields inherited from interface org.eclipse.ui.dialogs.IOverwriteQuery |
ALL, CANCEL, NO, NO_ALL, YES |
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
protected |
WizardExportResourcesPage(String pageName,
IStructuredSelection selection)
Creates an export wizard page. |
Method Summary | |
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)
Ensures that all resources have local contents. |
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 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. |
Methods 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, toString |
Methods 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, setControl, setMessage, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.swt.widgets.Listener |
handleEvent |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible |
Constructor Detail |
protected WizardExportResourcesPage(String pageName, IStructuredSelection selection)
pageName
- the name of the pageselection
- the current resource selectionMethod Detail |
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
protected boolean ensureResourcesLocal(List resources)
Note that this is a potentially long operation which should be used sparingly (in other words, once per export operation, likely just before performance of the export).
resources
- the list of resources to ensure locality for
true
for successful completionprotected 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 name
true
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()
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |