public class EMFFormsCustomDMRExpander extends Object implements EMFFormsDMRExpander
EMFFormsDMRExpander
.NOT_APPLICABLE
Constructor and Description |
---|
EMFFormsCustomDMRExpander() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets activated.
|
protected void |
deactivate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets deactivated.
|
double |
isApplicable(VDomainModelReference domainModelReference)
Returns how suitable this
EMFFormsDMRExpander is for the given VDomainModelReference . |
void |
prepareDomainObject(VDomainModelReference domainModelReference,
org.eclipse.emf.ecore.EObject domainObject)
Prepares a
domain object for the given VDomainModelReference . |
protected void activate(org.osgi.framework.BundleContext bundleContext)
bundleContext
- The BundleContext
protected void deactivate(org.osgi.framework.BundleContext bundleContext)
bundleContext
- The BundleContext
public void prepareDomainObject(VDomainModelReference domainModelReference, org.eclipse.emf.ecore.EObject domainObject) throws EMFFormsExpandingFailedException
domain object
for the given VDomainModelReference
. Thereby, the path defined
by the VDomainModelReference
is analyzed and missing objects in the domain model are created. Thereby,
the VDomainModelReference
is not changed.
Example:
DMR: A -> B -> x
domain model is instance of A but does not reference an instance of B
=> An instance of B is created and referenced by the domain model.
prepareDomainObject
in interface EMFFormsDMRExpander
domainModelReference
- The VDomainModelReference
for which the domain object
should
be prepared.domainObject
- The domain object
to prepare.EMFFormsExpandingFailedException
- if the domain expansion fails.EMFFormsDMRExpander.prepareDomainObject(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference,
org.eclipse.emf.ecore.EObject)
public double isApplicable(VDomainModelReference domainModelReference)
EMFFormsDMRExpander
is for the given VDomainModelReference
.isApplicable
in interface EMFFormsDMRExpander
domainModelReference
- The VDomainModelReference
for which a domain object
should
be prepared.EMFFormsDMRExpander
is to expand a domain
object
for the given VDomainModelReference
. Returns NOT_APPLICABLE if it's not applicable.EMFFormsDMRExpander.isApplicable(org.eclipse.emf.ecp.view.spi.model.VDomainModelReference)
Copyright © 2019. All rights reserved.