org.eclipse.xtext.xtext.ui.wizard.project
Class WizardNewXtextProjectCreationPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.ui.dialogs.WizardNewProjectCreationPage
              extended by org.eclipse.xtext.xtext.ui.wizard.project.WizardNewXtextProjectCreationPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class WizardNewXtextProjectCreationPage
extends org.eclipse.ui.dialogs.WizardNewProjectCreationPage

The main page of the Xtext project wizard.

Author:
KD - Initial contribution and API, Knut Wannheden, Sebastian Zarnekow

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
WizardNewXtextProjectCreationPage(java.lang.String pageName, org.eclipse.jface.viewers.IStructuredSelection selection)
          Constructs a new WizardNewXtextProjectCreationPage.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
          (non-Javadoc) Method declared on IDialogPage.
protected  void createLanguageSelectionGroup(org.eclipse.swt.widgets.Composite parent)
           
protected  void createProjectLayoutGroup(org.eclipse.swt.widgets.Composite parent)
           
protected  void fillMweSnippet()
           
protected  java.lang.String findNextValidProjectSuffix(java.lang.String prefix, java.lang.String name)
          Find the next available (default) DSL name
protected  java.lang.String getDefaultConfigName()
           
 java.lang.String getFileExtensions()
          Returns the supported DSL extensions as a CSV string
 java.lang.String getGeneratorConfig()
           
 java.lang.String getLanguageName()
           
protected  java.lang.String[] getWorkingSetIdents()
           
protected  int indexOfDefault(java.util.List<java.lang.String> contributions)
           
protected  void setDefaults(java.lang.String projectSuffix)
          Sets the defaults for the languageName and extensions.
protected  boolean validatePage()
          Returns whether this page's controls currently all contain valid values.
 
Methods inherited from class org.eclipse.ui.dialogs.WizardNewProjectCreationPage
createWorkingSetGroup, getLocationPath, getLocationURI, getProjectHandle, getProjectName, getSelectedWorkingSets, setInitialProjectName, setVisible, useDefaults
 
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
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp
 

Constructor Detail

WizardNewXtextProjectCreationPage

public WizardNewXtextProjectCreationPage(java.lang.String pageName,
                                         org.eclipse.jface.viewers.IStructuredSelection selection)
Constructs a new WizardNewXtextProjectCreationPage.

Parameters:
pageName - the name of the page
selection - The current selection. If the current selection includes workingsets the workingsets field is initialized with the selection.
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: org.eclipse.ui.dialogs.WizardNewProjectCreationPage
(non-Javadoc) Method declared on IDialogPage.

Specified by:
createControl in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
createControl in class org.eclipse.ui.dialogs.WizardNewProjectCreationPage
Parameters:
parent - the parent composite

getWorkingSetIdents

protected java.lang.String[] getWorkingSetIdents()

setDefaults

protected void setDefaults(java.lang.String projectSuffix)
Sets the defaults for the languageName and extensions.

Parameters:
dslName - the name of the DSL

fillMweSnippet

protected void fillMweSnippet()

indexOfDefault

protected int indexOfDefault(java.util.List<java.lang.String> contributions)

getDefaultConfigName

protected java.lang.String getDefaultConfigName()

findNextValidProjectSuffix

protected java.lang.String findNextValidProjectSuffix(java.lang.String prefix,
                                                      java.lang.String name)
Find the next available (default) DSL name


validatePage

protected boolean validatePage()
Description copied from class: org.eclipse.ui.dialogs.WizardNewProjectCreationPage
Returns whether this page's controls currently all contain valid values.

Overrides:
validatePage in class org.eclipse.ui.dialogs.WizardNewProjectCreationPage
Returns:
true if all controls are valid, and false if at least one is invalid

createLanguageSelectionGroup

protected void createLanguageSelectionGroup(org.eclipse.swt.widgets.Composite parent)

createProjectLayoutGroup

protected void createProjectLayoutGroup(org.eclipse.swt.widgets.Composite parent)

getFileExtensions

public java.lang.String getFileExtensions()
Returns the supported DSL extensions as a CSV string


getLanguageName

public java.lang.String getLanguageName()

getGeneratorConfig

public java.lang.String getGeneratorConfig()