本文整理汇总了Java中org.eclipse.emf.ecore.util.EObjectValidator类的典型用法代码示例。如果您正苦于以下问题:Java EObjectValidator类的具体用法?Java EObjectValidator怎么用?Java EObjectValidator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EObjectValidator类属于org.eclipse.emf.ecore.util包,在下文中一共展示了EObjectValidator类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasValidPolicy
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* @generated NOT
*/
public boolean hasValidPolicy(DiagnosticChain diagnostics, Map<?, ?> context) {
if (policy != null && policy == SchedPolicyKind.OTHER
&& (otherSchedPolicy == null || otherSchedPolicy.isEmpty())) {
if (diagnostics != null) {
diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR, GrmValidator.DIAGNOSTIC_SOURCE,
GrmValidator.SCHEDULING_POLICY__HAS_VALID_POLICY,
GrmValidator.INSTANCE.getResourceLocator().getString("_UI_SchedPolicyInvariant_diagnostic",
new Object[] { "hasValidPolicy",
EObjectValidator.getObjectLabel(this, (Map<Object, Object>) context) }),
new Object[] { this }));
}
return false;
}
return true;
}
示例2: diagnose
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
protected void diagnose(Diagnostic diagnostic, URI[] expectedUnresolvedProxies) {
if (diagnostic.getChildren().isEmpty()) {
if (diagnostic.getSeverity() != Diagnostic.OK) {
if (diagnostic.getCode() == EObjectValidator.EOBJECT__EVERY_PROXY_RESOLVES) {
EObject proxy = (EObject) diagnostic.getData().get(2); // magic number ...
if (org.eclipse.xtext.util.Arrays.contains(expectedUnresolvedProxies, EcoreUtil.getURI(proxy))) {
return;
}
}
assertEquals(String.valueOf(diagnostic), diagnostic.getSeverity() == Diagnostic.OK);
}
} else {
for (Diagnostic child : diagnostic.getChildren()) {
diagnose(child, expectedUnresolvedProxies);
}
}
}
示例3: plane_element_type
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean plane_element_type(DiagnosticChain diagnostics,
Map<Object, Object> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (diagnostics != null) {
diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,
DiValidator.DIAGNOSTIC_SOURCE,
DiValidator.PLANE__PLANE_ELEMENT_TYPE,
EcorePlugin.INSTANCE.getString(
"_UI_GenericInvariant_diagnostic",
new Object[] {
"plane_element_type",
EObjectValidator.getObjectLabel(this,
context) }),
new Object[] { this }));
}
return false;
}
return true;
}
示例4: non_negative_size
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean non_negative_size(DiagnosticChain diagnostics,
Map<Object, Object> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (diagnostics != null) {
diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,
DcValidator.DIAGNOSTIC_SOURCE,
DcValidator.FONT__NON_NEGATIVE_SIZE,
EcorePlugin.INSTANCE.getString(
"_UI_GenericInvariant_diagnostic",
new Object[] {
"non_negative_size",
EObjectValidator.getObjectLabel(this,
context) }),
new Object[] { this }));
}
return false;
}
return true;
}
示例5: hasName
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean hasName(DiagnosticChain chain, Map<?, ?> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (chain != null) {
chain.add
(new BasicDiagnostic
(Diagnostic.ERROR,
DemomodelValidator.DIAGNOSTIC_SOURCE,
DemomodelValidator.PERSON__HAS_NAME,
EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "hasName", EObjectValidator.getObjectLabel(this, (Map<Object, Object>) context) }),
new Object [] { this }));
}
return false;
}
return true;
}
示例6: plane_element_type
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean plane_element_type(DiagnosticChain diagnostics, Map<Object, Object> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (diagnostics != null) {
diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,
DiValidator.DIAGNOSTIC_SOURCE, DiValidator.PLANE__PLANE_ELEMENT_TYPE,
EcorePlugin.INSTANCE.getString(
"_UI_GenericInvariant_diagnostic",
new Object[] { "plane_element_type",
EObjectValidator.getObjectLabel(this, context) }),
new Object[] { this }));
}
return false;
}
return true;
}
示例7: non_negative_size
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean non_negative_size(DiagnosticChain diagnostics, Map<Object, Object> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (diagnostics != null) {
diagnostics.add(new BasicDiagnostic(Diagnostic.ERROR,
DcValidator.DIAGNOSTIC_SOURCE, DcValidator.FONT__NON_NEGATIVE_SIZE,
EcorePlugin.INSTANCE.getString(
"_UI_GenericInvariant_diagnostic",
new Object[] { "non_negative_size",
EObjectValidator.getObjectLabel(this, context) }),
new Object[] { this }));
}
return false;
}
return true;
}
示例8: delegatedGet
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
protected Object delegatedGet(Object key)
{
if (delegateRegistry != null)
{
return delegateRegistry.get(key);
}
return key == null ? EObjectValidator.INSTANCE : null;
}
示例9: setUp
import org.eclipse.emf.ecore.util.EObjectValidator; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE);
registry.put(TypesPackage.eINSTANCE, new EObjectValidator());
diagnostician = new Diagnostician(registry);
}