Class ComponentViewer
- java.lang.Object
-
- org.palladiosimulator.measurementsui.abstractviewer.ComponentViewer
-
- Direct Known Subclasses:
SaveableComponentViewer
,WizardTableViewer
public abstract class ComponentViewer extends Object
Abstract component class to connect a parsley view to an eclipse 4 plugin
-
-
Field Summary
Fields Modifier and Type Field Description protected EditingDomain
editingDomain
protected com.google.inject.Injector
injector
protected EObject
modelRepository
protected Resource
resource
-
Constructor Summary
Constructors Constructor Description ComponentViewer(Composite parent, EObject modelRepository)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Optional<EObject>
getModelRepository()
abstract StructuredViewer
getViewer()
protected void
initContextMenu()
Initialize the parsley context menuprotected void
initDragAndDrop()
Initialize the parsley drag and drop functionprotected void
initEditingDomain()
Returns the parsley EditingDomainprotected abstract void
initInjector()
Initalizes the google guice injector attribute with the injector of the respective parsley viewprotected abstract void
initParsley(Composite parent)
Initialize the connection between the e4 plugin and the Parsley TreeViewvoid
setModelRepository(EObject modelRepository)
abstract void
update()
Updates the underlying resources of the tree and redraws the componentprotected Resource
updateResource(EObject model)
-
-
-
Field Detail
-
injector
protected com.google.inject.Injector injector
-
resource
protected Resource resource
-
editingDomain
protected EditingDomain editingDomain
-
modelRepository
protected EObject modelRepository
-
-
Method Detail
-
initInjector
protected abstract void initInjector()
Initalizes the google guice injector attribute with the injector of the respective parsley view
-
getModelRepository
protected Optional<EObject> getModelRepository()
- Returns:
- the repository of the current view. For Example the monitorrepository
-
setModelRepository
public void setModelRepository(EObject modelRepository)
-
initParsley
protected abstract void initParsley(Composite parent)
Initialize the connection between the e4 plugin and the Parsley TreeView- Parameters:
parent
- composite container
-
update
public abstract void update()
Updates the underlying resources of the tree and redraws the component
-
initEditingDomain
protected void initEditingDomain()
Returns the parsley EditingDomain
-
getViewer
public abstract StructuredViewer getViewer()
- Returns:
- the current viewer of the shown composite
-
updateResource
protected Resource updateResource(EObject model)
- Parameters:
model
- EMF Model of the shown data- Returns:
- the resource using the resource set of the editing domain
-
initDragAndDrop
protected void initDragAndDrop()
Initialize the parsley drag and drop function
-
initContextMenu
protected void initContextMenu()
Initialize the parsley context menu
-
-