Class McoreTypeSetExtension

  • public class McoreTypeSetExtension
    extends Object
    Extension mechanism for typesets.

    This class allows to register ITypeSetTypesProvider instance which handles extra type sets such as 'AnyRef'. Only one instance of ITypeSetTypesProvider can be registered

    This class is not intended to be used out of Mcore.xcore scope

    See Also:
    TypeSet, Type
    This class is not intended to be extended by clients
    • Constructor Detail

      • McoreTypeSetExtension

        public McoreTypeSetExtension()
    • Method Detail

      • getTypes

        public static <T extends org.eclipse.emf.ecore.EObject> org.eclipse.emf.common.util.EList<T> getTypes​(org.eclipse.emf.ecore.EObject context,
                                                                                                              org.eclipse.emf.ecore.EObject typeSet)
        Returns types from typeset in given context
        context - the context object (not null)
        typeSet - the typeset to get types from (not null)
        types from typeset in given context (never null)
        IllegalArgumentException - if typeSet is not instance of TypeSet
      • setTypeSetProvider

        public static void setTypeSetProvider​(ITypeSetTypesProvider typeSetTypesProvider)
                                       throws IllegalStateException
        Registers typeset types provider
        typeSetTypesProvider - typeSetTypesProvider instance (not null)
        IllegalStateException - if typeset types provider was already registered