Class MeasurementsTreeViewer

Direct Known Subclasses:
EmptyMeasuringPointsTreeViewer, MonitorTreeViewer, SloTreeViewer

public abstract class MeasurementsTreeViewer extends SaveableComponentViewer
Creates a eclipse.swt TreeView based on a parsley TreeView project.
  • Field Details

    • treeViewer

      protected TreeViewer treeViewer
    • treeFactory

      protected org.eclipse.emf.parsley.viewers.ViewerFactory treeFactory
  • Constructor Details

    • MeasurementsTreeViewer

      public MeasurementsTreeViewer(Composite parent, MDirtyable dirty, org.eclipse.e4.core.commands.ECommandService commandService, EObject modelRepository)
      Parameters:
      parent - a container where the view is embedded
      dirty - the dirty state which indicates whether there were changes made in the viewer
      commandService - a service of the eclipse application in order to make the tree view saveable
      modelRepository - 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 StructuredViewer getViewer()
      Return the TreeViewer
      Specified by:
      getViewer in class ComponentViewer
      Returns:
      the current TreeViewer
    • addSelectionListener

      public void addSelectionListener(ESelectionService selectionService)
      Adds a listener which connects the selected tree item to the ESelectionService.
      Specified by:
      addSelectionListener in class SaveableComponentViewer
      Parameters:
      selectionService - the Eclipse SelectionService to which the selected element is passed on
    • initParsley

      protected void initParsley(Composite parent)
      Description copied from class: ComponentViewer
      Initialize the connection between the e4 plugin and the Parsley TreeView
      Specified by:
      initParsley in class ComponentViewer
      Parameters:
      parent - composite container
    • update

      public void update(EObject modelRepository)
      Specified by:
      update in class SaveableComponentViewer
    • update

      public void update()
      Description copied from class: ComponentViewer
      Updates the underlying resources of the tree and redraws the component
      Specified by:
      update in class ComponentViewer