org.eclipse.cdt.internal.ui.wizards.filewizard
Class AbstractFileCreationWizardPage
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
org.eclipse.cdt.internal.ui.wizards.NewElementWizardPage
org.eclipse.cdt.internal.ui.wizards.filewizard.AbstractFileCreationWizardPage
- All Implemented Interfaces:
- org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage
- Direct Known Subclasses:
- NewHeaderFileCreationWizardPage, NewSourceFileCreationWizardPage
public abstract class AbstractFileCreationWizardPage
- extends NewElementWizardPage
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
ERROR, INFORMATION, NONE, WARNING |
Method Summary |
void |
createControl(org.eclipse.swt.widgets.Composite parent)
|
abstract void |
createFile(org.eclipse.core.runtime.IProgressMonitor monitor)
Creates the new file using the entered field values. |
abstract org.eclipse.cdt.core.model.ITranslationUnit |
getCreatedFileTU()
Returns the created file. |
abstract org.eclipse.core.runtime.IPath |
getFileFullPath()
Returns the full path computed from the file name field
and the source folder. |
org.eclipse.core.runtime.IPath |
getSourceFolderFullPath()
|
void |
init(org.eclipse.jface.viewers.IStructuredSelection selection)
The wizard owning this page is responsible for calling this method with the
current selection. |
void |
setSourceFolderFullPath(org.eclipse.core.runtime.IPath folderPath,
boolean update)
|
void |
setVisible(boolean visible)
|
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
canFlipToNextPage, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
dispose, getControl, getDescription, getErrorMessage, getMessage, getMessageType, getTitle, performHelp, setMessage |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp |
AbstractFileCreationWizardPage
public AbstractFileCreationWizardPage(java.lang.String name)
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent)
init
public void init(org.eclipse.jface.viewers.IStructuredSelection selection)
- The wizard owning this page is responsible for calling this method with the
current selection. The selection is used to initialize the fields of the wizard
page.
- Parameters:
selection
- used to initialize the fields
getSourceFolderFullPath
public org.eclipse.core.runtime.IPath getSourceFolderFullPath()
setSourceFolderFullPath
public void setSourceFolderFullPath(org.eclipse.core.runtime.IPath folderPath,
boolean update)
setVisible
public void setVisible(boolean visible)
- Specified by:
setVisible
in interface org.eclipse.jface.dialogs.IDialogPage
- Overrides:
setVisible
in class NewElementWizardPage
getFileFullPath
public abstract org.eclipse.core.runtime.IPath getFileFullPath()
- Returns the full path computed from the file name field
and the source folder.
- Returns:
- the file path
createFile
public abstract void createFile(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Creates the new file using the entered field values.
- Parameters:
monitor
- a progress monitor to report progress.
- Throws:
org.eclipse.core.runtime.CoreException
- Thrown when the creation failed.
getCreatedFileTU
public abstract org.eclipse.cdt.core.model.ITranslationUnit getCreatedFileTU()
- Returns the created file. The method only returns a valid translation unit
after
createFile
has been called.
- Returns:
- the created translation unit
- See Also:
createFile(IProgressMonitor)