public class XmiTemplateProvider extends Object implements TemplateProvider
Constructor and Description |
---|
XmiTemplateProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addLoaderServiceProvider(TemplateLoaderService.Provider provider)
Add a template loader service provider.
|
boolean |
canProvideTemplates(org.eclipse.emf.ecore.EObject owner,
org.eclipse.emf.ecore.EReference reference)
Queries whether the provider can provide templates that may be assigned
to the given
reference of the given owner object. |
Set<Template> |
provideTemplates(org.eclipse.emf.ecore.EObject owner,
org.eclipse.emf.ecore.EReference reference)
Obtains templates wrapping objects that can be assigned to the given
reference of the given owner object. |
public void addLoaderServiceProvider(TemplateLoaderService.Provider provider)
provider
- the provider to addpublic boolean canProvideTemplates(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
TemplateProvider
reference
of the given owner
object.canProvideTemplates
in interface TemplateProvider
owner
- the object owning a reference
to be assigned from a templatereference
- a reference feature of the owner
that is to be assigned from a template.
If the reference
is a containment
then
the owner
would be the container
of the templatepublic Set<Template> provideTemplates(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
TemplateProvider
reference
of the given owner
object. This will only
be called for an owner
and reference
for which the
receiver previously answered true
to an invocation of the
TemplateProvider.canProvideTemplates(EObject, EReference)
query.provideTemplates
in interface TemplateProvider
owner
- the object owning a reference
to be assigned from a templatereference
- a reference feature of the owner
that is to be assigned from a template.
If the reference
is a containment
then
the owner
would be the container
of the templatenull
)Copyright © 2019. All rights reserved.