Interface IResourceInitializer

All Known Implementing Classes:
EclipseResourceInitializer, StandaloneInitializer

public interface IResourceInitializer
Defines a plug-in resource initializer.
Author:
Holger Eichelberger
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.xtext.resource.XtextResourceSet
    createResourceSet(com.google.inject.Injector injector)
    Returns the resource set.
    boolean
    Returns whether this initializer works for Eclipse.
    resolve(URL url)
    Resolves a URL to an implementing file or Jar URL.
    toNetUri(org.eclipse.emf.common.util.URI uri)
    Converts an Eclipse URI to a java.net.URI.
  • Method Details

    • createResourceSet

      org.eclipse.xtext.resource.XtextResourceSet createResourceSet(com.google.inject.Injector injector)
      Returns the resource set.
      Parameters:
      injector - the injector to use for creating the resource set
      Returns:
      the resource set
    • toNetUri

      URI toNetUri(org.eclipse.emf.common.util.URI uri) throws URISyntaxException
      Converts an Eclipse URI to a java.net.URI.
      Parameters:
      uri - the URI to convert
      Returns:
      the converted URI
      Throws:
      URISyntaxException - in case of URI syntax errors
    • forEclipse

      boolean forEclipse()
      Returns whether this initializer works for Eclipse.
      Returns:
      true for Eclipse, false else
    • resolve

      URL resolve(URL url) throws IOException
      Resolves a URL to an implementing file or Jar URL.
      Parameters:
      url - the URL to be resolved
      Returns:
      the resolved URL or url
      Throws:
      IOException - in case of resolution problems