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 EditingDomaineditingDomainprotected com.google.inject.Injectorinjectorprotected EObjectmodelRepositoryprotected Resourceresource
-
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 StructuredViewergetViewer()protected voidinitContextMenu()Initialize the parsley context menuprotected voidinitDragAndDrop()Initialize the parsley drag and drop functionprotected voidinitEditingDomain()Returns the parsley EditingDomainprotected abstract voidinitInjector()Initalizes the google guice injector attribute with the injector of the respective parsley viewprotected abstract voidinitParsley(Composite parent)Initialize the connection between the e4 plugin and the Parsley TreeViewvoidsetModelRepository(EObject modelRepository)abstract voidupdate()Updates the underlying resources of the tree and redraws the componentprotected ResourceupdateResource(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
-
-