public class MavenProjectWizardArchetypeParametersPage extends AbstractMavenWizardPage
Modifier and Type | Class and Description |
---|---|
private static class |
MavenProjectWizardArchetypeParametersPage.RequiredPropertiesLoader |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_DEFAULT_PACKAGE
Deprecated.
|
protected org.apache.maven.archetype.catalog.Archetype |
archetype |
protected boolean |
archetypeChanged |
protected org.eclipse.swt.widgets.Combo |
artifactIdCombo
artifact id text field
|
static java.lang.String |
DEFAULT_VERSION |
protected org.eclipse.swt.widgets.Combo |
groupIdCombo
group id text field
|
private boolean |
isUsed |
static int |
KEY_INDEX |
static java.lang.String |
KEY_PROPERTY |
private static org.slf4j.Logger |
log |
protected java.util.Set<java.lang.String> |
optionalProperties |
protected org.eclipse.swt.widgets.Combo |
packageCombo
package text field
|
protected boolean |
packageCustomized
shows if the package has been customized by the user
|
(package private) org.eclipse.swt.widgets.Table |
propertiesTable |
(package private) org.eclipse.jface.viewers.TableViewer |
propertiesViewer |
protected org.eclipse.swt.widgets.Button |
removeButton |
protected java.util.Set<java.lang.String> |
requiredProperties |
static int |
VALUE_INDEX |
static java.lang.String |
VALUE_PROPERTY |
protected org.eclipse.swt.widgets.Combo |
versionCombo
version text field
|
dialogSettings, MAX_HISTORY, resolverConfigurationComponent
Constructor and Description |
---|
MavenProjectWizardArchetypeParametersPage(ProjectImportConfiguration projectImportConfiguration)
Creates a new page.
|
Modifier and Type | Method and Description |
---|---|
(package private) org.eclipse.swt.widgets.TableItem |
addTableItem(java.lang.String key,
java.lang.String value) |
private void |
createArtifactGroup(org.eclipse.swt.widgets.Composite parent) |
void |
createControl(org.eclipse.swt.widgets.Composite parent)
Creates page controls.
|
private void |
createPropertiesGroup(org.eclipse.swt.widgets.Composite composite) |
protected java.lang.String |
getDefaultJavaPackage()
Returns the default package name.
|
static java.lang.String |
getDefaultJavaPackage(java.lang.String groupId,
java.lang.String artifactId) |
java.lang.String |
getJavaPackage()
Returns the package name.
|
org.apache.maven.model.Model |
getModel()
Creates the Model object.
|
(package private) static java.lang.String |
getName(org.apache.maven.archetype.catalog.Archetype archetype) |
org.eclipse.jface.wizard.IWizardPage |
getNextPage()
Ends the wizard flow chain.
|
java.util.Properties |
getProperties() |
int |
getTextIndex(java.lang.String property) |
boolean |
isPageComplete() |
private boolean |
isVisible() |
(package private) void |
loadArchetypeDescriptor() |
void |
setArchetype(org.apache.maven.archetype.catalog.Archetype archetype) |
void |
setArtifactIdEnabled(boolean b)
Enables or disables the artifact id text field.
|
void |
setParentProject(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version)
Updates the properties when a project name is set on the first page of the wizard.
|
void |
setProjectName(java.lang.String projectName)
Updates the properties when a project name is set on the first page of the wizard.
|
void |
setUsed(boolean isUsed) |
void |
setVisible(boolean visible)
Loads the group value when the page is displayed.
|
protected void |
updateJavaPackage()
Updates the package name if the related fields changed.
|
void |
updatePropertyEditors() |
(package private) void |
validate()
Validates the contents of this wizard page.
|
private java.lang.String |
validateInput() |
addFieldWithHistory, createAdvancedSettings, dispose, getImportConfiguration, validateArtifactIdInput, validateGroupIdInput
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
private static final org.slf4j.Logger log
public static final java.lang.String DEFAULT_VERSION
@Deprecated public static final java.lang.String _DEFAULT_PACKAGE
org.eclipse.swt.widgets.Table propertiesTable
org.eclipse.jface.viewers.TableViewer propertiesViewer
public static final java.lang.String KEY_PROPERTY
public static final int KEY_INDEX
public static final java.lang.String VALUE_PROPERTY
public static final int VALUE_INDEX
protected org.eclipse.swt.widgets.Combo groupIdCombo
protected org.eclipse.swt.widgets.Combo artifactIdCombo
protected org.eclipse.swt.widgets.Combo versionCombo
protected org.eclipse.swt.widgets.Combo packageCombo
protected org.eclipse.swt.widgets.Button removeButton
private boolean isUsed
protected java.util.Set<java.lang.String> requiredProperties
protected java.util.Set<java.lang.String> optionalProperties
protected org.apache.maven.archetype.catalog.Archetype archetype
protected boolean archetypeChanged
protected boolean packageCustomized
public MavenProjectWizardArchetypeParametersPage(ProjectImportConfiguration projectImportConfiguration)
public void createControl(org.eclipse.swt.widgets.Composite parent)
private void createArtifactGroup(org.eclipse.swt.widgets.Composite parent)
private void createPropertiesGroup(org.eclipse.swt.widgets.Composite composite)
void validate()
Feedback about the validation is given to the user by displaying error messages or informative messages on the wizard page. Depending on the provided user input, the wizard page is marked as being complete or not.
If some error or missing input is detected in the user input, an error message or informative message, respectively, is displayed to the user. If the user input is complete and correct, the wizard page is marked as begin complete to allow the wizard to proceed. To that end, the following conditions must be met:
DialogPage.setMessage(java.lang.String)
,
WizardPage.setErrorMessage(java.lang.String)
,
WizardPage.setPageComplete(boolean)
private java.lang.String validateInput()
public org.eclipse.jface.wizard.IWizardPage getNextPage()
getNextPage
in interface org.eclipse.jface.wizard.IWizardPage
getNextPage
in class org.eclipse.jface.wizard.WizardPage
public void setArchetype(org.apache.maven.archetype.catalog.Archetype archetype)
void loadArchetypeDescriptor()
static java.lang.String getName(org.apache.maven.archetype.catalog.Archetype archetype)
org.eclipse.swt.widgets.TableItem addTableItem(java.lang.String key, java.lang.String value)
key
- value
- public void setProjectName(java.lang.String projectName)
public void setParentProject(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
public void setArtifactIdEnabled(boolean b)
public java.lang.String getJavaPackage()
protected void updateJavaPackage()
protected java.lang.String getDefaultJavaPackage()
public org.apache.maven.model.Model getModel()
public void setUsed(boolean isUsed)
public boolean isPageComplete()
isPageComplete
in interface org.eclipse.jface.wizard.IWizardPage
isPageComplete
in class org.eclipse.jface.wizard.WizardPage
public void setVisible(boolean visible)
setVisible
in interface org.eclipse.jface.dialogs.IDialogPage
setVisible
in class AbstractMavenWizardPage
public java.util.Properties getProperties()
public int getTextIndex(java.lang.String property)
public void updatePropertyEditors()
public static java.lang.String getDefaultJavaPackage(java.lang.String groupId, java.lang.String artifactId)
private boolean isVisible()