Package org.eclipse.jdt.ui.wizards
Class NewJavaProjectWizardPageOne
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.wizard.WizardPage
-
- org.eclipse.jdt.ui.wizards.NewJavaProjectWizardPageOne
-
- All Implemented Interfaces:
IDialogPage
,IMessageProvider
,IWizardPage
public class NewJavaProjectWizardPageOne extends WizardPage
The first page of the New Java Project wizard. This page is typically used in combination withNewJavaProjectWizardPageTwo
. Clients can extend this page to modify the UI: Add, remove or reorder sections.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 Constructor Description NewJavaProjectWizardPageOne()
Creates a newNewJavaProjectWizardPageOne
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createControl(Composite parent)
protected Control
createInfoControl(Composite composite)
Creates the controls for the info section.protected Control
createJRESelectionControl(Composite composite)
Creates the controls for the JRE selectionprotected Control
createLocationControl(Composite composite)
Creates the controls for the location field.protected Control
createNameControl(Composite composite)
Creates the controls for the name field.protected Control
createProjectLayoutControl(Composite composite)
Creates the controls for the project layout selection.protected Control
createWorkingSetControl(Composite composite)
Creates the controls for the working set selection.String
getCompilerCompliance()
Returns the compiler compliance to be used for the project, ornull
to use the workspace compiler compliance.IClasspathEntry[]
getDefaultClasspathEntries()
Returns the default class path entries to be added on new projects.IPath
getOutputLocation()
Returns the source class path entries to be added on new projects.URI
getProjectLocationURI()
Returns the current project location path as entered by the user, ornull
if the project should be created in the workspace.String
getProjectName()
Gets a project name for the new project.IClasspathEntry[]
getSourceClasspathEntries()
Returns the source class path entries to be added on new projects.IWorkingSet[]
getWorkingSets()
Returns the working sets to which the new project should be added.void
init(IStructuredSelection selection, IWorkbenchPart activePart)
The wizard owning this page can call this method to initialize the fields from the current selection and active part.protected void
setControl(Control newControl)
void
setProjectLocationURI(URI uri)
Sets the project location of the new project ornull
if the project should be created in the workspacevoid
setProjectName(String name)
Sets the name of the new projectvoid
setVisible(boolean visible)
void
setWorkingSets(IWorkingSet[] workingSets)
Sets the working sets to which the new project should be added.-
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, 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
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
-
-
-
-
Constructor Detail
-
NewJavaProjectWizardPageOne
public NewJavaProjectWizardPageOne()
Creates a newNewJavaProjectWizardPageOne
.
-
-
Method Detail
-
init
public void init(IStructuredSelection selection, IWorkbenchPart activePart)
The wizard owning this page can call this method to initialize the fields from the current selection and active part.- Parameters:
selection
- used to initialize the fieldsactivePart
- the (typically active) part to initialize the fields ornull
-
createControl
public void createControl(Composite parent)
-
setControl
protected void setControl(Control newControl)
- Overrides:
setControl
in classDialogPage
-
createNameControl
protected Control createNameControl(Composite composite)
Creates the controls for the name field.- Parameters:
composite
- the parent composite- Returns:
- the created control
-
createLocationControl
protected Control createLocationControl(Composite composite)
Creates the controls for the location field.- Parameters:
composite
- the parent composite- Returns:
- the created control
-
createJRESelectionControl
protected Control createJRESelectionControl(Composite composite)
Creates the controls for the JRE selection- Parameters:
composite
- the parent composite- Returns:
- the created control
-
createProjectLayoutControl
protected Control createProjectLayoutControl(Composite composite)
Creates the controls for the project layout selection.- Parameters:
composite
- the parent composite- Returns:
- the created control
-
createWorkingSetControl
protected Control createWorkingSetControl(Composite composite)
Creates the controls for the working set selection.- Parameters:
composite
- the parent composite- Returns:
- the created control
-
createInfoControl
protected Control createInfoControl(Composite composite)
Creates the controls for the info section.- Parameters:
composite
- the parent composite- Returns:
- the created control
-
getProjectName
public String getProjectName()
Gets a project name for the new project.- Returns:
- the new project resource handle
-
setProjectName
public void setProjectName(String name)
Sets the name of the new project- Parameters:
name
- the new name
-
getProjectLocationURI
public URI getProjectLocationURI()
Returns the current project location path as entered by the user, ornull
if the project should be created in the workspace.- Returns:
- the project location path or its anticipated initial value.
-
setProjectLocationURI
public void setProjectLocationURI(URI uri)
Sets the project location of the new project ornull
if the project should be created in the workspace- Parameters:
uri
- the new project location
-
getCompilerCompliance
public String getCompilerCompliance()
Returns the compiler compliance to be used for the project, ornull
to use the workspace compiler compliance.- Returns:
- compiler compliance to be used for the project or
null
-
getDefaultClasspathEntries
public IClasspathEntry[] getDefaultClasspathEntries()
Returns the default class path entries to be added on new projects. By default this is the JRE container as selected by the user.- Returns:
- returns the default class path entries
-
getSourceClasspathEntries
public IClasspathEntry[] getSourceClasspathEntries()
Returns the source class path entries to be added on new projects. The underlying resources may not exist. All entries that are returned must be of kindIClasspathEntry.CPE_SOURCE
.- Returns:
- returns the source class path entries for the new project
-
getOutputLocation
public IPath getOutputLocation()
Returns the source class path entries to be added on new projects. The underlying resource may not exist.- Returns:
- returns the default class path entries
-
getWorkingSets
public IWorkingSet[] getWorkingSets()
Returns the working sets to which the new project should be added.- Returns:
- the selected working sets to which the new project should be added
-
setWorkingSets
public void setWorkingSets(IWorkingSet[] workingSets)
Sets the working sets to which the new project should be added.- Parameters:
workingSets
- the initial selected working sets
-
setVisible
public void setVisible(boolean visible)
- Specified by:
setVisible
in interfaceIDialogPage
- Overrides:
setVisible
in classDialogPage
-
-