Class MeasurementsTreeViewer
- java.lang.Object
-
- org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
-
- org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
-
- org.palladiosimulator.measurementsui.abstractviewer.MeasurementsTreeViewer
-
- Direct Known Subclasses:
EmptyMeasuringPointsTreeViewer
,MonitorTreeViewer
,SloTreeViewer
public abstract class MeasurementsTreeViewer extends SaveableComponentViewer
Creates a eclipse.swt TreeView based on a parsley TreeView project.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.emf.parsley.viewers.ViewerFactory
treeFactory
protected TreeViewer
treeViewer
-
Fields inherited from class org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
commandService, dirty
-
Fields inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
editingDomain, injector, modelRepository, resource
-
-
Constructor Summary
Constructors Constructor Description MeasurementsTreeViewer(Composite parent, MDirtyable dirty, org.eclipse.e4.core.commands.ECommandService commandService, EObject modelRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMouseListener()
Adds a DoubleClickMouseListener which changes Attributes if an icon in the treeview is double clicked.void
addSelectionListener(ESelectionService selectionService)
Adds a listener which connects the selected tree item to the ESelectionService.StructuredViewer
getViewer()
Return the TreeViewerprotected void
initParsley(Composite parent)
Initialize the connection between the e4 plugin and the Parsley TreeViewvoid
update()
Updates the underlying resources of the tree and redraws the componentvoid
update(EObject modelRepository)
-
Methods inherited from class org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
redo, save, save, undo, undoAll, updateResource
-
Methods inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
getModelRepository, initContextMenu, initDragAndDrop, initEditingDomain, initInjector, setModelRepository
-
-
-
-
Field Detail
-
treeViewer
protected TreeViewer treeViewer
-
treeFactory
protected org.eclipse.emf.parsley.viewers.ViewerFactory treeFactory
-
-
Constructor Detail
-
MeasurementsTreeViewer
public MeasurementsTreeViewer(Composite parent, MDirtyable dirty, org.eclipse.e4.core.commands.ECommandService commandService, EObject modelRepository)
- Parameters:
parent
- a container where the view is embeddeddirty
- the dirty state which indicates whether there were changes made in the viewercommandService
- a service of the eclipse application in order to make the tree view saveablemodelRepository
- EObject which is shown in the view
-
-
Method Detail
-
addMouseListener
public void addMouseListener()
Adds a DoubleClickMouseListener which changes Attributes if an icon in the treeview is double clicked.
-
getViewer
public StructuredViewer getViewer()
Return the TreeViewer- Specified by:
getViewer
in classComponentViewer
- Returns:
- the current TreeViewer
-
addSelectionListener
public void addSelectionListener(ESelectionService selectionService)
Adds a listener which connects the selected tree item to the ESelectionService.- Specified by:
addSelectionListener
in classSaveableComponentViewer
- Parameters:
selectionService
- the Eclipse SelectionService to which the selected element is passed on
-
initParsley
protected void initParsley(Composite parent)
Description copied from class:ComponentViewer
Initialize the connection between the e4 plugin and the Parsley TreeView- Specified by:
initParsley
in classComponentViewer
- Parameters:
parent
- composite container
-
update
public void update(EObject modelRepository)
- Specified by:
update
in classSaveableComponentViewer
-
update
public void update()
Description copied from class:ComponentViewer
Updates the underlying resources of the tree and redraws the component- Specified by:
update
in classComponentViewer
-
-