public final class EcoreHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object[] |
getDefaultPackageRegistryContents() |
static Set<String> |
getOtherRelatedWorkspacePaths(String ecorePath)
Returns the path for all ecores for which
|
protected static void |
loadResource(String ecorePath,
org.eclipse.emf.ecore.resource.Resource resource)
Wraps loading a
Resource in order to catch thrown IOExceptions and rethrow them with more informative
messages. |
static void |
registerEcore(String ecorePath)
Put an ecore's
EPackage into the EPackage.Registry. |
static void |
unregisterEcore(String ecorePath)
Remove the ecore's
EPackage from the EPackage.Registry. |
public static void registerEcore(String ecorePath) throws IOException
EPackage into the EPackage.Registry. Subsequently, register
all referenced ecores.ecorePath - - path to the ecoreIOException - if resource cannot be loadedprotected static void loadResource(String ecorePath, org.eclipse.emf.ecore.resource.Resource resource) throws IOException
Resource in order to catch thrown IOExceptions and rethrow them with more informative
messages.ecorePath - The path of the resource. Needed for informative messagesresource - The Resource to loadIOException - if the loading of the Resource failspublic static Set<String> getOtherRelatedWorkspacePaths(String ecorePath)
Returns the path for all ecores for which
a) the given ecore is dependent on.
b) the uri is a platform resource URI, meaning the ecore is available in the workspace.
ecorePath - the pathpublic static void unregisterEcore(String ecorePath)
EPackage from the EPackage.Registry.
It also removes the packages of referenced ecores.ecorePath - - the path of the ecore to be removed.public static Object[] getDefaultPackageRegistryContents()
Copyright © 2020. All rights reserved.