Class SaveableComponentViewer
java.lang.Object
org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
org.palladiosimulator.measurementsui.abstractviewer.SaveableComponentViewer
- Direct Known Subclasses:
MeasurementsTreeViewer
A common saveable view based on a parsley view.
-
Field Summary
FieldsFields inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
editingDomain, injector, modelRepository, resource -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSaveableComponentViewer(Composite parent, MDirtyable dirty, ECommandService commandService, EObject modelRepository) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddSelectionListener(ESelectionService selectionService) Connects the current selected item in the view with the eclipse selectionservicevoidredo()Redos one command on the command stackvoidsave()Saves the current state of the viewvoidsave(MDirtyable dirty) Saves the current state of the viewvoidundo()Undos one command on the command stackvoidundoAll()Undos every command on the command stackabstract voidprotected ResourceupdateResource(EObject model) Methods inherited from class org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
getModelRepository, getViewer, initContextMenu, initDragAndDrop, initEditingDomain, initInjector, initParsley, setModelRepository, update
-
Field Details
-
dirty
-
commandService
-
-
Constructor Details
-
SaveableComponentViewer
protected SaveableComponentViewer(Composite parent, MDirtyable dirty, ECommandService commandService, EObject modelRepository) - Parameters:
parent- the 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
-
addSelectionListener
Connects the current selected item in the view with the eclipse selectionservice- Parameters:
selectionService- of the eclipse project
-
updateResource
- Overrides:
updateResourcein classComponentViewer- Parameters:
model- EMF Model of the shown data- Returns:
- the resource using the resource set of the editing domain
-
undo
public void undo()Undos one command on the command stack -
undoAll
public void undoAll()Undos every command on the command stack -
redo
public void redo()Redos one command on the command stack -
save
Saves the current state of the view- Parameters:
dirty- describes whether the view was edited- Throws:
IOException- if the save operation fails
-
save
Saves the current state of the view- Throws:
IOException- if the save operation fails
-
update
-