| com.bostechcorp.cbesb.ui.ide.wizards.WizardNewFileCreationPage
All known Subclasses: com.bostechcorp.cbesb.ui.ide.wizards.ConnectionFileWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.DriverManagerWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.X12VariantCreationWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.ETLConfigWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.LookupWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.DataSourceMapperMainPage, com.bostechcorp.cbesb.ui.ide.wizards.VariantCreationWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.TransformerCreationWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.HolidayCreationWizardPage, com.bostechcorp.cbesb.ui.ide.wizards.MessageFormatCreationWizardPage,
WizardNewFileCreationPage | public class WizardNewFileCreationPage extends WizardPage implements Listener(Code) | | Standard main page for a wizard that creates a file resource.
This page may be used by clients as-is; it may be also be subclassed to suit.
Subclasses may override
getInitialContents
getNewFileLabel
Subclasses may extend
|
Method Summary | |
public boolean | canFlipToNextPagebyName(String name) | protected void | createAdvancedControls(Composite parent) Creates the widget for advanced options. | public void | createControl(Composite parent) (non-Javadoc) Method declared on IDialogPage. | protected void | createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) Creates a file resource given the file handle and contents. | protected IFile | createFileHandle(IPath filePath) Creates a file resource handle for the file with the given workspace
path. | protected void | createLinkTarget() Creates the link target path if a link target has been specified. | public IFile | createNewFile(String prefix) Creates a new file resource in the selected container and with the
selected name. | protected ISchedulingRule | createRule(IResource resource) Returns the scheduling rule to use when creating the resource at the
given container path. | public IPath | getContainerFullPath() Returns the current full path of the containing resource as entered or
selected by the user, or its anticipated initial value. | public String | getFileName() Returns the current file name as entered by the user, or its anticipated
initial value. | protected InputStream | getInitialContents() Returns a stream containing the initial contents to be given to new file
resource instances. | protected String | getNewFileLabel() Returns the label to display in the file name specification visual
component group. | protected void | handleAdvancedButtonSelect() Shows/hides the advanced option widgets. | public void | handleEvent(Event event) The WizardNewFileCreationPage implementation of this
Listener method handles all events and enablements for
controls on this page. | protected void | initialPopulateContainerNameField() Sets the initial contents of the container name entry field, based upon
either a previously-specified initial value or the ability to determine
such a value. | public boolean | isPageComplete() | public void | setContainerFullPath(IPath path) Sets the value of this page's container name field, or stores it for
future use if this page's controls do not exist yet. | public void | setFileName(String value, String prefix) Sets the value of this page's file name field, or stores it for future
use if this page's controls do not exist yet. | public void | setVisible(boolean visible) | protected IStatus | validateLinkedResource() Checks whether the linked resource target is valid. | protected boolean | validatePage(String path, String key) Returns whether this page's controls currently all contain valid values. |
WizardNewFileCreationPage | public WizardNewFileCreationPage(String pageName, IStructuredSelection selection)(Code) | | Creates a new file creation wizard page. If the initial resource
selection contains exactly one container resource then it will be used as
the default container resource.
Parameters: pageName - the name of the page Parameters: selection - the current resource selection |
canFlipToNextPagebyName | public boolean canFlipToNextPagebyName(String name)(Code) | | |
createAdvancedControls | protected void createAdvancedControls(Composite parent)(Code) | | Creates the widget for advanced options.
Parameters: parent - the parent composite |
createControl | public void createControl(Composite parent)(Code) | | (non-Javadoc) Method declared on IDialogPage.
|
createFile | protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException(Code) | | Creates a file resource given the file handle and contents.
Parameters: fileHandle - the file handle to create a file resource with Parameters: contents - the initial contents of the new file resource, ornull if none (equivalent to an empty stream) Parameters: monitor - the progress monitor to show visual progress with exception: CoreException - if the operation fails exception: OperationCanceledException - if the operation is canceled |
createFileHandle | protected IFile createFileHandle(IPath filePath)(Code) | | Creates a file resource handle for the file with the given workspace
path. This method does not create the file resource; this is the
responsibility of createFile .
Parameters: filePath - the path of the file resource to create a handle for the new file resource handle See Also: WizardNewFileCreationPage.createFile |
createLinkTarget | protected void createLinkTarget()(Code) | | Creates the link target path if a link target has been specified.
|
createNewFile | public IFile createNewFile(String prefix)(Code) | | Creates a new file resource in the selected container and with the
selected name. Creates any missing resource containers along the path;
does nothing if the container resources already exist.
In normal usage, this method is invoked after the user has pressed Finish
on the wizard; the enablement of the Finish button implies that all
controls on on this page currently contain valid values.
Note that this page caches the new file once it has been successfully
created; subsequent invocations of this method will answer the same file
resource without attempting to create it again.
This method should be called within a workspace modify operation since it
creates resources.
the created file resource, or null if the file wasnot created |
createRule | protected ISchedulingRule createRule(IResource resource)(Code) | | Returns the scheduling rule to use when creating the resource at the
given container path. The rule should be the creation rule for the
top-most non-existing parent.
Parameters: resource - The resource being created The scheduling rule for creating the given resource since: 3.1 |
getContainerFullPath | public IPath getContainerFullPath()(Code) | | Returns the current full path of the containing resource as entered or
selected by the user, or its anticipated initial value.
the container's full path, anticipated initial value, ornull if no path is known |
getFileName | public String getFileName()(Code) | | Returns the current file name as entered by the user, or its anticipated
initial value.
the file name, its anticipated initial value, ornull if no file name is known |
getInitialContents | protected InputStream getInitialContents()(Code) | | Returns a stream containing the initial contents to be given to new file
resource instances. Subclasses may wish to override. This default
implementation provides no initial contents.
initial contents to be given to new file resource instances |
getNewFileLabel | protected String getNewFileLabel()(Code) | | Returns the label to display in the file name specification visual
component group.
Subclasses may reimplement.
the label to display in the file name specification visualcomponent group |
handleAdvancedButtonSelect | protected void handleAdvancedButtonSelect()(Code) | | Shows/hides the advanced option widgets.
|
handleEvent | public void handleEvent(Event event)(Code) | | The WizardNewFileCreationPage implementation of this
Listener method handles all events and enablements for
controls on this page. Subclasses may extend.
|
initialPopulateContainerNameField | protected void initialPopulateContainerNameField()(Code) | | Sets the initial contents of the container name entry field, based upon
either a previously-specified initial value or the ability to determine
such a value.
|
isPageComplete | public boolean isPageComplete()(Code) | | |
setContainerFullPath | public void setContainerFullPath(IPath path)(Code) | | Sets the value of this page's container name field, or stores it for
future use if this page's controls do not exist yet.
Parameters: path - the full path to the container |
setFileName | public void setFileName(String value, String prefix)(Code) | | Sets the value of this page's file name field, or stores it for future
use if this page's controls do not exist yet.
Parameters: value - new file name |
setVisible | public void setVisible(boolean visible)(Code) | | |
validateLinkedResource | protected IStatus validateLinkedResource()(Code) | | Checks whether the linked resource target is valid. Sets the error
message accordingly and returns the status.
IStatus validation result from the CreateLinkedResourceGroup |
validatePage | protected boolean validatePage(String path, String key)(Code) | | Returns whether this page's controls currently all contain valid values.
Parameters: key - true if all controls are valid, andfalse if at least one is invalid |
|
|