Class BaseMetamodelProviderService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.log4j.Logger logger  
      protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.String doGetQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EObject context)  
      org.eclipse.xtext.scoping.IScope getAllMetamodelObjects​(org.eclipse.xtext.scoping.IScope delegateScope, org.eclipse.emf.ecore.EObject context)
      Returns a set of all available EPackages wrapped into IEObjectDescription for the use of scoping.
      protected EcoreGenmodelRegistry getGenmodelRegistry()  
      protected java.lang.String getModelPluginId​(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)  
      java.lang.String getModelPluginId​(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.resource.ResourceSet set)
      Returns the identifier of the plugin that contains the generated model code.
      protected abstract java.util.Collection<java.lang.String> getProvidedMetamodels()  
      java.lang.String getQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EObject context)  
      boolean isGeneratedCodeAvailable​(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.resource.ResourceSet set)
      Returns true if the generated code is available for the given EPackage, the code uses the given resource set as context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        @Inject
        protected org.apache.log4j.Logger logger
      • qualifiedNameConverter

        @Inject
        protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter
    • Constructor Detail

      • BaseMetamodelProviderService

        public BaseMetamodelProviderService()
    • Method Detail

      • getAllMetamodelObjects

        public org.eclipse.xtext.scoping.IScope getAllMetamodelObjects​(org.eclipse.xtext.scoping.IScope delegateScope,
                                                                       org.eclipse.emf.ecore.EObject context)
        Description copied from interface: IMetamodelProvider
        Returns a set of all available EPackages wrapped into IEObjectDescription for the use of scoping. It uses the IEObjectDescriptions from the delegate scope provider too, this way the EPackages from the XText index will be available too.
        Specified by:
        getAllMetamodelObjects in interface IMetamodelProvider
        Parameters:
        delegateScope - the delegate scope
        context - the context object for the scoping
      • getProvidedMetamodels

        protected abstract java.util.Collection<java.lang.String> getProvidedMetamodels()
      • doGetQualifiedClassName

        protected abstract java.lang.String doGetQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier,
                                                                    org.eclipse.emf.ecore.EObject context)
      • isGeneratedCodeAvailable

        public boolean isGeneratedCodeAvailable​(org.eclipse.emf.ecore.EPackage ePackage,
                                                org.eclipse.emf.ecore.resource.ResourceSet set)
        Description copied from interface: IMetamodelProvider
        Returns true if the generated code is available for the given EPackage, the code uses the given resource set as context.
        Specified by:
        isGeneratedCodeAvailable in interface IMetamodelProvider
        Parameters:
        ePackage - for which the availability of generated code is checked
        set - used for context in the checking
        Returns:
        true, if the generated code for the EPackage is available
      • getModelPluginId

        public java.lang.String getModelPluginId​(org.eclipse.emf.ecore.EPackage ePackage,
                                                 org.eclipse.emf.ecore.resource.ResourceSet set)
        Description copied from interface: IMetamodelProvider
        Returns the identifier of the plugin that contains the generated model code.
        Specified by:
        getModelPluginId in interface IMetamodelProvider
        Parameters:
        ePackage - for which the model plugin ID is requested
        set - used for context in the searching
        Returns:
        the model plugin ID or null if it cannot be found
        Since:
        1.5
      • getModelPluginId

        protected java.lang.String getModelPluginId​(org.eclipse.emf.codegen.ecore.genmodel.GenPackage genPackage)
        Since:
        1.5
      • getQualifiedClassName

        public java.lang.String getQualifiedClassName​(org.eclipse.emf.ecore.EClassifier classifier,
                                                      org.eclipse.emf.ecore.EObject context)
        Specified by:
        getQualifiedClassName in interface IMetamodelProvider