public class DefaultCreateNewModelElementStrategyProvider extends ReferenceServiceCustomizationVendor<CreateNewModelElementStrategy> implements CreateNewModelElementStrategy.Provider
EClassSelectionStrategy
to filter the EClass to offer.Constructor and Description |
---|
DefaultCreateNewModelElementStrategyProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addEClassSelectionStrategyProvider(EClassSelectionStrategy.Provider provider)
Add an
EClass selection strategy provider. |
CreateNewModelElementStrategy |
createCreateNewModelElementStrategy()
Creates the
CreateNewModelElementStrategy . |
Map<org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject> |
getNewObjectsByDescriptors(org.eclipse.emf.ecore.EObject owner,
org.eclipse.emf.ecore.EReference reference)
Obtain a mapping of new objects provided by an
owner 's edit provider, by class. |
protected boolean |
handles(org.eclipse.emf.ecore.EObject owner,
org.eclipse.emf.ecore.EReference reference)
Queries whether I should bid on the given
owner and reference . |
void |
removeEClassSelectionStrategyProvider(EClassSelectionStrategy.Provider provider)
Remove an
EClass selection strategy provider. |
bid
public DefaultCreateNewModelElementStrategyProvider()
public void addEClassSelectionStrategyProvider(EClassSelectionStrategy.Provider provider)
EClass
selection strategy provider.provider
- the provider to addpublic void removeEClassSelectionStrategyProvider(EClassSelectionStrategy.Provider provider)
EClass
selection strategy provider.provider
- the provider to removeprotected boolean handles(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
ReferenceServiceCustomizationVendor
owner
and reference
.
The default implementation just returns true
; subclasses should override.handles
in class ReferenceServiceCustomizationVendor<CreateNewModelElementStrategy>
owner
- the owner of a reference being edited by the Reference Servicereference
- the reference being editedpublic CreateNewModelElementStrategy createCreateNewModelElementStrategy()
CreateNewModelElementStrategy
.CreateNewModelElementStrategy
public Map<org.eclipse.emf.ecore.EClass,org.eclipse.emf.ecore.EObject> getNewObjectsByDescriptors(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
owner
's edit provider, by class.owner
- the owner of a reference in which to create an objectreference
- the reference in which to create an objectCopyright © 2019. All rights reserved.