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 Details

    • injector

      protected com.google.inject.Injector injector
    • resource

      protected Resource resource
    • editingDomain

      protected EditingDomain editingDomain
    • modelRepository

      protected EObject modelRepository
  • Constructor Details

    • ComponentViewer

      public ComponentViewer(Composite parent, EObject modelRepository)
      Parameters:
      parent - container where the tree viewer is placed in
      modelRepository - EObject which is shown in the view
  • Method Details

    • 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