本文整理汇总了Java中org.eclipse.emf.common.util.DiagnosticChain.add方法的典型用法代码示例。如果您正苦于以下问题:Java DiagnosticChain.add方法的具体用法?Java DiagnosticChain.add怎么用?Java DiagnosticChain.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.common.util.DiagnosticChain
的用法示例。
在下文中一共展示了DiagnosticChain.add方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasValidPolicy
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的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;
}
示例2: 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;
}
示例3: validateSurvey_timeLimitNotNegativeS
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the timeLimitNotNegativeS constraint of '<em>Survey</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateSurvey_timeLimitNotNegativeS(Survey survey, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "timeLimitNotNegativeS", getObjectLabel(survey, context) }),
new Object[] { survey }));
}
return false;
}
return true;
}
示例4: validateQuestion_rangeInvalid
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the rangeInvalid constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_rangeInvalid(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "rangeInvalid", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例5: validateQuestion_matrixHasRowsAndCols
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the matrixHasRowsAndCols constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_matrixHasRowsAndCols(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "matrixHasRowsAndCols", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例6: validateQuestion_multipleTextHasItems
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the multipleTextHasItems constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_multipleTextHasItems(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "multipleTextHasItems", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例7: validateQuestion_choicesUseless
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the choicesUseless constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_choicesUseless(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "choicesUseless", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例8: validateQuestion_choicesNeeded
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the choicesNeeded constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_choicesNeeded(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "choicesNeeded", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例9: validateQuestion_inputType
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
/**
* Validates the inputType constraint of '<em>Question</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateQuestion_inputType(Question question, DiagnosticChain diagnostics, Map 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
(new BasicDiagnostic
(Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0,
EcorePlugin.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "inputType", getObjectLabel(question, context) }),
new Object[] { question }));
}
return false;
}
return true;
}
示例10: apply
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
public boolean apply ( final DiagnosticChain diagnostics )
{
for ( final Diagnostic d : this.result )
{
diagnostics.add ( d );
}
return this.result.isEmpty ();
}
示例11: validate
import org.eclipse.emf.common.util.DiagnosticChain; //导入方法依赖的package包/类
@Override
public boolean validate(final EClass eClass, final EObject eObject, final DiagnosticChain diagnostics, final Map<Object, Object> context) {
final Diagnostic diagnostic = new TypesValidatingVisitor().doSwitch(eObject);
final boolean invalid = diagnostic != null;
if (invalid) {
diagnostics.add(diagnostic);
}
return !invalid;
}