Package net.ssehub.easy.dslCore
Class EclipseResourceInitializer
- java.lang.Object
-
- net.ssehub.easy.dslCore.EclipseResourceInitializer
-
- All Implemented Interfaces:
IResourceInitializer
public class EclipseResourceInitializer extends java.lang.Object implements IResourceInitializer
A resource initializer specific for Eclipse. An Eclipse plugin using the IVML core needs to provide an instance of this class toModelUtility.setResourceInitializer(IResourceInitializer).- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description EclipseResourceInitializer()Creates the resource initializer based on the plugin of the application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.xtext.resource.XtextResourceSetcreateResourceSet(com.google.inject.Injector injector)Returns the resource set.booleanforEclipse()Returns whether this initializer works for Eclipse.java.net.URLresolve(java.net.URL url)Resolves a URL to an implementing file or Jar URL.java.net.URItoNetUri(org.eclipse.emf.common.util.URI uri)Converts an Eclipse URI to a java.net.URI.
-
-
-
Method Detail
-
forEclipse
public boolean forEclipse()
Description copied from interface:IResourceInitializerReturns whether this initializer works for Eclipse.- Specified by:
forEclipsein interfaceIResourceInitializer- Returns:
truefor Eclipse,falseelse
-
createResourceSet
public org.eclipse.xtext.resource.XtextResourceSet createResourceSet(com.google.inject.Injector injector)
Description copied from interface:IResourceInitializerReturns the resource set.- Specified by:
createResourceSetin interfaceIResourceInitializer- 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.URISyntaxExceptionDescription copied from interface:IResourceInitializerConverts an Eclipse URI to a java.net.URI.- Specified by:
toNetUriin interfaceIResourceInitializer- 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.IOExceptionDescription copied from interface:IResourceInitializerResolves a URL to an implementing file or Jar URL.- Specified by:
resolvein interfaceIResourceInitializer- Parameters:
url- the URL to be resolved- Returns:
- the resolved URL or
url - Throws:
java.io.IOException- in case of resolution problems
-
-