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

项目:time4sys    文件:SchedulingPolicyImpl.java   
/**
 * @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;
}
项目:xtext-extras    文件:AbstractTypeProviderTest.java   
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);
        }
    }
}
项目:xtext-extras    文件:AbstractTypeProviderTest.java   
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);
        }
    }
}
项目:SecureBPMN    文件:PlaneImpl.java   
/**
 * <!-- 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;
}
项目:SecureBPMN    文件:FontImpl.java   
/**
 * <!-- 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;
}
项目:RCP-Demo-Application    文件:PersonImpl.java   
/**
 * <!-- 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;
}
项目:fixflow    文件:PlaneImpl.java   
/**
 * <!-- 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;
}
项目:fixflow    文件:FontImpl.java   
/**
 * <!-- 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;
}
项目:eclipse-avro    文件:EValidatorRegistryImpl.java   
protected Object delegatedGet(Object key)
{
  if (delegateRegistry != null)
  {
    return delegateRegistry.get(key);
  }

  return key == null ? EObjectValidator.INSTANCE : null;
}
项目:clickwatch    文件:EValidatorRegistryImpl.java   
protected Object delegatedGet(Object key)
{
  if (delegateRegistry != null)
  {
    return delegateRegistry.get(key);
  }

  return key == null ? EObjectValidator.INSTANCE : null;
}
项目:xtext-extras    文件:AbstractTypeProviderTest.java   
@Before
public void setUp() throws Exception {
    EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE);
    registry.put(TypesPackage.eINSTANCE, new EObjectValidator());
    diagnostician = new Diagnostician(registry);
}
项目:xtext-extras    文件:AbstractTypeProviderTest.java   
@Before
public void setUp() throws Exception {
    EValidator.Registry registry = new EValidatorRegistryImpl(EValidator.Registry.INSTANCE);
    registry.put(TypesPackage.eINSTANCE, new EObjectValidator());
    diagnostician = new Diagnostician(registry);
}