org.ow2.clif.scenario.isac.egui.pages.pageBehavior
Class BehaviorEditor

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.ow2.clif.scenario.isac.egui.pages.pageBehavior.BehaviorEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, 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 BehaviorEditor
extends org.eclipse.ui.part.EditorPart

Each behavior in the scenario has his own editor. For this reason, each editor has a behaviorId and behaviorPos. BehaviorPos is used for ordering pages of the Isac Editor.

Author:
Joan Chaumont

Field Summary
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
BehaviorEditor(ScenarioManager scenario, IsacEditor editor, java.lang.String behaviorId, int behaviorPos, LoadProfile profile)
          Constructor
 
Method Summary
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void doSaveAs()
           
 java.lang.String getBehaviorId()
          Behavior id getter
 int getBehaviorPos()
          Behavior position getter
 ScenarioManager getScenario()
           
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
           
 boolean isDirty()
           
 boolean isSaveAsAllowed()
           
 void refresh()
          Refresh components in this editor
 void setBehaviorId(java.lang.String behaviorId)
          Set the behavior Id
 void setBehaviorPos(int behaviorPos)
          Set the position of this behavior in file
 void setDocument(org.eclipse.jface.text.IDocument doc)
          Set the edited document
 void setFocus()
           
 void setProfile(LoadProfile profile)
          Set a profile for this behavior
 
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, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, 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, dispose, getSite, getTitle, getTitleImage, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

BehaviorEditor

public BehaviorEditor(ScenarioManager scenario,
                      IsacEditor editor,
                      java.lang.String behaviorId,
                      int behaviorPos,
                      LoadProfile profile)
Constructor

Parameters:
scenario -
editor -
behaviorId -
behaviorPos -
profile -
Method Detail

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart

doSaveAs

public void doSaveAs()
Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
          throws org.eclipse.ui.PartInitException
Specified by:
init in interface org.eclipse.ui.IEditorPart
Specified by:
init in class org.eclipse.ui.part.EditorPart
Throws:
org.eclipse.ui.PartInitException

isDirty

public boolean isDirty()
Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Specified by:
isDirty in class org.eclipse.ui.part.EditorPart

isSaveAsAllowed

public boolean isSaveAsAllowed()
Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

setDocument

public void setDocument(org.eclipse.jface.text.IDocument doc)
Set the edited document

Parameters:
doc -

setBehaviorId

public void setBehaviorId(java.lang.String behaviorId)
Set the behavior Id

Parameters:
behaviorId -

setBehaviorPos

public void setBehaviorPos(int behaviorPos)
Set the position of this behavior in file

Parameters:
behaviorPos -

setProfile

public void setProfile(LoadProfile profile)
Set a profile for this behavior

Parameters:
profile -

getScenario

public ScenarioManager getScenario()
Returns:
ScenarioManager

getBehaviorId

public java.lang.String getBehaviorId()
Behavior id getter

Returns:
String behavior id

getBehaviorPos

public int getBehaviorPos()
Behavior position getter

Returns:
int behavior position

refresh

public void refresh()
Refresh components in this editor