Package org.eclipse.jdt.ui.wizards
Class NewJavaProjectWizardPageTwo
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
org.eclipse.jdt.ui.wizards.NewElementWizardPage
org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage
org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageTwo
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage,org.eclipse.jface.dialogs.IMessageProvider,org.eclipse.jface.wizard.IWizardPage
The second page of the New Java project wizard. It allows to configure the build path and output location.
As addition to the
JavaCapabilityConfigurationPage, the wizard page does an
early project creation (so that linked folders can be defined) and, if an
existing external location was specified, detects the class path.
Clients may instantiate or subclass.
- Since:
- 3.4
-
Field Summary
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.core.resources.IProjectCreates the provisional project on which the wizard is working on.voiddispose()protected voidinitializeBuildPath(IJavaProject javaProject, org.eclipse.core.runtime.IProgressMonitor monitor) Evaluates the new build path and output folder according to the settings on the first page.voidCalled from the wizard on cancel.voidperformFinish(org.eclipse.core.runtime.IProgressMonitor monitor) Called from the wizard on finish.protected voidRemoves the provisional project.voidsetVisible(boolean visible) protected final booleanClients can override this method to choose if the new source page is used.Methods inherited from class org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage
configureJavaProject, configureJavaProject, createControl, createProject, createProject, getJavaProject, getOutputLocation, getRawClassPath, getRunnable, init, setFocusMethods inherited from class org.eclipse.jdt.ui.wizards.NewElementWizardPage
updateStatus, updateStatusMethods 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, toStringMethods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPage
getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelpMethods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSize
-
Constructor Details
-
NewJavaProjectWizardPageTwo
Constructor for theNewJavaProjectWizardPageTwo.- Parameters:
mainPage- the first page of the wizard
-
-
Method Details
-
useNewSourcePage
protected final boolean useNewSourcePage()Description copied from class:JavaCapabilityConfigurationPageClients can override this method to choose if the new source page is used. The new source page requires that the project is already created as Java project. The page will directly manipulate the classpath. By defaultfalseis returned.- Overrides:
useNewSourcePagein classJavaCapabilityConfigurationPage- Returns:
- Returns
trueif the new source page should be used.
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisiblein interfaceorg.eclipse.jface.dialogs.IDialogPage- Overrides:
setVisiblein classNewElementWizardPage
-
initializeBuildPath
protected void initializeBuildPath(IJavaProject javaProject, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException Evaluates the new build path and output folder according to the settings on the first page. The resulting build path is set by callingJavaCapabilityConfigurationPage.init(IJavaProject, IPath, IClasspathEntry[], boolean). Clients can override this method.- Parameters:
javaProject- the new project which is already created when this method is called.monitor- the progress monitor- Throws:
org.eclipse.core.runtime.CoreException- thrown when initializing the build path failed
-
performFinish
public void performFinish(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException, InterruptedException Called from the wizard on finish.- Parameters:
monitor- the progress monitor- Throws:
org.eclipse.core.runtime.CoreException- thrown when the project creation or configuration failedInterruptedException- thrown when the user cancelled the project creation
-
createProvisonalProject
protected org.eclipse.core.resources.IProject createProvisonalProject()Creates the provisional project on which the wizard is working on. The provisional project is typically created when the page is entered the first time. The early project creation is required to configure linked folders.- Returns:
- the provisional project
-
removeProvisonalProject
protected void removeProvisonalProject()Removes the provisional project. The provisional project is typically removed when the user cancels the wizard or goes back to the first page. -
performCancel
public void performCancel()Called from the wizard on cancel. -
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.jface.dialogs.IDialogPage- Overrides:
disposein classJavaCapabilityConfigurationPage
-