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

java.lang.Object
  extended by WizardPage
      extended by org.eclipse.wst.jsdt.ui.wizards.NewElementWizardPage
          extended by org.eclipse.wst.jsdt.ui.wizards.BaseLibraryWizardPage
All Implemented Interfaces:
IJsGlobalScopeContainerPage, IJsGlobalScopeContainerPageExtension, IJsGlobalScopeContainerPageExtension2

public class BaseLibraryWizardPage
extends NewElementWizardPage
implements IJsGlobalScopeContainerPage, IJsGlobalScopeContainerPageExtension, IJsGlobalScopeContainerPageExtension2

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
BaseLibraryWizardPage()
           
 
Method Summary
 void createControl(Composite parent)
           
 boolean finish()
          Called when the classpath container wizard is closed by selecting the finish button.
 IIncludePathEntry[] getNewContainers()
          Method IJsGlobalScopeContainerPageExtension2.getNewContainers() is called instead of IJsGlobalScopeContainerPage.getSelection() to get the newly added containers.
 IIncludePathEntry getSelection()
          Returns the edited or created classpath container entry.
 void initialize(IJavaScriptProject project, IIncludePathEntry[] currentEntries)
          Method initialize() is called before IJsGlobalScopeContainerPage.setSelection to give additional information about the context the classpath container entry is configured in.
 void setSelection(IIncludePathEntry containerEntry)
          Sets the classpath container entry to be edited or null if a new entry should be created.
 
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

BaseLibraryWizardPage

public BaseLibraryWizardPage()
Method Detail

finish

public boolean finish()
Description copied from interface: IJsGlobalScopeContainerPage
Called when the classpath container wizard is closed by selecting the finish button. Implementers typically override this method to store the page result (new/changed classpath entry returned in getSelection) into its model.

Specified by:
finish in interface IJsGlobalScopeContainerPage
Returns:
if the operation was successful. Only when returned true, the wizard will close.

getSelection

public IIncludePathEntry getSelection()
Description copied from interface: IJsGlobalScopeContainerPage
Returns the edited or created classpath container entry. This method may return null if no classpath container entry exists. The returned classpath entry is of kind IIncludePathEntry.CPE_CONTAINER .

Specified by:
getSelection in interface IJsGlobalScopeContainerPage
Returns:
the classpath entry edited or created on the page.

setSelection

public void setSelection(IIncludePathEntry containerEntry)
Description copied from interface: IJsGlobalScopeContainerPage
Sets the classpath container entry to be edited or null if a new entry should be created.

Specified by:
setSelection in interface IJsGlobalScopeContainerPage
Parameters:
containerEntry - the classpath entry to edit or null. If not null then the classpath entry must be of kind IIncludePathEntry.CPE_CONTAINER

createControl

public void createControl(Composite parent)

initialize

public void initialize(IJavaScriptProject project,
                       IIncludePathEntry[] currentEntries)
Description copied from interface: IJsGlobalScopeContainerPageExtension
Method initialize() is called before IJsGlobalScopeContainerPage.setSelection to give additional information about the context the classpath container entry is configured in. This information only reflects the underlying dialogs current selection state. The user still can make changes after the the classpath container pages has been closed or decide to cancel the operation.

Specified by:
initialize in interface IJsGlobalScopeContainerPageExtension
Parameters:
project - The project the new or modified entry is added to. The project does not have to exist. Project can be null.
currentEntries - The class path entries currently selected to be set as the projects classpath. This can also include the entry to be edited.

getNewContainers

public IIncludePathEntry[] getNewContainers()
Description copied from interface: IJsGlobalScopeContainerPageExtension2
Method IJsGlobalScopeContainerPageExtension2.getNewContainers() is called instead of IJsGlobalScopeContainerPage.getSelection() to get the newly added containers. IJsGlobalScopeContainerPage.getSelection() is still used to get the edited elements.

Specified by:
getNewContainers in interface IJsGlobalScopeContainerPageExtension2
Returns:
the classpath entries created on the page. All returned entries must be on kind IIncludePathEntry.CPE_CONTAINER