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:
org.eclipse.jface.dialogs.IDialogPage,org.eclipse.jface.dialogs.IMessageProvider,org.eclipse.jface.wizard.IWizardPage
public class NewJavaProjectWizardPageOne
extends org.eclipse.jface.wizard.WizardPage
The first page of the New Java Project wizard. This page is typically used in combination with
NewJavaProjectWizardPageTwo. 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateControl(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.ControlcreateInfoControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the info section.protected org.eclipse.swt.widgets.ControlcreateJRESelectionControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the JRE selectionprotected org.eclipse.swt.widgets.ControlcreateLocationControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the location field.protected org.eclipse.swt.widgets.ControlcreateModuleControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the module section.protected org.eclipse.swt.widgets.ControlcreateNameControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the name field.protected org.eclipse.swt.widgets.ControlcreateProjectLayoutControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the project layout selection.protected org.eclipse.swt.widgets.ControlcreateWorkingSetControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the working set selection.Returns the compiler compliance to be used for the project, ornullto use the workspace compiler compliance.booleanReturns if the module-info creation dialog needs to be shown or not.Returns the default class path entries to be added on new projects.booleanReturns if the module-info file should have comments.Returns the module name given.org.eclipse.core.runtime.IPathReturns the source class path entries to be added on new projects.Returns the current project location path as entered by the user, ornullif the project should be created in the workspace.Gets a project name for the new project.Returns the source class path entries to be added on new projects.org.eclipse.ui.IWorkingSet[]Returns the working sets to which the new project should be added.voidinit(org.eclipse.jface.viewers.IStructuredSelection selection, org.eclipse.ui.IWorkbenchPart activePart) The wizard owning this page can call this method to initialize the fields from the current selection and active part.protected voidsetControl(org.eclipse.swt.widgets.Control newControl) voidsetProjectLocationURI(URI uri) Sets the project location of the new project ornullif the project should be created in the workspacevoidsetProjectName(String name) Sets the name of the new projectvoidsetVisible(boolean visible) voidsetWorkingSets(org.eclipse.ui.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, toStringMethods 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, 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
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelpMethods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSize
-
Constructor Details
-
NewJavaProjectWizardPageOne
public NewJavaProjectWizardPageOne()Creates a newNewJavaProjectWizardPageOne.
-
-
Method Details
-
init
public void init(org.eclipse.jface.viewers.IStructuredSelection selection, org.eclipse.ui.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(org.eclipse.swt.widgets.Composite parent) -
setControl
protected void setControl(org.eclipse.swt.widgets.Control newControl) - Overrides:
setControlin classorg.eclipse.jface.dialogs.DialogPage
-
createNameControl
protected org.eclipse.swt.widgets.Control createNameControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the name field.- Parameters:
composite- the parent composite- Returns:
- the created control
-
createLocationControl
protected org.eclipse.swt.widgets.Control createLocationControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the location field.- Parameters:
composite- the parent composite- Returns:
- the created control
-
createJRESelectionControl
protected org.eclipse.swt.widgets.Control createJRESelectionControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the JRE selection- Parameters:
composite- the parent composite- Returns:
- the created control
-
createProjectLayoutControl
protected org.eclipse.swt.widgets.Control createProjectLayoutControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the project layout selection.- Parameters:
composite- the parent composite- Returns:
- the created control
-
createWorkingSetControl
protected org.eclipse.swt.widgets.Control createWorkingSetControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the working set selection.- Parameters:
composite- the parent composite- Returns:
- the created control
-
createInfoControl
protected org.eclipse.swt.widgets.Control createInfoControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the info section.- Parameters:
composite- the parent composite- Returns:
- the created control
-
createModuleControl
protected org.eclipse.swt.widgets.Control createModuleControl(org.eclipse.swt.widgets.Composite composite) Creates the controls for the module section.- Parameters:
composite- the parent composite- Returns:
- the created control
- Since:
- 3.23
-
getProjectName
Gets a project name for the new project.- Returns:
- the new project resource handle
-
setProjectName
Sets the name of the new project- Parameters:
name- the new name
-
getProjectLocationURI
Returns the current project location path as entered by the user, ornullif the project should be created in the workspace.- Returns:
- the project location path or its anticipated initial value.
-
setProjectLocationURI
Sets the project location of the new project ornullif the project should be created in the workspace- Parameters:
uri- the new project location
-
getCompilerCompliance
Returns the compiler compliance to be used for the project, ornullto use the workspace compiler compliance.- Returns:
- compiler compliance to be used for the project or
null
-
getCreateModuleInfoFile
public boolean getCreateModuleInfoFile()Returns if the module-info creation dialog needs to be shown or not.- Returns:
- 'create module-info.java file' has been checked or not.
- Since:
- 3.23
-
getModuleName
Returns the module name given.- Returns:
- 'Module name:' text field value, trimming the String. If empty , returns the project name, trimming the String.
- Since:
- 3.27
-
getGenerateCommentsInModuleInfoFile
public boolean getGenerateCommentsInModuleInfoFile()Returns if the module-info file should have comments.- Returns:
- 'Generate comments' has been checked or not.
- Since:
- 3.27
-
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
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 org.eclipse.core.runtime.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 org.eclipse.ui.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(org.eclipse.ui.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:
setVisiblein interfaceorg.eclipse.jface.dialogs.IDialogPage- Overrides:
setVisiblein classorg.eclipse.jface.dialogs.DialogPage
-