org.eclipse.cdt.managedbuilder.ui.wizards
Class MBSCustomPageData

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageData

public final class MBSCustomPageData
extends java.lang.Object

This class is responsible for storing all of the data associated with a given custom wizard page.


Nested Class Summary
 class MBSCustomPageData.ToolchainData
          Stores data on a particular toolchain that a custom wizard page supports.
 
Constructor Summary
MBSCustomPageData(java.lang.String id, org.eclipse.jface.wizard.IWizardPage wizardPage, org.eclipse.jface.operation.IRunnableWithProgress operation, boolean isStock)
          Contstructs a custom page data record
MBSCustomPageData(java.lang.String id, org.eclipse.jface.wizard.IWizardPage wizardPage, java.lang.Runnable operation, boolean isStock)
          Contstructs a custom page data record
 
Method Summary
 void addNature(java.lang.String nature)
          Adds a dependency to this page upon a given nature.
 void addProjectType(java.lang.String projectType)
          Adds a dependency to this page upon a given project type.
 void addToolchain(java.lang.String toolchainID, java.lang.String[] versionsSupported)
          Adds a dependency to this page upon a given toolchain.
 java.lang.String getID()
           
 java.lang.String[] getNatures()
           
 org.eclipse.jface.operation.IRunnableWithProgress getOperation()
           
 java.lang.String[] getProjectTypes()
           
 MBSCustomPageData.ToolchainData[] getToolchains()
           
 org.eclipse.jface.wizard.IWizardPage getWizardPage()
           
 boolean isStockPage()
           
 boolean shouldBeVisibleForNature(java.lang.Object nature)
           
 boolean shouldBeVisibleForProjectType(java.lang.Object projectType)
           
 boolean shouldBeVisibleForToolchain(java.lang.String id, java.lang.String version)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBSCustomPageData

public MBSCustomPageData(java.lang.String id,
                         org.eclipse.jface.wizard.IWizardPage wizardPage,
                         java.lang.Runnable operation,
                         boolean isStock)
Contstructs a custom page data record

Parameters:
id - - Unique ID of the page
wizardPage - - the IWizardPage that is displayed in the wizard
operation - - the Runnable() that is executed during the wizard's DoRunEpilogue() method, or null if no operation is specified
isStock - - true if the page is a stock page provided by Managed Build, false otherwise.
Since:
3.0

MBSCustomPageData

public MBSCustomPageData(java.lang.String id,
                         org.eclipse.jface.wizard.IWizardPage wizardPage,
                         org.eclipse.jface.operation.IRunnableWithProgress operation,
                         boolean isStock)
Contstructs a custom page data record

Parameters:
id - - Unique ID of the page
wizardPage - - the IWizardPage that is displayed in the wizard
operation - - the Runnable() that is executed during the wizard's DoRunEpilogue() method, or null if no operation is specified
isStock - - true if the page is a stock page provided by Managed Build, false otherwise.
Since:
3.0
Method Detail

getID

public java.lang.String getID()
Returns:
The unique ID by which this page is referred to.
Since:
3.0

getWizardPage

public org.eclipse.jface.wizard.IWizardPage getWizardPage()
Returns:
The IWizardPage corresponding to the actual page to be displayed in the wizard.
Since:
3.0

isStockPage

public boolean isStockPage()
Returns:
true if this page is a stock page provided by the Managed Build System, false otherwise.
Since:
3.0

shouldBeVisibleForNature

public boolean shouldBeVisibleForNature(java.lang.Object nature)
Parameters:
nature - A fully qualified nature ID (org.eclipse.core.resources.IProjectNature). Currently MBS only supports creating projects with either one of two natures: org.eclipse.cdt.core.cnature and org.eclipse.cdt.core.ccnature
Returns:
true if the page should be visible when the project has the given nature, false otherwise.
Since:
3.0 Nature can be either string (old mode) or Set (new mode) or null. New mode allows to take into account several natures per project. Accepting null allows to process projects w/o nature, 4.0

getNatures

public java.lang.String[] getNatures()
Returns:
An array of nature IDs corresponding to the natures for which this page should appear.
Since:
3.0

shouldBeVisibleForToolchain

public boolean shouldBeVisibleForToolchain(java.lang.String id,
                                           java.lang.String version)
Parameters:
id - - The unique ID of the toolchain
version - - The version of the toolchain, or null if versions are not to be checked.
Returns:
true if the page should be present for the given toolchain and version, false otherwise.
Since:
3.0

getToolchains

public MBSCustomPageData.ToolchainData[] getToolchains()
Returns:
The set of toolchains supported by this page, or null if this page does not specify any toolchain dependencies.
Since:
3.0

getProjectTypes

public java.lang.String[] getProjectTypes()
Returns:
The set of project types supported by this page, or null if there are no such dependencies.
Since:
3.0

addNature

public void addNature(java.lang.String nature)
Adds a dependency to this page upon a given nature. The page will be visible iff the given nature is selected by the user.

Parameters:
nature - The unique ID of the nature.
Since:
3.0

addToolchain

public void addToolchain(java.lang.String toolchainID,
                         java.lang.String[] versionsSupported)
Adds a dependency to this page upon a given toolchain. The page will be visible iff one or more of the selected project configurations utilizes the specified toolchain. If versions are specified, then the version of the toolchain must exactly match one of the specified versions.

Parameters:
toolchainID - - The unique ID of the toolchain.
versionsSupported - - A comma separated list of supported versions, or null if no version checking is to be done.
Since:
3.0

shouldBeVisibleForProjectType

public boolean shouldBeVisibleForProjectType(java.lang.Object projectType)
Parameters:
projectType - The unique ID of the project type to check.
Returns:
true if this page should be visible if the given project type is selected, false otherwise.
Since:
3.0 Type can be either string (old mode) or Set (new mode) or null. New mode allows to take into account several types per project, or types absence in some cases, 4.0

addProjectType

public void addProjectType(java.lang.String projectType)
Adds a dependency to this page upon a given project type. The page will be visible iff the given project type is selected by the user.

Parameters:
projectType - - The unique ID of the project type.
Since:
3.0

getOperation

public org.eclipse.jface.operation.IRunnableWithProgress getOperation()
Returns:
the IRunnableWithProgress operation associated with this page that should be run during the wizard's doRunEpilogue() method. This operation should only be executed if in fact the page is visible.
Since:
3.0