Class StandaloneInitializer

  • All Implemented Interfaces:
    IResourceInitializer

    public class StandaloneInitializer
    extends java.lang.Object
    implements IResourceInitializer
    Defines a standalone resource initializer.
    Author:
    Holger Eichelberger
    • Method Summary

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandaloneInitializer

        public StandaloneInitializer()
    • Method Detail

      • forEclipse

        public boolean forEclipse()
        Description copied from interface: IResourceInitializer
        Returns whether this initializer works for Eclipse.
        Specified by:
        forEclipse in interface IResourceInitializer
        Returns:
        true for Eclipse, false else
      • createResourceSet

        public org.eclipse.xtext.resource.XtextResourceSet createResourceSet​(com.google.inject.Injector injector)
        Description copied from interface: IResourceInitializer
        Returns the resource set.
        Specified by:
        createResourceSet in interface IResourceInitializer
        Parameters:
        injector - the injector to use for creating the resource set
        Returns:
        the resource set
      • toNetUri

        public java.net.URI toNetUri​(org.eclipse.emf.common.util.URI uri)
                              throws java.net.URISyntaxException
        Description copied from interface: IResourceInitializer
        Converts an Eclipse URI to a java.net.URI.
        Specified by:
        toNetUri in interface IResourceInitializer
        Parameters:
        uri - the URI to convert
        Returns:
        the converted URI
        Throws:
        java.net.URISyntaxException - in case of URI syntax errors
      • resolve

        public java.net.URL resolve​(java.net.URL url)
                             throws java.io.IOException
        Description copied from interface: IResourceInitializer
        Resolves a URL to an implementing file or Jar URL.
        Specified by:
        resolve in interface IResourceInitializer
        Parameters:
        url - the URL to be resolved
        Returns:
        the resolved URL or url
        Throws:
        java.io.IOException - in case of resolution problems