Class SimpleControlRendererTester
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.SimpleControlRendererTester
-
- All Implemented Interfaces:
ECPRendererTester
- Direct Known Subclasses:
BooleanControlRendererTester
,DateTimeControlRendererTester
,TextControlRendererTester
public abstract class SimpleControlRendererTester extends java.lang.Object implements ECPRendererTester
Tester for Control Renderer.- Author:
- Eugen Neufeld
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.ecp.view.model.common.ECPRendererTester
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description SimpleControlRendererTester()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
checkFeatureETypeAnnotations(org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EAnnotation> eAnnotations)
Allows to check theEAnnotations
of thefeature's type
.protected abstract int
getPriority()
The static priority of the corresponding control.protected abstract java.lang.Class<?>
getSupportedClassType()
The class of the type the corresponding control supports.protected java.lang.Class<? extends org.eclipse.emf.ecore.EObject>
getSupportedEObject()
The eobejct which is supported by the corresponding control.protected org.eclipse.emf.ecore.EStructuralFeature
getSupportedFeature()
The feature the corresponding control supports.int
isApplicable(VElement vElement, ViewModelContext viewModelContext)
Check whether the providedVElement
andViewModelContext
are fitting for the provided renderer.protected abstract boolean
isSingleValue()
Whether the corresponding control is allowed only for single values.
-
-
-
Method Detail
-
isApplicable
public int isApplicable(VElement vElement, ViewModelContext viewModelContext)
Description copied from interface:ECPRendererTester
Check whether the providedVElement
andViewModelContext
are fitting for the provided renderer.- Specified by:
isApplicable
in interfaceECPRendererTester
- Parameters:
vElement
- theVElement
to checkviewModelContext
- theViewModelContext
to check- Returns:
ECPRendererTester.NOT_APPLICABLE
if the corresponding renderer should not be used, a positive integer value otherwise. The renderer with the highest priority will be taken.
-
checkFeatureETypeAnnotations
protected boolean checkFeatureETypeAnnotations(org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EAnnotation> eAnnotations)
Allows to check theEAnnotations
of thefeature's type
.- Parameters:
eAnnotations
- the annotations- Returns:
true
if applicable,false
otherwise- Since:
- 1.5
-
isSingleValue
protected abstract boolean isSingleValue()
Whether the corresponding control is allowed only for single values.- Returns:
- true if only a single value is allows
-
getPriority
protected abstract int getPriority()
The static priority of the corresponding control.- Returns:
- the priority
-
getSupportedEObject
protected java.lang.Class<? extends org.eclipse.emf.ecore.EObject> getSupportedEObject()
The eobejct which is supported by the corresponding control. Default is theEObject
.- Returns:
- the class of the supported eobejct
-
getSupportedFeature
protected org.eclipse.emf.ecore.EStructuralFeature getSupportedFeature()
The feature the corresponding control supports. Default is null to support all features.- Returns:
- the supported feature
-
getSupportedClassType
protected abstract java.lang.Class<?> getSupportedClassType()
The class of the type the corresponding control supports.- Returns:
- the class of the supported type
-
-