org.eclipse.emf.ecp.internal.ide.util
Class EcoreHelper

java.lang.Object
  extended by org.eclipse.emf.ecp.internal.ide.util.EcoreHelper

public final class EcoreHelper
extends Object

Helper methods for dealing with ecores.

Author:
Alexandra Buzila

Method Summary
static Object[] getDefaultPackageRegistryContents()
           
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerEcore

public static void registerEcore(String ecorePath)
                          throws IOException
Put an ecore's EPackage into the EPackage.Registry. Subsequently, register all referenced ecores.

Parameters:
ecorePath - - path to the ecore
Throws:
IOException - if resource cannot be loaded

unregisterEcore

public static void unregisterEcore(String ecorePath)
Remove the ecore's EPackage from the EPackage.Registry. It also removes the packages of referenced ecores.

Parameters:
ecorePath - - the path of the ecore to be removed.

getDefaultPackageRegistryContents

public static Object[] getDefaultPackageRegistryContents()
Returns:
the EPackages which are registered in the EPackage registry by default (without the ones registered during runtime by the tooling).


Copyright © 2015. All Rights Reserved.