Interface IResourceLookup


  • public interface IResourceLookup
    The resource lookup allows clients to lookup workspace resources by model objects, model resources or model URI.

    Resource lookup is aware of platfrom and BM model objects and URIs and is able to process them.

    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IDtProject getDtProject​(org.eclipse.emf.common.util.URI uri)
      Returns project which contains object with provided URI.
      IDtProject getDtProject​(org.eclipse.emf.ecore.EObject object)
      Returns project which contains object with provided model object.
      org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.common.util.URI resourceUri)
      Returns workspace resource IFile which contains object with provided model object URI.
      org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.ecore.EObject object)
      Returns workspace resource IFile which contains the provided model object.
      org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.ecore.resource.Resource resource)
      Returns workspace resource IFile which contains the provided model resource.
      org.eclipse.emf.common.util.URI getPlatformResourceUri​(org.eclipse.emf.ecore.EObject object)
      Returns platform resource URI for the provided model object.
      org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.common.util.URI uri)
      Returns project which contains object with provided URI.
      org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.ecore.EObject object)
      Returns project which contains object with provided model object.
      org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.ecore.resource.Resource resource)
      Returns project which contains object with provided model object resource.
    • Method Detail

      • getPlatformResourceUri

        org.eclipse.emf.common.util.URI getPlatformResourceUri​(org.eclipse.emf.ecore.EObject object)
        Returns platform resource URI for the provided model object. Can return null if model object does not have associated platform URI.
        Parameters:
        object - the model object, cannot be null
        Returns:
        the platform resource URI for the provided model object or null if object does not have associated platform URI
      • getPlatformResource

        org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.ecore.EObject object)
        Returns workspace resource IFile which contains the provided model object. Can return null if workspace resource file not found.
        Parameters:
        object - the model object, cannot be null
        Returns:
        the file which contains the provided model object, or null if model object is out of any file
      • getPlatformResource

        org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.ecore.resource.Resource resource)
        Returns workspace resource IFile which contains the provided model resource. Can return null if workspace resource file not found.
        Parameters:
        object - the model resource, cannot be null
        Returns:
        the file which contains the provided model resource, or null if model resource is out of any file
      • getPlatformResource

        org.eclipse.core.resources.IFile getPlatformResource​(org.eclipse.emf.common.util.URI resourceUri)
        Returns workspace resource IFile which contains object with provided model object URI. Can return null if file not found.
        Parameters:
        uri - the object URI, cannot be null
        Returns:
        the file which contains object with provided URI or null if object is out of any file
      • getProject

        org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.common.util.URI uri)
        Returns project which contains object with provided URI. Can return null if project not found.
        Parameters:
        uri - the object URI, cannot be null
        Returns:
        the project which contains object with provided URI or null if object is out of any project
      • getProject

        org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.ecore.EObject object)
        Returns project which contains object with provided model object. Can return null if project not found.
        Parameters:
        object - the model object, cannot be null
        Returns:
        the project which contains object with provided model object, or null if model object is out of any project
      • getDtProject

        IDtProject getDtProject​(org.eclipse.emf.ecore.EObject object)
        Returns project which contains object with provided model object. Can return null if project not found.
        Parameters:
        object - the model object, cannot be null
        Returns:
        the project which contains object with provided model object, or null if model object is out of any project
      • getDtProject

        IDtProject getDtProject​(org.eclipse.emf.common.util.URI uri)
        Returns project which contains object with provided URI. Can return null if project not found. This method returns IDtProject only for active workspace DT projects and not overlay/virtual ones (as URI it's doesn't provide enough resolution for their addressing)
        Parameters:
        uri - the object URI, cannot be null
        Returns:
        the project which contains object with provided URI or null if object is out of any project
      • getProject

        org.eclipse.core.resources.IProject getProject​(org.eclipse.emf.ecore.resource.Resource resource)
        Returns project which contains object with provided model object resource. Can return null if project not found.
        Parameters:
        resource - the model resource, cannot be null
        Returns:
        the project which contains object with provided model object resource, or null if model resource is out of any project