Class TmfProjectModelElement

java.lang.Object
org.eclipse.tracecompass.tmf.ui.project.model.TmfProjectModelElement
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, ITmfProjectModelElement
Direct Known Subclasses:
TmfAnalysisElement, TmfAnalysisOutputElement, TmfCommonProjectElement, TmfExperimentFolder, TmfOnDemandAnalysesElement, TmfOnDemandAnalysisElement, TmfProjectElement, TmfReportElement, TmfReportsElement, TmfTraceFolder, TmfViewsElement

public abstract class TmfProjectModelElement extends Object implements ITmfProjectModelElement, org.eclipse.core.runtime.IAdaptable
The implementation of the base TMF project model element. It provides default implementation of the ITmfProjectModelElement interface.

Version:
1.0
Author:
Francois Chouinard
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ITmfProjectModelElement
      Returns the name of the project model element.
      Specified by:
      getName in interface ITmfProjectModelElement
      Returns:
      the name of the project element.
    • getResource

      public org.eclipse.core.resources.IResource getResource()
      Description copied from interface: ITmfProjectModelElement
      Returns the resource associated with the project model element.
      Specified by:
      getResource in interface ITmfProjectModelElement
      Returns:
      the model resource.
    • getPath

      public org.eclipse.core.runtime.IPath getPath()
      Description copied from interface: ITmfProjectModelElement
      Returns the path of the project model resource.
      Specified by:
      getPath in interface ITmfProjectModelElement
      Returns:
      the resource path.
    • getLocation

      public URI getLocation()
      Description copied from interface: ITmfProjectModelElement
      Returns the URI (location) of the resource.
      Specified by:
      getLocation in interface ITmfProjectModelElement
      Returns:
      the resource URI.
    • getProject

      public TmfProjectElement getProject()
      Description copied from interface: ITmfProjectModelElement
      Returns the project model element.
      Specified by:
      getProject in interface ITmfProjectModelElement
      Returns:
      the project model element.
    • getParent

      public ITmfProjectModelElement getParent()
      Description copied from interface: ITmfProjectModelElement
      Returns the parent of this model element.
      Specified by:
      getParent in interface ITmfProjectModelElement
      Returns:
      the parent of this model element.
    • getChildren

      public List<ITmfProjectModelElement> getChildren()
      Description copied from interface: ITmfProjectModelElement
      Returns a list of children model elements.
      Specified by:
      getChildren in interface ITmfProjectModelElement
      Returns:
      a list of children model elements.
    • refresh

      public void refresh()
      Description copied from interface: ITmfProjectModelElement
      Method to request to refresh the project.
      Specified by:
      refresh in interface ITmfProjectModelElement
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • refreshViewer

      public void refreshViewer()
      Refresh the common navigator viewer starting with this element. Does not refresh the model.
      Since:
      3.1
    • getTraceSupplementaryFolder

      public org.eclipse.core.resources.IFolder getTraceSupplementaryFolder(String supplFolderPath)
      Returns the trace specific supplementary folder under the project's supplementary folder. The returned folder and its parent folders may not exist.
      Parameters:
      supplFolderPath - folder path relative to the project's supplementary folder
      Returns:
      the trace specific supplementary folder
    • prepareTraceSupplementaryFolder

      public org.eclipse.core.resources.IFolder prepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Returns the trace specific supplementary folder under the project's supplementary folder. Its parent folders will be created if they don't exist. If createFolder is true, the returned folder will be created, otherwise it may not exist.
      Parameters:
      supplFolderPath - folder path relative to the project's supplementary folder
      createFolder - if true, the returned folder will be created
      progressMonitor - the progress monitor
      Returns:
      the trace specific supplementary folder
      Since:
      4.0
    • prepareTraceSupplementaryFolder

      public org.eclipse.core.resources.IFolder prepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder)
      Returns the trace specific supplementary folder under the project's supplementary folder. Its parent folders will be created if they don't exist. If createFolder is true, the returned folder will be created, otherwise it may not exist.
      Parameters:
      supplFolderPath - folder path relative to the project's supplementary folder
      createFolder - if true, the returned folder will be created
      Returns:
      the trace specific supplementary folder
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAdapter

      public <T> @Nullable T getAdapter(Class<T> adapter)
      Specified by:
      getAdapter in interface org.eclipse.core.runtime.IAdaptable