org.eclipse.mylar.internal.tasks.ui.wizards
Class TaskDataImportWizard

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by org.eclipse.mylar.internal.tasks.ui.wizards.TaskDataImportWizard
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizard, org.eclipse.ui.IImportWizard, org.eclipse.ui.IWorkbenchWizard

public class TaskDataImportWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.IImportWizard

Author:
Rob Elves Some code leveraged from TaskDataExportWizard

Nested Class Summary
(package private)  class TaskDataImportWizard.FileCopyJob
          Job that performs the file copying and zipping
 
Field Summary
private  TaskDataImportWizardPage importPage
           
private static java.lang.String SETTINGS_SECTION
           
private static java.lang.String WINDOW_TITLE
           
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
TaskDataImportWizard()
           
 
Method Summary
 void addPages()
           
 boolean canFinish()
           
private  boolean copy(java.io.File src, java.io.File dst)
           
private  boolean copyInputStream(java.io.InputStream inputStream, java.io.BufferedOutputStream stream)
           
protected  java.util.List<ITask> getAllTasks()
          Returns all tasks in the task list root or a category in the task list
 org.eclipse.jface.dialogs.IDialogSettings getSettingsSection(org.eclipse.jface.dialogs.IDialogSettings master)
          Finds or creates a dialog settings section that is used to make the dialog control settings persistent
 void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)
           
 boolean performFinish()
          Called when the user clicks finish.
private  void readTaskListData()
           
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizard
createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Field Detail

SETTINGS_SECTION

private static final java.lang.String SETTINGS_SECTION
See Also:
Constant Field Values

WINDOW_TITLE

private static final java.lang.String WINDOW_TITLE
See Also:
Constant Field Values

importPage

private TaskDataImportWizardPage importPage
Constructor Detail

TaskDataImportWizard

public TaskDataImportWizard()
Method Detail

getSettingsSection

public org.eclipse.jface.dialogs.IDialogSettings getSettingsSection(org.eclipse.jface.dialogs.IDialogSettings master)
Finds or creates a dialog settings section that is used to make the dialog control settings persistent


addPages

public void addPages()
Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard

init

public void init(org.eclipse.ui.IWorkbench workbench,
                 org.eclipse.jface.viewers.IStructuredSelection selection)
Specified by:
init in interface org.eclipse.ui.IWorkbenchWizard

canFinish

public boolean canFinish()
Specified by:
canFinish in interface org.eclipse.jface.wizard.IWizard
Overrides:
canFinish in class org.eclipse.jface.wizard.Wizard

performFinish

public boolean performFinish()
Called when the user clicks finish. Saves the task data. Waits until all overwrite decisions have been made before starting to save files. If any overwrite is canceled, no files are saved and the user must adjust the dialog.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard

getAllTasks

protected java.util.List<ITask> getAllTasks()
Returns all tasks in the task list root or a category in the task list


copy

private boolean copy(java.io.File src,
                     java.io.File dst)

copyInputStream

private boolean copyInputStream(java.io.InputStream inputStream,
                                java.io.BufferedOutputStream stream)

readTaskListData

private void readTaskListData()