com.aptana.ide.core.ui.wizards
Class WizardFolderImportPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by com.aptana.ide.core.ui.wizards.WizardFolderImportPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage, org.eclipse.ui.dialogs.IOverwriteQuery

public class WizardFolderImportPage
extends org.eclipse.jface.wizard.WizardPage
implements org.eclipse.ui.dialogs.IOverwriteQuery

The WizardProjectsImportPage is the page that allows the user to import projects from a particular location.


Field Summary
 
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
WizardFolderImportPage()
          Creates a new project creation wizard page.
WizardFolderImportPage(java.lang.String pageName)
          Create a new instance of the receiver.
WizardFolderImportPage(java.lang.String pageName, java.lang.String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
          Create a new instance of the receiver.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
 boolean createProjects()
          Create the selected projects
protected  void displayErrorDialog(java.lang.String message)
          Display an error dialog with the specified message.
protected  boolean executeImportOperation(org.eclipse.ui.wizards.datatransfer.ImportOperation op)
          Execute the passed import operation.
 java.lang.String getDirectoryPath()
           
protected  java.lang.String getErrorDialogTitle()
          Get the title for an error dialog.
protected  boolean getFilesForProject(java.util.Collection files, org.eclipse.ui.wizards.datatransfer.IImportStructureProvider provider, java.lang.Object entry)
          Return a list of all files in the project
protected  void handleLocationDirectoryButtonPressed()
          The browse button has been selected.
 java.lang.String queryOverwrite(java.lang.String pathString)
          The WizardDataTransfer implementation of this IOverwriteQuery method asks the user whether the existing resource at the given path should be overwritten.
 void setDirectoryPath(java.lang.String directoryPath)
           
static org.eclipse.ui.IViewPart showView(java.lang.String viewId, org.eclipse.ui.IWorkbenchWindow window)
          Show a specific view
 
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.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Constructor Detail

WizardFolderImportPage

public WizardFolderImportPage()
Creates a new project creation wizard page.


WizardFolderImportPage

public WizardFolderImportPage(java.lang.String pageName)
Create a new instance of the receiver.

Parameters:
pageName -

WizardFolderImportPage

public WizardFolderImportPage(java.lang.String pageName,
                              java.lang.String title,
                              org.eclipse.jface.resource.ImageDescriptor titleImage)
Create a new instance of the receiver.

Parameters:
pageName -
title -
titleImage -
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createControl in interface org.eclipse.jface.dialogs.IDialogPage
See Also:
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)

displayErrorDialog

protected void displayErrorDialog(java.lang.String message)
Display an error dialog with the specified message.

Parameters:
message - the error message

getErrorDialogTitle

protected java.lang.String getErrorDialogTitle()
Get the title for an error dialog. Subclasses should override.

Returns:
String

handleLocationDirectoryButtonPressed

protected void handleLocationDirectoryButtonPressed()
The browse button has been selected. Select the location.


createProjects

public boolean createProjects()
Create the selected projects

Returns:
boolean true if all project creations were successful.

getFilesForProject

protected boolean getFilesForProject(java.util.Collection files,
                                     org.eclipse.ui.wizards.datatransfer.IImportStructureProvider provider,
                                     java.lang.Object entry)
Return a list of all files in the project

Parameters:
files -
provider - The provider for the parent file
entry - The root directory of the project
Returns:
A list of all files in the project

executeImportOperation

protected boolean executeImportOperation(org.eclipse.ui.wizards.datatransfer.ImportOperation op)
Execute the passed import operation. Answer a boolean indicating success.

Parameters:
op -
Returns:
boolean

queryOverwrite

public java.lang.String queryOverwrite(java.lang.String pathString)
The WizardDataTransfer implementation of this IOverwriteQuery method asks the user whether the existing resource at the given path should be overwritten.

Specified by:
queryOverwrite in interface org.eclipse.ui.dialogs.IOverwriteQuery
Parameters:
pathString -
Returns:
the user's reply: one of "YES", "NO", "ALL", or "CANCEL"

getDirectoryPath

public java.lang.String getDirectoryPath()
Returns:
Returns the directoryPathField.

setDirectoryPath

public void setDirectoryPath(java.lang.String directoryPath)
Parameters:
directoryPath - The directoryPathField to set.

showView

public static org.eclipse.ui.IViewPart showView(java.lang.String viewId,
                                                org.eclipse.ui.IWorkbenchWindow window)
                                         throws org.eclipse.ui.PartInitException
Show a specific view

Parameters:
viewId - The ID of the view to show
window - The active window
Returns:
The IViewPart of the activated view.
Throws:
org.eclipse.ui.PartInitException