RSE
Release 1.0

org.eclipse.rse.files.ui.wizards
Class SystemNewFileWizard

java.lang.Object
  extended byorg.eclipse.jface.wizard.Wizard
      extended byorg.eclipse.rse.ui.wizards.AbstractSystemWizard
          extended byorg.eclipse.rse.files.ui.wizards.SystemNewFileWizard
All Implemented Interfaces:
INewWizard, ISystemPromptDialog, ISystemWizard, IWizard, IWorkbenchWizard

public class SystemNewFileWizard
extends AbstractSystemWizard


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.wizards.AbstractSystemWizard
cancelled, finishPressed, helpId, input, minPageHeight, minPageWidth, output, owningDialog, pageTitle, selection, viewer
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
SystemNewFileWizard()
          Constructor
 
Method Summary
 void addPages()
          Creates the wizard pages.
protected  SystemNewFileWizardMainPage createMainPage()
          Creates the wizard's main page.
protected static String getNewAbsoluteName(IRemoteFile parentFolder, String newName)
          Create a new absolute name from the parent folder, and the new name
protected  IRemoteFile[] getParentFolders()
          Deduce the parent remote folder to hold the new folder, by examining the current selection
static IRemoteFile[] getParentFolders(ISystemFilterReference filterRef)
          Given a filter reference, return a list of all the unique root folders, one per filter string at most.
protected  ISystemFilterReference getSelectedFilterReference()
          Get the selected filter, or null if a filter is not selected.
protected  boolean isInputAFilter()
          Return true if input is a system filter reference, versus a folder
protected  boolean meetsFilterCriteria(ISystemFilterReference selectedFilterRef, IRemoteFile parentFolder, String newAbsName)
          Test if the new file/folder will meet the filtering criteria of the selected filter
 boolean performFinish()
          Completes processing of the wizard.
protected static void updateGUI(IRemoteFile parentFolder, IRemoteFile newFileOrFolder, Viewer viewer, boolean isInputAFilter, ISystemFilterReference selectedFilterRef)
          Called after all a successful create operation to update the GUI in an intuitive way: The parent folder is refreshed in all views The newly created file or folder is selected in current view
 
Methods inherited from class org.eclipse.rse.ui.wizards.AbstractSystemWizard
addPage, getCurrentTreeView, getHelpContextId, getInputObject, getMinimumPageHeight, getMinimumPageWidth, getOutputObject, getSystemWizardDialog, getViewer, getWizardPageTitle, init, performCancel, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, setBusyCursor, setHelp, setInputObject, setMinimumPageSize, setOutputObject, setPageError, setSystemWizardDialog, setViewer, setWasCancelled, setWizardImage, setWizardPageTitle, setWizardTitle, updateSize, wasCancelled
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, 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
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer
 

Constructor Detail

SystemNewFileWizard

public SystemNewFileWizard()
Constructor

Method Detail

addPages

public void addPages()
Creates the wizard pages. This method is an override from the parent Wizard class.

Specified by:
addPages in interface IWizard
Specified by:
addPages in class AbstractSystemWizard

createMainPage

protected SystemNewFileWizardMainPage createMainPage()
Creates the wizard's main page. This method is an override from the parent class.


performFinish

public boolean performFinish()
Completes processing of the wizard. If this method returns true, the wizard will close; otherwise, it will stay active. This method is an override from the parent Wizard class.

Specified by:
performFinish in interface IWizard
Specified by:
performFinish in class AbstractSystemWizard
Returns:
whether the wizard finished successfully

getNewAbsoluteName

protected static String getNewAbsoluteName(IRemoteFile parentFolder,
                                           String newName)
Create a new absolute name from the parent folder, and the new name


meetsFilterCriteria

protected boolean meetsFilterCriteria(ISystemFilterReference selectedFilterRef,
                                      IRemoteFile parentFolder,
                                      String newAbsName)
Test if the new file/folder will meet the filtering criteria of the selected filter


updateGUI

protected static void updateGUI(IRemoteFile parentFolder,
                                IRemoteFile newFileOrFolder,
                                Viewer viewer,
                                boolean isInputAFilter,
                                ISystemFilterReference selectedFilterRef)
Called after all a successful create operation to update the GUI in an intuitive way:


isInputAFilter

protected boolean isInputAFilter()
Return true if input is a system filter reference, versus a folder


getSelectedFilterReference

protected ISystemFilterReference getSelectedFilterReference()
Get the selected filter, or null if a filter is not selected.


getParentFolders

protected IRemoteFile[] getParentFolders()
                                  throws SystemMessageException
Deduce the parent remote folder to hold the new folder, by examining the current selection

Throws:
SystemMessageException

getParentFolders

public static IRemoteFile[] getParentFolders(ISystemFilterReference filterRef)
                                      throws SystemMessageException
Given a filter reference, return a list of all the unique root folders, one per filter string at most. If all of these fail to resolve, an exception is thrown. If some fail to resolve, they are just ignored.

Throws:
SystemMessageException

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.