Interface IActiveXtextResourceAccessor

All Known Implementing Classes:
ActiveXtextResourceAccessor

public interface IActiveXtextResourceAccessor
Serves as a single point of access/read operation execution for all active Xtext resources. Typically is used to validate resources within opened Xtext editors. The publication of information about available resources is up to the client code. It doesn't provide access to any Xtext resource being active at the moment, only those the client code is published the information of
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deregisterActiveResourceProvider(org.eclipse.emf.common.util.URI resourceUri)
    Removes the publication for the given resource
    boolean
    execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Void,org.eclipse.xtext.resource.XtextResource> operation, org.eclipse.emf.common.util.URI resourceUri)
    Executes the given read operation on the given resource, if the resource is registered within this service
    void
    registerActiveResourceProvider(Supplier<org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource>> readAccessSupplier, Runnable postExecutionHandler, org.eclipse.emf.common.util.URI resourceUri)
    Registers active resource supplier with aditional post-execution Runnable which is activated after the execution of the operation It's not the part of the public EDT API
  • Method Details

    • deregisterActiveResourceProvider

      void deregisterActiveResourceProvider(org.eclipse.emf.common.util.URI resourceUri)
      Removes the publication for the given resource
      Parameters:
      resourceUri - The resource URI to remove publication for. May not be null
    • execute

      boolean execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Void,org.eclipse.xtext.resource.XtextResource> operation, org.eclipse.emf.common.util.URI resourceUri)
      Executes the given read operation on the given resource, if the resource is registered within this service
      Parameters:
      operation - Read operation to execute. May not be null
      resourceUri - The target resource's URI. May not be null
      Returns:
      True in case if the resource is registered and the operation was executed (successfully or not)
    • registerActiveResourceProvider

      void registerActiveResourceProvider(Supplier<org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource>> readAccessSupplier, Runnable postExecutionHandler, org.eclipse.emf.common.util.URI resourceUri)
      Registers active resource supplier with aditional post-execution Runnable which is activated after the execution of the operation It's not the part of the public EDT API
      Parameters:
      readAccessSupplier - The supplier of the read-accessor of the resource. May not be null
      postExecutionHandler - The post-execution runnable that is called on successful execution of the client-supplied operation. May be null
      resourceUri - The target resource's URI. May not be null