本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}