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


Java DiagnosticChain类代码示例

本文整理汇总了Java中org.eclipse.emf.common.util.DiagnosticChain的典型用法代码示例。如果您正苦于以下问题:Java DiagnosticChain类的具体用法?Java DiagnosticChain怎么用?Java DiagnosticChain使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DiagnosticChain类属于org.eclipse.emf.common.util包,在下文中一共展示了DiagnosticChain类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validateDelay_notOnAnyTask

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * Validates the notOnAnyTask constraint of '<em>Delay</em>'.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateDelay_notOnAnyTask(Delay delay, DiagnosticChain diagnostics, Map<Object, Object> context) {
	// TODO implement the constraint
	// -> specify the condition that violates the constraint
	// -> verify the diagnostic details, including severity, code, and message
	// Ensure that you remove @generated or mark it @generated NOT
	if (false) {
		if (diagnostics != null) {
			diagnostics.add
				(createDiagnostic
					(Diagnostic.ERROR,
					 DIAGNOSTIC_SOURCE,
					 0,
					 "_UI_GenericConstraint_diagnostic",
					 new Object[] { "notOnAnyTask", getObjectLabel(delay, context) },
					 new Object[] { delay },
					 context));
		}
		return false;
	}
	return true;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:GqamValidator.java

示例2: validateStorage

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateStorage(Storage storage, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (!validate_NoCircularContainment(storage, diagnostics, context)) return false;
	boolean result = validate_EveryMultiplicityConforms(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryDataValueConforms(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryProxyResolves(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_UniqueID(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryKeyUnique(storage, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(storage, diagnostics, context);
	if (result || diagnostics != null) result &= occiValidator.validateEntity_IdUnique(storage, diagnostics, context);
	if (result || diagnostics != null) result &= occiValidator.validateEntity_AttributesNameUnique(storage, diagnostics, context);
	if (result || diagnostics != null) result &= occiValidator.validateEntity_KindCompatibleWithOneAppliesOfEachMixin(storage, diagnostics, context);
	if (result || diagnostics != null) result &= occiValidator.validateResource_ResourceKindIsInParent(storage, diagnostics, context);
	return result;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:22,代码来源:InfrastructureValidator.java

示例3: validateTosca_relationships_hostedon

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateTosca_relationships_hostedon(Tosca_relationships_hostedon tosca_relationships_hostedon, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (!validate_NoCircularContainment(tosca_relationships_hostedon, diagnostics, context)) return false;
	boolean result = validate_EveryMultiplicityConforms(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryDataValueConforms(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryProxyResolves(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_UniqueID(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryKeyUnique(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_relationships_root_appliesConstraint(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeDatabaseAndTargetMustBeDBMS(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeWebServerAndTargetMustBeWebApplication(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeContainerApplicationAndTargetMustBeContainerRuntime(tosca_relationships_hostedon, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_relationships_hostedon_SourceMustBeSoftwareComponentAndTargetMustBeCompute(tosca_relationships_hostedon, diagnostics, context);
	return result;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:23,代码来源:ToscaValidator.java

示例4: validatePingCheck

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validatePingCheck ( PingCheck pingCheck, DiagnosticChain diagnostics, Map<Object, Object> context )
{
    if ( !validate_NoCircularContainment ( pingCheck, diagnostics, context ) )
        return false;
    boolean result = validate_EveryMultiplicityConforms ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryDataValueConforms ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryReferenceIsContained ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryBidirectionalReferenceIsPaired ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryProxyResolves ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_UniqueID ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryKeyUnique ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validate_EveryMapEntryUnique ( pingCheck, diagnostics, context );
    if ( result || diagnostics != null )
        result &= validateExecJob_hasExecDriver ( pingCheck, diagnostics, context );
    return result;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ExecComponentsValidator.java

示例5: preValidate

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
private boolean preValidate(EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (eObject.eContainer() == null && !(eObject instanceof ValidationMarker)) {
		PreValidation pre = ValidationFactory.eINSTANCE.createPreValidation();
		pre.setDelegateResource(eObject.eResource());
		boolean result = super.validate(pre, diagnostics, context);
		if (!(result || diagnostics != null)) {
			return result;
		}
	}
	return true;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:12,代码来源:PrePostDiagnostician.java

示例6: validateAgreement_term

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateAgreement_term(Agreement_term agreement_term, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (!validate_NoCircularContainment(agreement_term, diagnostics, context)) return false;
	boolean result = validate_EveryMultiplicityConforms(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryDataValueConforms(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryProxyResolves(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_UniqueID(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryKeyUnique(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(agreement_term, diagnostics, context);
	if (result || diagnostics != null) result &= validateAgreement_term_appliesConstraint(agreement_term, diagnostics, context);
	return result;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:19,代码来源:SlaValidator.java

示例7: validateSmall

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateSmall(Small small, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (!validate_NoCircularContainment(small, diagnostics, context)) return false;
	boolean result = validate_EveryMultiplicityConforms(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryDataValueConforms(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryProxyResolves(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_UniqueID(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryKeyUnique(small, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(small, diagnostics, context);
	if (result || diagnostics != null) result &= validateSmall_appliesConstraint(small, diagnostics, context);
	return result;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:19,代码来源:CrtpValidator.java

示例8: eInvoke

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
	switch (operationID) {
		case OCCIPackage.ACTION___CONTAINED_ACTION__DIAGNOSTICCHAIN_MAP:
			return containedAction((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
		case OCCIPackage.ACTION___CORRECT_SCHEME__DIAGNOSTICCHAIN_MAP:
			return CorrectScheme((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
	}
	return super.eInvoke(operationID, arguments);
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:17,代码来源:ActionImpl.java

示例9: appliesConstraint

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean appliesConstraint(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
	/**
	 *
	 * inv appliesConstraint:
	 *   let
	 *     severity : Integer[1] = 'Tosca_nodes_objectstorage::appliesConstraint'.getSeverity()
	 *   in
	 *     if severity <= 0
	 *     then true
	 *     else
	 *       let
	 *         result : occi::Boolean[1] = self.entity.oclIsKindOf(infrastructure::Storage)
	 *       in
	 *         'Tosca_nodes_objectstorage::appliesConstraint'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)
	 *     endif
	 */
	final /*@NonInvalid*/ Executor executor = PivotUtilInternal.getExecutor(this);
	final /*@NonInvalid*/ IdResolver idResolver = executor.getIdResolver();
	final /*@NonInvalid*/ IntegerValue severity_0 = CGStringGetSeverityOperation.INSTANCE.evaluate(executor, ToscaTables.STR_Tosca_nodes_objectstorage_c_c_appliesConstraint);
	final /*@NonInvalid*/ boolean le = OclComparableLessThanEqualOperation.INSTANCE.evaluate(executor, severity_0, ToscaTables.INT_0).booleanValue();
	/*@NonInvalid*/ boolean symbol_0;
	if (le) {
		symbol_0 = ValueUtil.TRUE_VALUE;
	}
	else {
		final /*@NonInvalid*/ org.eclipse.ocl.pivot.Class TYP_infrastructure_c_c_Storage = idResolver.getClass(ToscaTables.CLSSid_Storage, null);
		final /*@NonInvalid*/ Entity entity = this.getEntity();
		final /*@NonInvalid*/ boolean result = OclAnyOclIsKindOfOperation.INSTANCE.evaluate(executor, entity, TYP_infrastructure_c_c_Storage).booleanValue();
		final /*@NonInvalid*/ boolean logDiagnostic = CGStringLogDiagnosticOperation.INSTANCE.evaluate(executor, TypeId.BOOLEAN, ToscaTables.STR_Tosca_nodes_objectstorage_c_c_appliesConstraint, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, ToscaTables.INT_0).booleanValue();
		symbol_0 = logDiagnostic;
	}
	return Boolean.TRUE == symbol_0;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:39,代码来源:Tosca_nodes_objectstorageImpl.java

示例10: validateTosca_nodes_loadbalancer

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean validateTosca_nodes_loadbalancer(Tosca_nodes_loadbalancer tosca_nodes_loadbalancer, DiagnosticChain diagnostics, Map<Object, Object> context) {
	if (!validate_NoCircularContainment(tosca_nodes_loadbalancer, diagnostics, context)) return false;
	boolean result = validate_EveryMultiplicityConforms(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryDataValueConforms(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryProxyResolves(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_UniqueID(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryKeyUnique(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(tosca_nodes_loadbalancer, diagnostics, context);
	if (result || diagnostics != null) result &= validateTosca_nodes_root_appliesConstraint(tosca_nodes_loadbalancer, diagnostics, context);
	return result;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:19,代码来源:ToscaValidator.java

示例11: eInvoke

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
	switch (operationID) {
		case InfrastructurePackage.IPNETWORKINTERFACE___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
			return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
		case InfrastructurePackage.IPNETWORKINTERFACE___IP_ADRESSES_MUST_BE_UNIQUE__DIAGNOSTICCHAIN_MAP:
			return IPAdressesMustBeUnique((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
	}
	return super.eInvoke(operationID, arguments);
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:17,代码来源:IpnetworkinterfaceImpl.java

示例12: eInvoke

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
	switch (operationID) {
		case PlatformPackage.DATABASELINK___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP:
			return appliesConstraint((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
	}
	return super.eInvoke(operationID, arguments);
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:15,代码来源:DatabaselinkImpl.java

示例13: eInvoke

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
	switch (operationID) {
		case OCCIPackage.ATTRIBUTE___DEFAULT_VALUE_MUST_BE_INSTANCE_OF_TYPE__DIAGNOSTICCHAIN_MAP:
			return DefaultValueMustBeInstanceOfType((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
	}
	return super.eInvoke(operationID, arguments);
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:15,代码来源:AttributeImpl.java

示例14: SourceMustBeComputeAndTargetMustBeBlockStorage

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean SourceMustBeComputeAndTargetMustBeBlockStorage(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
	/**
	 * inv SourceMustBeComputeAndTargetMustBeBlockStorage: true
	 */
	return ValueUtil.TRUE_VALUE;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:12,代码来源:Tosca_relationships_attachestoImpl.java

示例15: SourceMustBeSoftwareComponent

import org.eclipse.emf.common.util.DiagnosticChain; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean SourceMustBeSoftwareComponent(final DiagnosticChain diagnostics, final Map<Object, Object> context) {
	/**
	 * inv SourceMustBeSoftwareComponent: true
	 */
	return ValueUtil.TRUE_VALUE;
}
 
开发者ID:occiware,项目名称:TOSCA-Studio,代码行数:12,代码来源:Tosca_nodes_computeImpl.java


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