Traceability

org.topcased.traceability.hmi.wizards
Class TtmDiagramsPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.topcased.traceability.hmi.wizards.TtmDiagramsPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

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

In order to customise the Page properly we have deleted the previons

** Generated **
NOT

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
TtmDiagramsPage(java.lang.String pageName, org.eclipse.jface.viewers.IStructuredSelection selection)
          Constructor
TtmDiagramsPage(java.lang.String pageName, org.eclipse.jface.viewers.IStructuredSelection selection, boolean allowDiagramInitialization)
          Constructor
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Creation of the wizard page
protected  void createDirectoryGroup(org.eclipse.swt.widgets.Composite parent)
          Create the group defining the directory location - New one - Or existing one
protected  void createModelGroup(org.eclipse.swt.widgets.Composite parent)
          Create the Model group allowding to enter the new model name or to select an existing model file from the repository
 java.lang.String getDiagramId()
          Returns the selected diagram id
 java.lang.String getEditorID()
           
 java.lang.String getFileExtension()
           
 java.lang.String getModelName()
          Returns the selected model name
protected  java.lang.String getModelNameWithoutExtension(java.lang.String fullName)
          Returns the name of the modelFile without extension
 java.lang.String getNewProjectLocation()
          Return the NewProject Location if the
 URI getNewProjectLocationURI()
          Get the URI for the location field if possible.
 java.lang.String getNewProjectName()
          Returns the new eclipse project name in which the model will be added
protected  ResourceSet getResourceSet()
          Return the ResourceSet used to store the model and diagram file.
 EObject getRootEObject()
          Returns the root EObject of the model file
 org.eclipse.core.resources.IContainer getSelectedIContainer()
          Returns the selected destination container
 java.lang.String getTemplateId()
          Returns the selected template id
protected  void handleDirectoryChoose()
          Handle the directory choice button action
protected  void handleModelChoose()
          Handle the model choice button action
protected  void handleProjectLocationChoose()
          Handle the project location choice button action
 boolean isDefaultLocation()
           
 boolean isInitialized()
          Returns if the diagram must be initialized with model objects
 boolean isNewModel()
          Return the choice of creation made by the user
 boolean isNewProject()
          Return the choice of creation made by the user
protected  boolean loadModelFile()
          Load the modelFile selected and update the associated widgets
protected  boolean validatePage()
          Check if the informations contained in the page are OK
 
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, setVisible
 
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, setVisible
 

Constructor Detail

TtmDiagramsPage

public TtmDiagramsPage(java.lang.String pageName,
                       org.eclipse.jface.viewers.IStructuredSelection selection)
Constructor

Parameters:
pageName -
selection -

TtmDiagramsPage

public TtmDiagramsPage(java.lang.String pageName,
                       org.eclipse.jface.viewers.IStructuredSelection selection,
                       boolean allowDiagramInitialization)
Constructor

Parameters:
pageName - the page title
selection - the selected object
allowDiagramInitialization -
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Creation of the wizard page

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

createModelGroup

protected void createModelGroup(org.eclipse.swt.widgets.Composite parent)
Create the Model group allowding to enter the new model name or to select an existing model file from the repository

Parameters:
parent -

createDirectoryGroup

protected void createDirectoryGroup(org.eclipse.swt.widgets.Composite parent)
Create the group defining the directory location - New one - Or existing one

Parameters:
parent -

handleDirectoryChoose

protected void handleDirectoryChoose()
Handle the directory choice button action


handleModelChoose

protected void handleModelChoose()
Handle the model choice button action


handleProjectLocationChoose

protected void handleProjectLocationChoose()
Handle the project location choice button action


loadModelFile

protected boolean loadModelFile()
Load the modelFile selected and update the associated widgets

Returns:
true if the file was loaded successfully, return false otherwise.

getResourceSet

protected ResourceSet getResourceSet()
Return the ResourceSet used to store the model and diagram file. By default create a new ResourceSet.

Returns:
ResourceSet

validatePage

protected boolean validatePage()
Check if the informations contained in the page are OK

Returns:
true is OK

isInitialized

public boolean isInitialized()
Returns if the diagram must be initialized with model objects

Returns:
true if diagram must be initialized

getSelectedIContainer

public org.eclipse.core.resources.IContainer getSelectedIContainer()
Returns the selected destination container

Returns:
the selected container

getModelName

public java.lang.String getModelName()
Returns the selected model name

Returns:
the model name. Returns null if no model file name is set.

getNewProjectName

public java.lang.String getNewProjectName()
Returns the new eclipse project name in which the model will be added

Returns:
the ProjectName Returns null if the project name is not set

getRootEObject

public EObject getRootEObject()
Returns the root EObject of the model file

Returns:
the EObject

getModelNameWithoutExtension

protected java.lang.String getModelNameWithoutExtension(java.lang.String fullName)
Returns the name of the modelFile without extension

Parameters:
fullName - the name with (or without) extension
Returns:
the name of the modelFile without extension

getTemplateId

public java.lang.String getTemplateId()
Returns the selected template id

Returns:
the selected template id. Returns null if none found

getDiagramId

public java.lang.String getDiagramId()
Returns the selected diagram id

Returns:
the selected diagram id. Returns null if none found

isNewModel

public boolean isNewModel()
Return the choice of creation made by the user

Returns:
true if the model file is not created

isNewProject

public boolean isNewProject()
Return the choice of creation made by the user

Returns:
true if the model file is not created

getEditorID

public java.lang.String getEditorID()
See Also:
org.topcased.modeler.wizards.TtmDiagramsPage#getEditorID()
** Generated **

getFileExtension

public java.lang.String getFileExtension()
See Also:
org.topcased.modeler.wizards.TtmDiagramsPage#getFileExtension()
** Generated **

getNewProjectLocation

public java.lang.String getNewProjectLocation()
Return the NewProject Location if the

Returns:

getNewProjectLocationURI

public URI getNewProjectLocationURI()
Get the URI for the location field if possible.

Returns:
URI or null if it is not valid.

isDefaultLocation

public boolean isDefaultLocation()

Traceability

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.