edu.wpi.ebob.wizards
Class AddToObjectBenchWizardPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by edu.wpi.ebob.wizards.AddToObjectBenchWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class AddToObjectBenchWizardPage
extends org.eclipse.jface.wizard.WizardPage

The "New" wizard page allows setting the container for the new file as well as the file name. The page will only accept file name without the extension OR with the extension that matches the expected one (mpe).


Nested Class Summary
private  class AddToObjectBenchWizardPage.ConstructorSearchRequestor
           
private  class AddToObjectBenchWizardPage.TypeSearchRequestor
           
 
Field Summary
private  org.eclipse.swt.widgets.Button browseButton
           
private  org.eclipse.swt.widgets.Text classText
           
private  java.lang.String defaultClassName
           
private  org.eclipse.swt.widgets.Text nameText
           
private  org.eclipse.swt.widgets.Button projCheck
           
private  org.eclipse.jdt.core.IJavaProject project
           
private  org.eclipse.jdt.core.search.IJavaSearchScope scope
           
private  org.eclipse.jdt.core.search.SearchEngine se
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
AddToObjectBenchWizardPage(org.eclipse.jdt.core.IJavaProject project, java.lang.String className)
          Constructor for SampleNewWizardPage.
 
Method Summary
private  void createClassText(org.eclipse.swt.widgets.Composite parent)
          Creates the "Class name" text row
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
private  void createNameText(org.eclipse.swt.widgets.Composite parent)
          Creates the "Instance name" text row
private  void createProjectCombo(org.eclipse.swt.widgets.Composite parent)
           
private  void dialogChanged()
          Ensures that both text fields are set.
 java.lang.String getClassName()
           
 java.lang.String getInstanceName()
           
 org.eclipse.jdt.core.IJavaProject getProject()
           
private  void handleBrowse()
          Uses the standard container selection dialog to choose the new value for the container field.
 void setProject(org.eclipse.jdt.core.IJavaProject project)
           
 void setVisible(boolean visible)
           
private  void updateStatus(java.lang.String message)
           
 
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
 

Field Detail

browseButton

private org.eclipse.swt.widgets.Button browseButton

classText

private org.eclipse.swt.widgets.Text classText

defaultClassName

private java.lang.String defaultClassName

nameText

private org.eclipse.swt.widgets.Text nameText

project

private org.eclipse.jdt.core.IJavaProject project

scope

private org.eclipse.jdt.core.search.IJavaSearchScope scope

se

private final org.eclipse.jdt.core.search.SearchEngine se

projCheck

private org.eclipse.swt.widgets.Button projCheck
Constructor Detail

AddToObjectBenchWizardPage

public AddToObjectBenchWizardPage(org.eclipse.jdt.core.IJavaProject project,
                                  java.lang.String className)
Constructor for SampleNewWizardPage.

Parameters:
project -
Method Detail

createClassText

private void createClassText(org.eclipse.swt.widgets.Composite parent)
Creates the "Class name" text row

Parameters:
parent - The composite parent that this row will be added to. It's assumed that it uses GridLayout.

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
See Also:
IDialogPage.createControl(Composite)

createNameText

private void createNameText(org.eclipse.swt.widgets.Composite parent)
Creates the "Instance name" text row

Parameters:
parent - The composite parent that this row will be added to. It's assumed that it uses GridLayout.

createProjectCombo

private void createProjectCombo(org.eclipse.swt.widgets.Composite parent)
Parameters:
parent -

dialogChanged

private void dialogChanged()
Ensures that both text fields are set.


getInstanceName

public java.lang.String getInstanceName()

getClassName

public java.lang.String getClassName()

getProject

public org.eclipse.jdt.core.IJavaProject getProject()

handleBrowse

private void handleBrowse()
Uses the standard container selection dialog to choose the new value for the container field.


setProject

public void setProject(org.eclipse.jdt.core.IJavaProject project)

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
setVisible in class org.eclipse.jface.dialogs.DialogPage
See Also:
IDialogPage.setVisible(boolean)

updateStatus

private void updateStatus(java.lang.String message)