org.ow2.clif.console.lib.egui.editor
Class TestPlanEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.ui.part.MultiPageEditorPart
                  extended by org.eclipse.ui.forms.editor.FormEditor
                      extended by org.ow2.clif.console.lib.egui.editor.TestPlanEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.dialogs.IPageChangeProvider, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class TestPlanEditor
extends org.eclipse.ui.forms.editor.FormEditor

Multi-Page editor for CLIF Test Plans. This editor has 2 views:

Author:
Manuel AZEMA, Florian Francheteau, Bruno Dillenseger

Field Summary
static java.lang.String[] colName
           
protected  TestPlanMasterEditPage editPage
           
protected static java.lang.String ID_PAGE_EDITION
           
static int INDEX_COL_ARGUMENT
           
static int INDEX_COL_CLASS
           
static int INDEX_COL_COMMENT
           
static int INDEX_COL_ID
           
static int INDEX_COL_ROLE
           
static int INDEX_COL_SERVER
           
static int INDEX_COL_STATE
           
static int POS_PAGE_EDITION
          Edition page use for editing a test plan
 
Fields inherited from class org.eclipse.ui.forms.editor.FormEditor
pages
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
TestPlanEditor()
           
 
Method Summary
protected  void addPages()
          Add always editPage and add testPage if registry is started and this test plan is deployed.
 void createPageEdition()
          Create a blades edition page sort by class.
 void createPageTest()
          Create a test plan execution commands.
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
          Save Test Plan with Java Properties format.
 void doSaveAs()
          Save Test Plan in new file and change Test Plan title.
 TestPlanMasterEditPage getEditPage()
          Get edit page
 boolean isDirty()
          Test if the edition page needs to be save.
 boolean isEditable()
          Test if the edition page is editable.
 boolean isSaveAsAllowed()
          SaveAs is supported for this editor
static void setDeployedTest(java.lang.String testName)
          Sets the file name of the currently deployed test plan
 void setDirty(boolean isDirty)
          Set the editor dirty state.
 void setEditable(boolean isEditable)
          Set the editor editable state
 
Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, addPageChangedListener, close, commitPages, configurePage, createPageContainer, createPages, createToolkit, dispose, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, init, pageChange, removePage, removePageChangedListener, selectReveal, setActivePage, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
createPartControl, createSite, findEditors, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, setActiveEditor, setControl, setFocus, setPageImage, setPageText
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Field Detail

POS_PAGE_EDITION

public static final int POS_PAGE_EDITION
Edition page use for editing a test plan

See Also:
Constant Field Values

ID_PAGE_EDITION

protected static final java.lang.String ID_PAGE_EDITION
See Also:
Constant Field Values

editPage

protected TestPlanMasterEditPage editPage

INDEX_COL_ID

public static final int INDEX_COL_ID
See Also:
Constant Field Values

INDEX_COL_SERVER

public static final int INDEX_COL_SERVER
See Also:
Constant Field Values

INDEX_COL_ROLE

public static final int INDEX_COL_ROLE
See Also:
Constant Field Values

INDEX_COL_CLASS

public static final int INDEX_COL_CLASS
See Also:
Constant Field Values

INDEX_COL_ARGUMENT

public static final int INDEX_COL_ARGUMENT
See Also:
Constant Field Values

INDEX_COL_COMMENT

public static final int INDEX_COL_COMMENT
See Also:
Constant Field Values

INDEX_COL_STATE

public static final int INDEX_COL_STATE
See Also:
Constant Field Values

colName

public static final java.lang.String[] colName
Constructor Detail

TestPlanEditor

public TestPlanEditor()
Method Detail

setDeployedTest

public static void setDeployedTest(java.lang.String testName)
Sets the file name of the currently deployed test plan

Parameters:
testName - file name of deployed test plan

createPageEdition

public void createPageEdition()
Create a blades edition page sort by class.


createPageTest

public void createPageTest()
                    throws ClifException
Create a test plan execution commands.

Throws:
ClifException

addPages

protected void addPages()
Add always editPage and add testPage if registry is started and this test plan is deployed.

Specified by:
addPages in class org.eclipse.ui.forms.editor.FormEditor

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Save Test Plan with Java Properties format.

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart

doSaveAs

public void doSaveAs()
Save Test Plan in new file and change Test Plan title.

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart

isSaveAsAllowed

public boolean isSaveAsAllowed()
SaveAs is supported for this editor

Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart
Returns:
true if SaveAs is supported

isDirty

public boolean isDirty()
Test if the edition page needs to be save.

Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Overrides:
isDirty in class org.eclipse.ui.forms.editor.FormEditor
Returns:
edition page dirty state

setDirty

public void setDirty(boolean isDirty)
Set the editor dirty state.

Parameters:
isDirty - the dirty state true if editor needs to be saved.

isEditable

public boolean isEditable()
Test if the edition page is editable.

Returns:
edition page dirty state

getEditPage

public TestPlanMasterEditPage getEditPage()
Get edit page

Returns:
TestPlanMasterEditPage the editPage.

setEditable

public void setEditable(boolean isEditable)
Set the editor editable state

Parameters:
isEditable - the editable state