public class CompoundMetamodelProviderService extends java.lang.Object implements IMetamodelProvider
IMetamodelProviderInstance
implementations, and sorts them based on priority.Constructor and Description |
---|
CompoundMetamodelProviderService(java.util.Set<IMetamodelProviderInstance> providers) |
Modifier and Type | Method and Description |
---|---|
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. |
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) |
org.eclipse.emf.ecore.EPackage |
loadEPackage(java.lang.String uri,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Loads an EMF package from the nsURI or resource URI of the model, and uses the resource set given as the second
parameter.
|
@Inject public CompoundMetamodelProviderService(java.util.Set<IMetamodelProviderInstance> providers)
public org.eclipse.xtext.scoping.IScope getAllMetamodelObjects(org.eclipse.xtext.scoping.IScope delegateScope, org.eclipse.emf.ecore.EObject context)
IMetamodelProvider
IEObjectDescription
for the use of scoping.
It uses the IEObjectDescription
s from the delegate scope provider too, this way the
EPackage
s from the XText index will be available too.getAllMetamodelObjects
in interface IMetamodelProvider
delegateScope
- the delegate scopecontext
- the context object for the scopingpublic org.eclipse.emf.ecore.EPackage loadEPackage(java.lang.String uri, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
IMetamodelProvider
loadEPackage
in interface IMetamodelProvider
public boolean isGeneratedCodeAvailable(org.eclipse.emf.ecore.EPackage ePackage, org.eclipse.emf.ecore.resource.ResourceSet set)
isGeneratedCodeAvailable
in interface IMetamodelProvider
public java.lang.String getQualifiedClassName(org.eclipse.emf.ecore.EClassifier classifier, org.eclipse.emf.ecore.EObject context)
getQualifiedClassName
in interface IMetamodelProvider