Class TmfTraceFolder

java.lang.Object
org.eclipse.tracecompass.tmf.ui.project.model.TmfProjectModelElement
org.eclipse.tracecompass.tmf.ui.project.model.TmfTraceFolder
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, ITmfProjectModelElement, org.eclipse.ui.IActionFilter, org.eclipse.ui.views.properties.IPropertySource, org.eclipse.ui.views.properties.IPropertySource2
Direct Known Subclasses:
TmfTracesFolder

public class TmfTraceFolder extends TmfProjectModelElement implements org.eclipse.ui.IActionFilter, org.eclipse.ui.views.properties.IPropertySource2
Implementation of trace folder model element representing a trace folder in the project.

Version:
1.0
Author:
Francois Chouinard
  • Constructor Details

    • TmfTraceFolder

      public TmfTraceFolder(String name, org.eclipse.core.resources.IFolder resource, TmfProjectElement parent)
      Constructor. Creates folder model element under the project.
      Parameters:
      name - The name of trace folder.
      resource - The folder resource.
      parent - The parent element (project).
    • TmfTraceFolder

      public TmfTraceFolder(String name, org.eclipse.core.resources.IFolder resource, TmfTraceFolder parent)
      Constructor. Creates folder model element under another folder.
      Parameters:
      name - The name of trace folder.
      resource - The folder resource.
      parent - The parent element (folder).
  • Method Details

    • getResource

      public org.eclipse.core.resources.IFolder getResource()
      Description copied from interface: ITmfProjectModelElement
      Returns the resource associated with the project model element.
      Specified by:
      getResource in interface ITmfProjectModelElement
      Overrides:
      getResource in class TmfProjectModelElement
      Returns:
      the model resource.
    • getIcon

      public org.eclipse.swt.graphics.Image getIcon()
      Description copied from interface: ITmfProjectModelElement
      Returns the icon of this element.
      Specified by:
      getIcon in interface ITmfProjectModelElement
      Returns:
      The icon
      Since:
      2.0
    • getLabelText

      public String getLabelText()
      Description copied from interface: ITmfProjectModelElement
      Returns the text of the label of this element.
      Specified by:
      getLabelText in interface ITmfProjectModelElement
      Returns:
      The label text
      Since:
      2.0
    • getTraces

      public List<@NonNull TmfTraceElement> getTraces()
      Returns a list of trace elements under the folder element, recursively.
      Returns:
      list of trace model elements
    • getTraceElements

      public @NonNull List<TmfTraceElement> getTraceElements(@NonNull List<org.eclipse.core.resources.IResource> resources)
      Gets the traces elements under this folder containing the given resources
      Parameters:
      resources - resources to search for
      Returns:
      list of trace elements
      Since:
      2.0
    • testAttribute

      public boolean testAttribute(Object target, String name, String value)
      Specified by:
      testAttribute in interface org.eclipse.ui.IActionFilter
    • getEditableValue

      public Object getEditableValue()
      Specified by:
      getEditableValue in interface org.eclipse.ui.views.properties.IPropertySource
    • getPropertyDescriptors

      public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
      Specified by:
      getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource
    • getPropertyValue

      public Object getPropertyValue(Object id)
      Specified by:
      getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
    • resetPropertyValue

      public void resetPropertyValue(Object id)
      Specified by:
      resetPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
    • setPropertyValue

      public void setPropertyValue(Object id, Object value)
      Specified by:
      setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
    • isPropertyResettable

      public boolean isPropertyResettable(Object id)
      Specified by:
      isPropertyResettable in interface org.eclipse.ui.views.properties.IPropertySource2
    • isPropertySet

      public boolean isPropertySet(Object id)
      Specified by:
      isPropertySet in interface org.eclipse.ui.views.properties.IPropertySource
      Specified by:
      isPropertySet in interface org.eclipse.ui.views.properties.IPropertySource2