|
Eclipse JDT Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.dialogs.DialogPage org.eclipse.jface.wizard.WizardPage org.eclipse.jdt.ui.wizards.NewElementWizardPage org.eclipse.jdt.ui.wizards.NewContainerWizardPage
Wizard page that acts as a base class for wizard pages that create new Java elements. The class provides a input field for source folders (called container in this class) and API to validate the enter source folder name.
Field Summary | |
protected static String | CONTAINER
Id of the container field |
protected IStatus | fContainerStatus
The status of the last validation. |
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
NewContainerWizardPage(String name)
Create a new NewContainerWizardPage |
Method Summary | |
protected IStatus | containerChanged()
This method is a hook which gets called after the source folder's text input field has changed. |
protected void | createContainerControls(Composite parent,
int nColumns)
Creates the necessary controls (label, text field and browse button) to edit the source folder location. |
protected ITextSelection | getCurrentTextSelection()
Returns the test selection of the current editor. |
protected IJavaElement | getInitialJavaElement(IStructuredSelection selection)
Utility method to inspect a selection to find a Java element. |
protected int | getMaxFieldWidth()
Returns the recommended maximum width for text fields (in pixels). |
IPackageFragmentRoot | getPackageFragmentRoot()
Returns the IPackageFragmentRoot that corresponds to the current value of the source folder field. |
String | getPackageFragmentRootText()
Returns the current text of source folder text field. |
protected IWorkspaceRoot | getWorkspaceRoot()
Returns the workspace root. |
protected void | handleFieldChanged(String fieldName)
Hook method that gets called when a field on this page has changed. |
protected void | initContainerPage(IJavaElement elem)
Initializes the source folder field with a valid package fragment root. |
protected void | setFocusOnContainer()
Sets the focus to the source folder's 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.jdt.ui.wizards.NewElementWizardPage |
setVisible, updateStatus, updateStatus |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
createControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp |
Field Detail |
protected static final String CONTAINER
protected IStatus fContainerStatus
Constructor Detail |
public NewContainerWizardPage(String name)
Method Detail |
protected void initContainerPage(IJavaElement elem)
protected IJavaElement getInitialJavaElement(IStructuredSelection selection)
protected ITextSelection getCurrentTextSelection()
protected int getMaxFieldWidth()
protected void createContainerControls(Composite parent, int nColumns)
protected void setFocusOnContainer()
protected IStatus containerChanged()
protected void handleFieldChanged(String fieldName)
Every sub type is responsible to call this method when a field on its page has changed. Subtypes override (extend) the method to add verification when a own field has a dependency to an other field. For example the class name input must be verified again when the package field changes (check for duplicated class names).
protected IWorkspaceRoot getWorkspaceRoot()
public IPackageFragmentRoot getPackageFragmentRoot()
public String getPackageFragmentRootText()
public void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified)
|
Eclipse JDT Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |