Class EMFFormsRevealServiceImpl
- java.lang.Object
-
- org.eclipse.emfforms.internal.core.services.reveal.EMFFormsRevealServiceImpl
-
- All Implemented Interfaces:
EMFFormsRevealService
public class EMFFormsRevealServiceImpl extends java.lang.Object implements EMFFormsRevealService
Implementation of the EMF Forms reveal service.- Since:
- 1.22
-
-
Constructor Summary
Constructors Constructor Description EMFFormsRevealServiceImpl(EMFFormsViewContext viewContext)
Initializes me with my view context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRevealProvider(EMFFormsRevealProvider provider)
Register a reveal provider.protected EMFFormsViewContext
getViewContext(VElement element)
Get the nearest context for a view modelelement
.void
removeRevealProvider(EMFFormsRevealProvider provider)
Unregister a reveal provider.boolean
reveal(org.eclipse.emf.ecore.EObject object)
Attempt to reveal anobject
in the most appropriate (by best effort) control in the current editor context.boolean
reveal(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
Attempt to reveal afeature
of anobject
in the most appropriate (by best effort) control in the current editor context.RevealStep
reveal(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, VElement scope)
Attempt to reveal afeature
of anobject
in the most appropriate (by best effort) control within the givenscope
.RevealStep
reveal(org.eclipse.emf.ecore.EObject object, VElement scope)
Attempt to reveal anobject
in the most appropriate (by best effort) control within the givenscope
.
-
-
-
Constructor Detail
-
EMFFormsRevealServiceImpl
public EMFFormsRevealServiceImpl(EMFFormsViewContext viewContext)
Initializes me with my view context.- Parameters:
viewContext
- my view context
-
-
Method Detail
-
reveal
public boolean reveal(org.eclipse.emf.ecore.EObject object)
Description copied from interface:EMFFormsRevealService
Attempt to reveal anobject
in the most appropriate (by best effort) control in the current editor context. Effectively equivalent toEMFFormsRevealService.reveal(EObject, VElement)
in the topmost scope (the rootVView
) of the context.- Specified by:
reveal
in interfaceEMFFormsRevealService
- Parameters:
object
- an object to reveal- Returns:
true
if theobject
was revealed;false
, otherwise
-
reveal
public boolean reveal(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
Description copied from interface:EMFFormsRevealService
Attempt to reveal afeature
of anobject
in the most appropriate (by best effort) control in the current editor context. Effectively equivalent toEMFFormsRevealService.reveal(EObject, EStructuralFeature, VElement)
in the topmost scope (the rootVView
) of the context.- Specified by:
reveal
in interfaceEMFFormsRevealService
- Parameters:
object
- an object to revealfeature
- a specific feature (implying a detail control) to reveal- Returns:
true
if theobject
was revealed;false
, otherwise
-
reveal
public RevealStep reveal(org.eclipse.emf.ecore.EObject object, VElement scope)
Description copied from interface:EMFFormsRevealService
Attempt to reveal anobject
in the most appropriate (by best effort) control within the givenscope
. Most applications will not need to interact with reveal steps directly but only through theEMFFormsRevealService.reveal(EObject)
API; reveal providers may need this API to delegate a drill down.- Specified by:
reveal
in interfaceEMFFormsRevealService
- Parameters:
object
- an object to revealscope
- a control within which to attempt to reveal theobject
- Returns:
- a step-wise chain of operations to progressively reveal the
object
in the givenscope
, or a failed step if none
-
reveal
public RevealStep reveal(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, VElement scope)
Description copied from interface:EMFFormsRevealService
Attempt to reveal afeature
of anobject
in the most appropriate (by best effort) control within the givenscope
. Most applications will not need to interact with reveal steps directly but only through theEMFFormsRevealService.reveal(EObject, EStructuralFeature)
API; reveal providers may need this API to delegate a drill down.- Specified by:
reveal
in interfaceEMFFormsRevealService
- Parameters:
object
- an object to revealfeature
- a specific feature (implying a detail control) to revealscope
- a control within which to attempt to reveal theobject
- Returns:
- a step-wise chain of operations to progressively reveal the
object
in the givenscope
, or a failed step if none
-
getViewContext
protected EMFFormsViewContext getViewContext(VElement element)
Get the nearest context for a view modelelement
. This is either some active detail context or the root context that owns me.- Parameters:
element
- a view-model element- Returns:
- its most specific applicable context
-
addRevealProvider
public void addRevealProvider(EMFFormsRevealProvider provider)
Description copied from interface:EMFFormsRevealService
Register a reveal provider.- Specified by:
addRevealProvider
in interfaceEMFFormsRevealService
- Parameters:
provider
- the reveal provider to register
-
removeRevealProvider
public void removeRevealProvider(EMFFormsRevealProvider provider)
Description copied from interface:EMFFormsRevealService
Unregister a reveal provider.- Specified by:
removeRevealProvider
in interfaceEMFFormsRevealService
- Parameters:
provider
- the reveal provider to unregister
-
-