java类org.eclipse.emf.ecore.util.EObjectValidator的实例源码

SchedulingPolicyImpl.java 文件源码 项目:time4sys 阅读 18 收藏 0 点赞 0 评论 0
/**
 * @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;
}
AbstractTypeProviderTest.java 文件源码 项目:xtext-extras 阅读 24 收藏 0 点赞 0 评论 0
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);
        }
    }
}
AbstractTypeProviderTest.java 文件源码 项目:xtext-extras 阅读 21 收藏 0 点赞 0 评论 0
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);
        }
    }
}
PlaneImpl.java 文件源码 项目:SecureBPMN 阅读 20 收藏 0 点赞 0 评论 0
/**
 * <!-- 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;
}
FontImpl.java 文件源码 项目:SecureBPMN 阅读 19 收藏 0 点赞 0 评论 0
/**
 * <!-- 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;
}
PersonImpl.java 文件源码 项目:RCP-Demo-Application 阅读 17 收藏 0 点赞 0 评论 0
/**
 * <!-- 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;
}
PlaneImpl.java 文件源码 项目:fixflow 阅读 19 收藏 0 点赞 0 评论 0
/**
 * <!-- 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;
}
FontImpl.java 文件源码 项目:fixflow 阅读 34 收藏 0 点赞 0 评论 0
/**
 * <!-- 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;
}
EValidatorRegistryImpl.java 文件源码 项目:eclipse-avro 阅读 28 收藏 0 点赞 0 评论 0
protected Object delegatedGet(Object key)
{
  if (delegateRegistry != null)
  {
    return delegateRegistry.get(key);
  }

  return key == null ? EObjectValidator.INSTANCE : null;
}
EValidatorRegistryImpl.java 文件源码 项目:clickwatch 阅读 19 收藏 0 点赞 0 评论 0
protected Object delegatedGet(Object key)
{
  if (delegateRegistry != null)
  {
    return delegateRegistry.get(key);
  }

  return key == null ? EObjectValidator.INSTANCE : null;
}
AbstractTypeProviderTest.java 文件源码 项目:xtext-extras 阅读 20 收藏 0 点赞 0 评论 0
@Before
public void setUp() throws Exception {
    EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE);
    registry.put(TypesPackage.eINSTANCE, new EObjectValidator());
    diagnostician = new Diagnostician(registry);
}
AbstractTypeProviderTest.java 文件源码 项目:xtext-extras 阅读 22 收藏 0 点赞 0 评论 0
@Before
public void setUp() throws Exception {
    EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE);
    registry.put(TypesPackage.eINSTANCE, new EObjectValidator());
    diagnostician = new Diagnostician(registry);
}


问题


面经


文章

微信
公众号

扫码关注公众号