org.objectweb.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.objectweb.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.part.IWorkbenchPartOrientation

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

Multi-Page editor for CLIF Test Plan edition. This editor has 2 view:

Author:
Manuel AZEMA

Field Summary
protected static java.lang.String[] colName
           
protected  TestPlanMasterEditPage editPage
           
protected static java.lang.String ID_PAGE_EDITION
           
protected static java.lang.String ID_PAGE_TEST
           
protected static int INDEX_COL_ARGUMENT
           
protected static int INDEX_COL_CLASS
           
protected static int INDEX_COL_COMMENT
           
protected static int INDEX_COL_ID
           
protected static int INDEX_COL_ROLE
           
protected static int INDEX_COL_SERVER
           
protected static int INDEX_COL_STATE
           
static int POS_PAGE_EDITION
          Edition page use for editing a testplan
static int POS_PAGE_TEST
          Test page use for running a testplan.
protected  TestPlanTestPage testPage
           
 
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()
          Simple construtor
 
Method Summary
protected  void addPages()
          Add always editPage and add testPage if clifserver is started.
 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.
 int getCurrentPage()
          Get the current page.
 TestPlanMasterEditPage getEditPage()
          Get edit page
 TestPlanTestPage getTestPage()
          Get test page
 java.util.Map getTestPlan()
          Get the test plan
 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
 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, configurePage, createPageContainer, createPages, createToolkit, dispose, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getSelectedPage, getToolkit, init, pageChange, removePage, removePageChangedListener, selectReveal, setActivePage, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
createPartControl, createSite, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, 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
addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, 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 testplan

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

POS_PAGE_TEST

public static final int POS_PAGE_TEST
Test page use for running a testplan. Created when clifserver is running.

See Also:
Constant Field Values

ID_PAGE_TEST

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

testPage

protected TestPlanTestPage testPage

INDEX_COL_ID

protected static final int INDEX_COL_ID
See Also:
Constant Field Values

INDEX_COL_SERVER

protected static final int INDEX_COL_SERVER
See Also:
Constant Field Values

INDEX_COL_ROLE

protected static final int INDEX_COL_ROLE
See Also:
Constant Field Values

INDEX_COL_CLASS

protected static final int INDEX_COL_CLASS
See Also:
Constant Field Values

INDEX_COL_ARGUMENT

protected static final int INDEX_COL_ARGUMENT
See Also:
Constant Field Values

INDEX_COL_COMMENT

protected static final int INDEX_COL_COMMENT
See Also:
Constant Field Values

INDEX_COL_STATE

protected static final int INDEX_COL_STATE
See Also:
Constant Field Values

colName

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

TestPlanEditor

public TestPlanEditor()
Simple construtor

Method Detail

createPageEdition

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


createPageTest

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


addPages

protected void addPages()
Add always editPage and add testPage if clifserver is started.

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

setEditable

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

Parameters:
isEditable - the editable state

getEditPage

public TestPlanMasterEditPage getEditPage()
Get edit page

Returns:
TestPlanMasterEditPage the editPage.

getTestPage

public TestPlanTestPage getTestPage()
Get test page

Returns:
TestPlanTestPage the testPage.

getTestPlan

public java.util.Map getTestPlan()
Get the test plan

Returns:
Map the test plan

getCurrentPage

public int getCurrentPage()
Get the current page. See POS_PAGE_EDITION and POS_PAGE_TEST

Overrides:
getCurrentPage in class org.eclipse.ui.forms.editor.FormEditor
Returns:
the current page id