当前位置: 首页>>代码示例>>Java>>正文


Java EObjectValidator类代码示例

本文整理汇总了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;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:SchedulingPolicyImpl.java

示例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);
		}
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:18,代码来源:AbstractTypeProviderTest.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:29,代码来源:PlaneImpl.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:29,代码来源:FontImpl.java

示例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;
}
 
开发者ID:andydunkel,项目名称:RCP-Demo-Application,代码行数:25,代码来源:PersonImpl.java

示例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;
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:25,代码来源:PlaneImpl.java

示例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;
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:25,代码来源:FontImpl.java

示例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;
}
 
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:10,代码来源:EValidatorRegistryImpl.java

示例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);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:7,代码来源:AbstractTypeProviderTest.java


注:本文中的org.eclipse.emf.ecore.util.EObjectValidator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。