Interface IResourceDescriptionRepository


  • public interface IResourceDescriptionRepository
    Resource description repository provides access to the IResourceDescription index of a given project
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Iterator<org.eclipse.xtext.resource.IResourceDescription> getAllResourceDescriptionsIterator​(org.eclipse.core.resources.IProject project)
      Gets iterator over all the resource descriptions belonging to the specified project.
      List<org.eclipse.emf.common.util.URI> getAllResourceUris​(org.eclipse.core.resources.IProject project)
      Gets the URIs of all the resources belonging to the specified project.
      List<org.eclipse.core.resources.IProject> getOpenProjects()
      Gets the projects with open stores.
      List<org.eclipse.xtext.resource.IReferenceDescription> getReferenceDescriptions​(org.eclipse.emf.common.util.URI uri)
      Gets reference descriptions belonging to the resource description with the specified URI.
      org.eclipse.xtext.resource.IResourceDescription getResourceDescription​(org.eclipse.emf.common.util.URI uri)
      Gets the resource description with the specified URI.
      Iterable<org.eclipse.xtext.resource.IResourceDescription> getResourceDescriptionsByImportedName​(org.eclipse.xtext.naming.QualifiedName importedName, org.eclipse.core.resources.IProject project)
      Gets resource descriptions with imported names that match a provided imported name
      List<org.eclipse.emf.common.util.URI> getResourceUrisByExportedObjectQualifiedName​(org.eclipse.core.resources.IProject project, org.eclipse.xtext.naming.QualifiedName qualifiedName)
      Gets the URIs of the resources belonging to the specified project that export the object with the specified qualified name.
      Collection<org.eclipse.emf.common.util.URI> getResourceUrisByExportedObjectType​(org.eclipse.core.resources.IProject project, org.eclipse.emf.ecore.EClass type)
      Gets the URIs of the resources belonging to the specified project that export the object with the specified EClass.
      boolean isEmpty​(org.eclipse.core.resources.IProject project)
      Checks if the project's store is empty.
      void removeResourceDescription​(org.eclipse.emf.common.util.URI uri)
      Removes the resource description with the specified URI.
      void saveResourceDescription​(org.eclipse.emf.common.util.URI uri, org.eclipse.xtext.builder.builderState.impl.ResourceDescriptionImpl resourceDescription)
      Saves the specified resource description.
    • Method Detail

      • getAllResourceDescriptionsIterator

        Iterator<org.eclipse.xtext.resource.IResourceDescription> getAllResourceDescriptionsIterator​(org.eclipse.core.resources.IProject project)
        Gets iterator over all the resource descriptions belonging to the specified project.
        Parameters:
        project - The project. May not be null.
        Returns:
        a read-only iterator over all the resource descriptions belonging to the specified project. Never null.
      • getAllResourceUris

        List<org.eclipse.emf.common.util.URI> getAllResourceUris​(org.eclipse.core.resources.IProject project)
        Gets the URIs of all the resources belonging to the specified project.
        Parameters:
        project - The project. May not be null.
        Returns:
        a list of the URIs belonging to the specified project. Never null.
      • getOpenProjects

        List<org.eclipse.core.resources.IProject> getOpenProjects()
        Gets the projects with open stores.
        Returns:
        a list of projects. Never null.
      • getReferenceDescriptions

        List<org.eclipse.xtext.resource.IReferenceDescription> getReferenceDescriptions​(org.eclipse.emf.common.util.URI uri)
        Gets reference descriptions belonging to the resource description with the specified URI. For internal use.
        Parameters:
        uri - The URI. May not be null.
        Returns:
        a list of the refererence descriptions belonging to the resource description with the specified URI. Never null.
      • getResourceDescription

        org.eclipse.xtext.resource.IResourceDescription getResourceDescription​(org.eclipse.emf.common.util.URI uri)
        Gets the resource description with the specified URI.
        Parameters:
        uri - The URI. May not be null.
        Returns:
        the resource description if found, null otherwise.
      • getResourceUrisByExportedObjectQualifiedName

        List<org.eclipse.emf.common.util.URI> getResourceUrisByExportedObjectQualifiedName​(org.eclipse.core.resources.IProject project,
                                                                                           org.eclipse.xtext.naming.QualifiedName qualifiedName)
        Gets the URIs of the resources belonging to the specified project that export the object with the specified qualified name.
        Parameters:
        project - The project. May not be null.
        qualifiedName - The qualified name. May not be null.
        Returns:
        a list of the URIs of the exporting resources. Never null.
      • getResourceUrisByExportedObjectType

        Collection<org.eclipse.emf.common.util.URI> getResourceUrisByExportedObjectType​(org.eclipse.core.resources.IProject project,
                                                                                        org.eclipse.emf.ecore.EClass type)
        Gets the URIs of the resources belonging to the specified project that export the object with the specified EClass.
        Parameters:
        project - The project. May not be null.
        type - The EClass of exporting object. May not be null.
        Returns:
        a list of the URIs of the exporting resources. Never null.
      • getResourceDescriptionsByImportedName

        Iterable<org.eclipse.xtext.resource.IResourceDescription> getResourceDescriptionsByImportedName​(org.eclipse.xtext.naming.QualifiedName importedName,
                                                                                                        org.eclipse.core.resources.IProject project)
        Gets resource descriptions with imported names that match a provided imported name
        Parameters:
        importedName - The name for matching. May not be null
        project - The project. May not be null.
        Returns:
        The iterable with matching resource descriptions. May not be null
      • isEmpty

        boolean isEmpty​(org.eclipse.core.resources.IProject project)
        Checks if the project's store is empty.
        Parameters:
        project - The project. May not be null.
        Returns:
        true if the store is empty, false otherwise.
      • removeResourceDescription

        void removeResourceDescription​(org.eclipse.emf.common.util.URI uri)
        Removes the resource description with the specified URI.
        Parameters:
        uri - The URI of the resource description to remove. May not be null.
      • saveResourceDescription

        void saveResourceDescription​(org.eclipse.emf.common.util.URI uri,
                                     org.eclipse.xtext.builder.builderState.impl.ResourceDescriptionImpl resourceDescription)
        Saves the specified resource description.
        Parameters:
        uri - The URI of the resource description to save. May not be null.
        resourceDescription - The resource description to save. May not be null.