Class ECPUtil


  • public final class ECPUtil
    extends java.lang.Object
    This class provides common functionality.
    Author:
    Eike Stepper, Eugen Neufeld
    • Method Detail

      • isDisposed

        public static boolean isDisposed​(java.lang.Object object)
        Checks whether an object is an ECPDisposable and disposed.
        Parameters:
        object - the object to check
        Returns:
        true if the object is an instance of ECPDisposable and ECPDisposable.isDisposed() returns true, false otherwise
      • isClosed

        public static boolean isClosed​(java.lang.Object object)
        Checks whether an object is an ECPProject and closed.
        Parameters:
        object - the object to check
        Returns:
        true if the object is an instance of ECPProject and not open, false otherwise
      • getResolvedElement

        public static ECPElement getResolvedElement​(ECPElement elementOrDescriptor)
        Checks whether the ECPElement is an ElementDescriptor and resolves it when necessary.
        Parameters:
        elementOrDescriptor - the ECPElement to check
        Returns:
        the resolved Object or the original object if it is not an descriptor
      • getSubClasses

        @Deprecated
        public static java.util.Collection<org.eclipse.emf.ecore.EClass> getSubClasses​(org.eclipse.emf.ecore.EClass superClass)
        Deprecated.
        Use EMFUtils.getSubClasses instead
        This method looks through all known EPackages to find all subclasses for the provided super class.
        Parameters:
        superClass - - the class for which to get the subclasses
        Returns:
        a Collection of EClasses
      • getAllRegisteredEPackages

        public static java.util.Set<org.eclipse.emf.ecore.EPackage> getAllRegisteredEPackages()
        Returns the set of all known EPackages.
        Returns:
        the Set of all known Epackages