Class EclipseResourceInitializer

java.lang.Object
net.ssehub.easy.dslCore.EclipseResourceInitializer
All Implemented Interfaces:
IResourceInitializer

public class EclipseResourceInitializer extends Object implements IResourceInitializer
A resource initializer specific for Eclipse. An Eclipse plugin using the IVML core needs to provide an instance of this class to ModelUtility.setResourceInitializer(IResourceInitializer).
Author:
Holger Eichelberger
  • Constructor Details

    • EclipseResourceInitializer

      public EclipseResourceInitializer()
      Creates the resource initializer based on the plugin of the application.
  • Method Details

    • 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 URI toNetUri(org.eclipse.emf.common.util.URI uri) throws 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:
      URISyntaxException - in case of URI syntax errors
    • resolve

      public URL resolve(URL url) throws 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:
      IOException - in case of resolution problems