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
Creates a eclipse.swt TreeView based on a parsley TreeView project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.emf.parsley.viewers.ViewerFactoryprotected org.eclipse.jface.viewers.TreeViewerFields inherited from class org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
commandService, dirtyFields inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
editingDomain, injector, modelRepository, resource -
Constructor Summary
ConstructorsConstructorDescriptionMeasurementsTreeViewer(org.eclipse.swt.widgets.Composite parent, org.eclipse.e4.ui.model.application.ui.MDirtyable dirty, org.eclipse.e4.core.commands.ECommandService commandService, EObject modelRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a DoubleClickMouseListener which changes Attributes if an icon in the treeview is double clicked.voidaddSelectionListener(org.eclipse.e4.ui.workbench.modeling.ESelectionService selectionService) Adds a listener which connects the selected tree item to the ESelectionService.org.eclipse.jface.viewers.StructuredViewerReturn the TreeViewerprotected voidinitParsley(org.eclipse.swt.widgets.Composite parent) Initialize the connection between the e4 plugin and the Parsley TreeViewvoidupdate()Updates the underlying resources of the tree and redraws the componentvoidMethods inherited from class org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
redo, save, save, undo, undoAll, updateResourceMethods inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
getModelRepository, initContextMenu, initDragAndDrop, initEditingDomain, initInjector, setModelRepository
-
Field Details
-
treeViewer
protected org.eclipse.jface.viewers.TreeViewer treeViewer -
treeFactory
protected org.eclipse.emf.parsley.viewers.ViewerFactory treeFactory
-
-
Constructor Details
-
MeasurementsTreeViewer
public MeasurementsTreeViewer(org.eclipse.swt.widgets.Composite parent, org.eclipse.e4.ui.model.application.ui.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 Details
-
addMouseListener
public void addMouseListener()Adds a DoubleClickMouseListener which changes Attributes if an icon in the treeview is double clicked. -
getViewer
public org.eclipse.jface.viewers.StructuredViewer getViewer()Return the TreeViewer- Specified by:
getViewerin classComponentViewer- Returns:
- the current TreeViewer
-
addSelectionListener
public void addSelectionListener(org.eclipse.e4.ui.workbench.modeling.ESelectionService selectionService) Adds a listener which connects the selected tree item to the ESelectionService.- Specified by:
addSelectionListenerin classSaveableComponentViewer- Parameters:
selectionService- the Eclipse SelectionService to which the selected element is passed on
-
initParsley
protected void initParsley(org.eclipse.swt.widgets.Composite parent) Description copied from class:ComponentViewerInitialize the connection between the e4 plugin and the Parsley TreeView- Specified by:
initParsleyin classComponentViewer- Parameters:
parent- composite container
-
update
- Specified by:
updatein classSaveableComponentViewer
-
update
public void update()Description copied from class:ComponentViewerUpdates the underlying resources of the tree and redraws the component- Specified by:
updatein classComponentViewer
-