Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationValidator.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationValidator.java215
1 files changed, 215 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationValidator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationValidator.java
new file mode 100644
index 00000000000..a971c2db38f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationValidator.java
@@ -0,0 +1,215 @@
+/**
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.gmfdiag.representation.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.EObjectValidator;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+import org.eclipse.papyrus.infra.gmfdiag.representation.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage
+ * @generated
+ * @since 2.0
+ */
+public class RepresentationValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final RepresentationValidator INSTANCE = new RepresentationValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.papyrus.infra.gmfdiag.representation"; //$NON-NLS-1$
+
+ /**
+ * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Ceation Command Class Exists' of 'Papyrus Diagram'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final int PAPYRUS_DIAGRAM__CEATION_COMMAND_CLASS_EXISTS = 1;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 1;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepresentationValidator() {
+ super();
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return RepresentationPackage.eINSTANCE;
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case RepresentationPackage.PAPYRUS_DIAGRAM:
+ return validatePapyrusDiagram((PapyrusDiagram)value, diagnostics, context);
+ case RepresentationPackage.CHILD_RULE:
+ return validateChildRule((ChildRule)value, diagnostics, context);
+ case RepresentationPackage.PALETTE_RULE:
+ return validatePaletteRule((PaletteRule)value, diagnostics, context);
+ case RepresentationPackage.PATH_ELEMENT:
+ return validatePathElement((PathElement)value, diagnostics, context);
+ case RepresentationPackage.ASSISTANT_RULE:
+ return validateAssistantRule((AssistantRule)value, diagnostics, context);
+ case RepresentationPackage.ELEMENT_TYPE:
+ return validateElementType((IElementType)value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePapyrusDiagram(PapyrusDiagram papyrusDiagram, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (!validate_NoCircularContainment(papyrusDiagram, diagnostics, context)) return false;
+ boolean result = validate_EveryMultiplicityConforms(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryDataValueConforms(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryProxyResolves(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_UniqueID(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryKeyUnique(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(papyrusDiagram, diagnostics, context);
+ if (result || diagnostics != null) result &= validatePapyrusDiagram_ceationCommandClassExists(papyrusDiagram, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ceationCommandClassExists constraint of '<em>Papyrus Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePapyrusDiagram_ceationCommandClassExists(PapyrusDiagram papyrusDiagram, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return papyrusDiagram.ceationCommandClassExists(diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateChildRule(ChildRule childRule, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(childRule, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePaletteRule(PaletteRule paletteRule, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(paletteRule, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePathElement(PathElement pathElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(pathElement, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateAssistantRule(AssistantRule assistantRule, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(assistantRule, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateElementType(IElementType elementType, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ // TODO
+ // Specialize this to return a resource locator for messages specific to this validator.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return super.getResourceLocator();
+ }
+
+} //RepresentationValidator

Back to the top