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 Summary
Modifier and TypeMethodDescriptionboolean<T> @Nullable TgetAdapter(Class<T> adapter) Returns a list of children model elements.Returns the URI (location) of the resource.getName()Returns the name of the project model element.Returns the parent of this model element.org.eclipse.core.runtime.IPathgetPath()Returns the path of the project model resource.Returns the project model element.org.eclipse.core.resources.IResourceReturns the resource associated with the project model element.org.eclipse.core.resources.IFoldergetTraceSupplementaryFolder(String supplFolderPath) Returns the trace specific supplementary folder under the project's supplementary folder.inthashCode()org.eclipse.core.resources.IFolderprepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder) Returns the trace specific supplementary folder under the project's supplementary folder.org.eclipse.core.resources.IFolderprepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns the trace specific supplementary folder under the project's supplementary folder.voidrefresh()Method to request to refresh the project.voidRefresh the common navigator viewer starting with this element.toString()Methods inherited from interface org.eclipse.tracecompass.tmf.ui.project.model.ITmfProjectModelElement
dispose, getChild, getIcon, getLabelText, hasChildren
-
Method Details
-
getName
Description copied from interface:ITmfProjectModelElementReturns the name of the project model element.- Specified by:
getNamein interfaceITmfProjectModelElement- Returns:
- the name of the project element.
-
getResource
public org.eclipse.core.resources.IResource getResource()Description copied from interface:ITmfProjectModelElementReturns the resource associated with the project model element.- Specified by:
getResourcein interfaceITmfProjectModelElement- Returns:
- the model resource.
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:ITmfProjectModelElementReturns the path of the project model resource.- Specified by:
getPathin interfaceITmfProjectModelElement- Returns:
- the resource path.
-
getLocation
Description copied from interface:ITmfProjectModelElementReturns the URI (location) of the resource.- Specified by:
getLocationin interfaceITmfProjectModelElement- Returns:
- the resource URI.
-
getProject
Description copied from interface:ITmfProjectModelElementReturns the project model element.- Specified by:
getProjectin interfaceITmfProjectModelElement- Returns:
- the project model element.
-
getParent
Description copied from interface:ITmfProjectModelElementReturns the parent of this model element.- Specified by:
getParentin interfaceITmfProjectModelElement- Returns:
- the parent of this model element.
-
getChildren
Description copied from interface:ITmfProjectModelElementReturns a list of children model elements.- Specified by:
getChildrenin interfaceITmfProjectModelElement- Returns:
- a list of children model elements.
-
refresh
public void refresh()Description copied from interface:ITmfProjectModelElementMethod to request to refresh the project.- Specified by:
refreshin interfaceITmfProjectModelElement
-
hashCode
public int hashCode() -
equals
-
refreshViewer
public void refreshViewer()Refresh the common navigator viewer starting with this element. Does not refresh the model.- Since:
- 3.1
-
getTraceSupplementaryFolder
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 foldercreateFolder- if true, the returned folder will be createdprogressMonitor- 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 foldercreateFolder- if true, the returned folder will be created- Returns:
- the trace specific supplementary folder
-
toString
-
getAdapter
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-