org.eclipse.cdt.ui.wizards.conversion
Class ConvertProjectWizardPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage
Direct Known Subclasses:
ConvertToMakeProjectWizardPage, ConvertToMakeWizardPage

public abstract class ConvertProjectWizardPage
extends org.eclipse.jface.wizard.WizardPage

ConvertProjectWizardPage Standard main page for a wizard that converts a project's nature.
This class provides the UI components and populates the table with all projects that meet the criteria specified by subclasses in the method isCandidate(IProject). This class does the conversion through the method convertProjects([]Object), which is also defined by all subclasses.
Subclasses provide the methods that determine what files are displayed and what action is performed on them as well as the labels for the Wizard.

Note: Only Projects that are open will be considered for conversion.

Since:
Aug 6, 2002

Author:
Judy N. Green

Nested Class Summary
 class ConvertProjectWizardPage.ProjectContentProvider
          Provides the contents for the list using the enclosing class's method getElements();
 class ConvertProjectWizardPage.ProjectLabelProvider
          Provides labels for the listed items.
 
Field Summary
static java.lang.String KEY_CONVERTING
           
static java.lang.String KEY_TITLE
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
ConvertProjectWizardPage(java.lang.String pageName)
          Constructor for ConvertProjectWizardPage.
 
Method Summary
 void convertProject(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID)
          convertProject must be overwritten in subclasses to change behaviour
 void convertProject(org.eclipse.core.resources.IProject project, java.lang.String bsId, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Creates the main wizard page.
 void doRun(org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID)
          doRun can be overwritten in subclasses to change behaviour, but this is generally not required.
 void doRun(org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID, java.lang.String bsId)
           
 boolean finish()
          Method finish we always finish successfully :)
abstract  boolean isCandidate(org.eclipse.core.resources.IProject project)
          Must be overwritten in subclasses to change behaviour Determines which projects will be displayed in the list
 
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, setVisible
 
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, setVisible
 

Field Detail

KEY_TITLE

public static final java.lang.String KEY_TITLE
See Also:
Constant Field Values

KEY_CONVERTING

public static final java.lang.String KEY_CONVERTING
See Also:
Constant Field Values
Constructor Detail

ConvertProjectWizardPage

public ConvertProjectWizardPage(java.lang.String pageName)
Constructor for ConvertProjectWizardPage.

Parameters:
pageName -
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Creates the main wizard page.

See Also:
IDialogPage.createControl(Composite)

doRun

public void doRun(org.eclipse.core.runtime.IProgressMonitor monitor,
                  java.lang.String projectID)
           throws org.eclipse.core.runtime.CoreException
doRun can be overwritten in subclasses to change behaviour, but this is generally not required. It is called from the corresponding Conversion Wizard

Parameters:
monitor -
projectID -
Throws:
org.eclipse.core.runtime.CoreException

doRun

public void doRun(org.eclipse.core.runtime.IProgressMonitor monitor,
                  java.lang.String projectID,
                  java.lang.String bsId)
           throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

finish

public boolean finish()
Method finish we always finish successfully :)

Returns:
boolean

isCandidate

public abstract boolean isCandidate(org.eclipse.core.resources.IProject project)
Must be overwritten in subclasses to change behaviour Determines which projects will be displayed in the list

Parameters:
project -
Returns:
boolean

convertProject

public void convertProject(org.eclipse.core.resources.IProject project,
                           org.eclipse.core.runtime.IProgressMonitor monitor,
                           java.lang.String projectID)
                    throws org.eclipse.core.runtime.CoreException
convertProject must be overwritten in subclasses to change behaviour

Parameters:
project -
monitor -
projectID -
Throws:
org.eclipse.core.runtime.CoreException

convertProject

public void convertProject(org.eclipse.core.resources.IProject project,
                           java.lang.String bsId,
                           org.eclipse.core.runtime.IProgressMonitor monitor)
                    throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException