org.eclipse.wst.jsdt.ui.wizards
Class NewContainerWizardPage

java.lang.Object
  extended by WizardPage
      extended by org.eclipse.wst.jsdt.ui.wizards.NewElementWizardPage
          extended by org.eclipse.wst.jsdt.ui.wizards.NewContainerWizardPage
Direct Known Subclasses:
NewPackageWizardPage, NewTypeWizardPage

public abstract class NewContainerWizardPage
extends NewElementWizardPage

Wizard page that acts as a base class for wizard pages that create new JavaScript elements. The class provides a input field for source folders (called container in this class) and API to validate the enter source folder name.

Clients may subclass.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
NewContainerWizardPage(java.lang.String name)
          Create a new NewContainerWizardPage
 
Method Summary
 IJavaScriptProject getJavaProject()
          Returns the JavaScript project of the currently selected package fragment root or null if no package fragment root is configured.
 IPackageFragmentRoot getPackageFragmentRoot()
          Returns the IPackageFragmentRoot that corresponds to the current value of the source folder field.
 java.lang.String getPackageFragmentRootText()
          Returns the current text of source folder text field.
 void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified)
          Sets the current source folder (model and text field) to the given package fragment root.
 
Methods inherited from class org.eclipse.wst.jsdt.ui.wizards.NewElementWizardPage
setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewContainerWizardPage

public NewContainerWizardPage(java.lang.String name)
Create a new NewContainerWizardPage

Parameters:
name - the wizard page's name
Method Detail

getJavaProject

public IJavaScriptProject getJavaProject()
Returns the JavaScript project of the currently selected package fragment root or null if no package fragment root is configured.

Returns:
The current JavaScript project or null.

getPackageFragmentRoot

public IPackageFragmentRoot getPackageFragmentRoot()
Returns the IPackageFragmentRoot that corresponds to the current value of the source folder field.

Returns:
the IPackageFragmentRoot or null if the current source folder value is not a valid package fragment root

getPackageFragmentRootText

public java.lang.String getPackageFragmentRootText()
Returns the current text of source folder text field.

Returns:
the text of the source folder text field

setPackageFragmentRoot

public void setPackageFragmentRoot(IPackageFragmentRoot root,
                                   boolean canBeModified)
Sets the current source folder (model and text field) to the given package fragment root.

Parameters:
root - The new root.
canBeModified - if false the source folder field can not be changed by the user. If true the field is editable