Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.dialogs
Class WizardExportResourcesPage

    java.lang.Object
      org.eclipse.jface.dialogs.DialogPage
          org.eclipse.jface.wizard.WizardPage
              org.eclipse.ui.dialogs.WizardDataTransferPage
                  org.eclipse.ui.dialogs.WizardExportResourcesPage

All Implemented Interfaces:
  IDialogPage, IMessageProvider, IOverwriteQuery, IWizardPage, Listener

public abstract class WizardExportResourcesPage
extends WizardDataTransferPage

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)` 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.

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, updateWidgetEnablements, validateDestinationGroup, validateOptionsGroup, validateSourceGroup`

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, setButtonLayoutData, 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

### WizardExportResourcesPage

    protected WizardExportResourcesPage(String pageName,
                                        IStructuredSelection selection)

  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 page
  `selection` - the current resource selection

Method Detail

### allowNewContainerName

    protected boolean allowNewContainerName()

  The `addToHierarchyToCheckedStore` implementation of this `WizardDataTransferPage` method returns `false`. Subclasses may override this method.

  Specified by:
    `allowNewContainerName` in class `WizardDataTransferPage`
  Returns:
    `true` if new ones are okay, and `false` if only existing ones are allowed

### createButton

    protected Button createButton(Composite parent,
                                  int id,
                                  String label,
                                  boolean defaultButton)

  Creates a new button with the given id.

  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.

  Parameters:
    `parent` - the parent composite
    `id` - the id of the button (see `IDialogConstants.*_ID` constants for standard dialog button ids)
    `label` - the label from the button
    `defaultButton` - `true` if the button is to be the default button, and `false` otherwise

### createButtonsGroup

    protected final void createButtonsGroup(Composite parent)

  Creates the buttons for selecting specific types or selecting all or none of the elements.

  Parameters:
    `parent` - the parent control

### createControl

    public void createControl(Composite parent)

  (non-Javadoc) Method declared on IDialogPage.

  Parameters:
    `parent` - the parent composite

### createDestinationGroup

    protected abstract void createDestinationGroup(Composite parent)

  Creates the export destination specification visual components.

  Subclasses must implement this method.

  Parameters:
    `parent` - the parent control

### createResourcesGroup

    protected final void createResourcesGroup(Composite parent)

  Creates the checkbox tree and list for selecting resources.

  Parameters:
    `parent` - the parent control

### getErrorDialogTitle

    protected String getErrorDialogTitle()

  Description copied from class: `WizardDataTransferPage`
  Get the title for an error dialog. Subclasses should override.

  Overrides:
    `getErrorDialogTitle` in class `WizardDataTransferPage`

### ensureResourcesLocal

    protected boolean ensureResourcesLocal(List resources)

  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

    protected List extractNonLocalResources(List originalList)

  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`)

### getSelectedResources

    protected List 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

    protected Iterator 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

    protected List getTypesToExport()

  Returns the resource extensions currently specified to be exported.

  Returns:
    the resource extensions currently specified to be exported (element type: `String`)

### getWhiteCheckedResources

    protected List 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

    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.

  Parameters:
    `resourceName` - the resource name
  Returns:
    `true` if 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 `WizardImportPage` implementation of this method does nothing. Subclasses may extend to persist additional settings.

### queryResourceTypesToExport

    protected Object[] 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`), or `null` if 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 method `internalSaveWidgetValues`.

  Overrides:
    `saveWidgetValues` in class `WizardDataTransferPage`

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.