Class ReferenceStrategyUtil
- java.lang.Object
-
- org.eclipse.emf.ecp.ui.view.swt.reference.ReferenceStrategyUtil
-
public final class ReferenceStrategyUtil extends java.lang.Object
Common functionality for the creation strategies for the DefaultReferenceService.- Since:
- 1.17
- Author:
- Lucas Koehler
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BazaarContext.Builder
bazaarContextBuilder(org.osgi.service.component.ComponentContext context, org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
Creates aBazaarContext
builder that seeds the context with the properties of theComponentContext
, theowner
as a context value for classEObject
, and thereference
for classEReference
.static BazaarContext
createBazaarContext(org.osgi.service.component.ComponentContext context, org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
Creates a basicBazaarContext
that contains the properties of theComponentContext
.static EClassSelectionStrategy
createDynamicEClassSelectionStrategy(Bazaar<EClassSelectionStrategy> bazaar, org.osgi.service.component.ComponentContext context)
Creates anEClassSelectionStrategy
which uses allEClassSelectionStrategies
registered to the given bazaar.
-
-
-
Method Detail
-
createDynamicEClassSelectionStrategy
public static EClassSelectionStrategy createDynamicEClassSelectionStrategy(Bazaar<EClassSelectionStrategy> bazaar, org.osgi.service.component.ComponentContext context)
Creates anEClassSelectionStrategy
which uses allEClassSelectionStrategies
registered to the given bazaar. WhenEClassSelectionStrategy.collectEClasses(EObject, EReference, Collection)
of the created strategy is called, all applicable strategies are applied one after another.- Parameters:
bazaar
- TheBazaar
providing theEClassSelectionStrategies
context
- The receiver's ComponentContext- Returns:
- The dynamic composite
EClassSelectionStrategy
-
createBazaarContext
public static BazaarContext createBazaarContext(org.osgi.service.component.ComponentContext context, org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
Creates a basicBazaarContext
that contains the properties of theComponentContext
. Adds theowner
as a context value for classEObject
and thereference
for classEReference
.- Parameters:
context
- TheComponentContext
owner
- TheEObject
containing a referencereference
- TheEReference
- Returns:
- The configured
BazaarContext
-
bazaarContextBuilder
public static BazaarContext.Builder bazaarContextBuilder(org.osgi.service.component.ComponentContext context, org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
Creates aBazaarContext
builder that seeds the context with the properties of theComponentContext
, theowner
as a context value for classEObject
, and thereference
for classEReference
.- Parameters:
context
- TheComponentContext
owner
- TheEObject
containing a referencereference
- TheEReference
- Returns:
- The configured
BazaarContext
- Since:
- 1.22
-
-