public final class ResourceHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.eclipse.emf.ecore.EObject> |
getElementFromResource(String absoluteFileName,
Class<T> type,
int index)
Gets an element from a resource.
|
static <T extends org.eclipse.emf.ecore.EObject> |
getElementFromResource(String absoluteFileName,
Class<T> type,
Map<?,?> options,
int index)
Gets an element from a resource.
|
static <T extends org.eclipse.emf.ecore.EObject> |
putElementIntoNewResource(String absoluteFileName,
T element)
Puts an element into a new resource.
|
static <T extends org.eclipse.emf.ecore.EObject> |
putElementIntoNewResourceWithProject(String absoluteFileName,
T element,
Project project)
Puts an element into a new resource.
|
static <T extends org.eclipse.emf.ecore.EObject> |
putWorkspaceIntoNewResource(String absoluteFileName,
Workspace workSpace)
Puts an element into a new resource.
|
public static <T extends org.eclipse.emf.ecore.EObject> T getElementFromResource(String absoluteFileName, Class<T> type, Map<?,?> options, int index) throws IOException
T - type of elementabsoluteFileName - filepath of resourcetype - .class from typeoptions - resource optionsindex - index of element in resourceIOException - in case of failurepublic static <T extends org.eclipse.emf.ecore.EObject> T getElementFromResource(String absoluteFileName, Class<T> type, int index) throws IOException
T - type of elementabsoluteFileName - filepath of resourcetype - .class from typeindex - index of element in resourceIOException - in case of failurepublic static <T extends org.eclipse.emf.ecore.EObject> void putElementIntoNewResource(String absoluteFileName, T element) throws IOException
T - element typeelement - The element to be putabsoluteFileName - filepath of resourceIOException - in case of failurepublic static <T extends org.eclipse.emf.ecore.EObject> void putElementIntoNewResourceWithProject(String absoluteFileName, T element, Project project) throws IOException
T - element typeelement - The element to be putabsoluteFileName - filepath of resourceproject - the associated projectIOException - in case of failurepublic static <T extends org.eclipse.emf.ecore.EObject> void putWorkspaceIntoNewResource(String absoluteFileName, Workspace workSpace) throws IOException
T - element typeworkSpace - the workspace to be putabsoluteFileName - filepath of resourceIOException - in case of failureCopyright © 2017. All rights reserved.