org.jmlspecs.eclipse.jdt.ui
Class NewJmlSpecCreationPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.eclipse.jdt.ui.wizards.NewElementWizardPage
              extended by org.eclipse.jdt.ui.wizards.NewContainerWizardPage
                  extended by org.eclipse.jdt.ui.wizards.NewTypeWizardPage
                      extended by org.jmlspecs.eclipse.jdt.ui.NewJmlSpecCreationPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class NewJmlSpecCreationPage
extends org.eclipse.jdt.ui.wizards.NewTypeWizardPage


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jdt.ui.wizards.NewTypeWizardPage
org.eclipse.jdt.ui.wizards.NewTypeWizardPage.ImportsManager
 
Field Summary
 java.lang.String tabamount
           
 
Fields inherited from class org.eclipse.jdt.ui.wizards.NewTypeWizardPage
ANNOTATION_TYPE, CLASS_TYPE, ENUM_TYPE, F_ABSTRACT, F_FINAL, F_PRIVATE, F_PROTECTED, F_PUBLIC, F_STATIC, INTERFACE_TYPE
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
NewJmlSpecCreationPage()
          Creates a new NewClassWizardPage
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
 void createType(org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates the new type using the entered field values.
 void init(org.eclipse.jface.viewers.IStructuredSelection selection)
          The wizard owning this page is responsible for calling this method with the current selection.
 void insertCompUnit(ICompilationUnit cu, java.lang.StringBuffer s, java.lang.String eol, IPackageFragment pack)
           
 void insertField(IField f, java.lang.StringBuffer s, java.lang.String indent, java.lang.String eol)
           
 void insertInitializer(IInitializer i, java.lang.StringBuffer s, java.lang.String indent, java.lang.String eol)
           
 void insertMethod(IMethod m, java.lang.StringBuffer s, java.lang.String indent, java.lang.String eol)
           
 void insertType(IType ty, java.lang.StringBuffer s, java.lang.String indent, java.lang.String eol)
           
 boolean isCreateMethods()
          Returns the current selection state of the 'Create Main' checkbox.
 void setMethodStubSelection(boolean createMethods, boolean createConstructors, boolean createInherited, boolean canBeModified)
          Sets the selection state of the method stub checkboxes.
 void setVisible(boolean visible)
           
 
Methods inherited from class org.eclipse.jdt.ui.wizards.NewTypeWizardPage
addSuperInterface, enableCommentControl, getCreatedType, getEnclosingType, getEnclosingTypeText, getModifiedResource, getModifiers, getPackageFragment, getPackageText, getRunnable, getSuperClass, getSuperInterfaces, getTypeName, isAddComments, isEnclosingTypeSelected, setAddComments, setEnclosingType, setEnclosingTypeSelection, setModifiers, setPackageFragment, setSuperClass, setSuperInterfaces, setTypeName
 
Methods inherited from class org.eclipse.jdt.ui.wizards.NewContainerWizardPage
getJavaProject, getPackageFragmentRoot, getPackageFragmentRootText, setPackageFragmentRoot
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getMessageType, getTitle, performHelp, setMessage
 
Methods inherited from class java.lang.Object
equals, 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

tabamount

public final java.lang.String tabamount
See Also:
Constant Field Values
Constructor Detail

NewJmlSpecCreationPage

public NewJmlSpecCreationPage()
Creates a new NewClassWizardPage

Method Detail

init

public void init(org.eclipse.jface.viewers.IStructuredSelection selection)
The wizard owning this page is responsible for calling this method with the current selection. The selection is used to initialize the fields of the wizard page.

Parameters:
selection - used to initialize the fields

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
setVisible in class org.eclipse.jdt.ui.wizards.NewElementWizardPage

isCreateMethods

public boolean isCreateMethods()
Returns the current selection state of the 'Create Main' checkbox.

Returns:
the selection state of the 'Create Main' checkbox

setMethodStubSelection

public void setMethodStubSelection(boolean createMethods,
                                   boolean createConstructors,
                                   boolean createInherited,
                                   boolean canBeModified)
Sets the selection state of the method stub checkboxes.

Parameters:
createMain - initial selection state of the 'Create Main' checkbox.
createConstructors - initial selection state of the 'Create Constructors' checkbox.
createInherited - initial selection state of the 'Create inherited abstract methods' checkbox.
canBeModified - if true the method stub checkboxes can be changed by the user. If false the buttons are "read-only"

insertType

public void insertType(IType ty,
                       java.lang.StringBuffer s,
                       java.lang.String indent,
                       java.lang.String eol)
                throws JavaModelException
Throws:
JavaModelException

insertInitializer

public void insertInitializer(IInitializer i,
                              java.lang.StringBuffer s,
                              java.lang.String indent,
                              java.lang.String eol)
                       throws JavaModelException
Throws:
JavaModelException

insertMethod

public void insertMethod(IMethod m,
                         java.lang.StringBuffer s,
                         java.lang.String indent,
                         java.lang.String eol)
                  throws JavaModelException
Throws:
JavaModelException

insertField

public void insertField(IField f,
                        java.lang.StringBuffer s,
                        java.lang.String indent,
                        java.lang.String eol)
                 throws JavaModelException
Throws:
JavaModelException

insertCompUnit

public void insertCompUnit(ICompilationUnit cu,
                           java.lang.StringBuffer s,
                           java.lang.String eol,
                           IPackageFragment pack)
                    throws JavaModelException
Throws:
JavaModelException

createType

public void createType(org.eclipse.core.runtime.IProgressMonitor monitor)
                throws org.eclipse.core.runtime.CoreException,
                       java.lang.InterruptedException
Creates the new type using the entered field values.

Overrides:
createType in class org.eclipse.jdt.ui.wizards.NewTypeWizardPage
Parameters:
monitor - a progress monitor to report progress.
Throws:
org.eclipse.core.runtime.CoreException - Thrown when the creation failed.
java.lang.InterruptedException - Thrown when the operation was canceled.