Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 255786 | Differences between
and this patch

Collapse All | Expand All

(-)templates/model/ValidatorClass.javajet (-10 / +119 lines)
Lines 3-9 Link Here
3
/**
3
/**
4
 * <copyright>
4
 * <copyright>
5
 *
5
 *
6
 * Copyright (c) 2002-2006 IBM Corporation and others.
6
 * Copyright (c) 2002-2009 IBM Corporation and others.
7
 * All rights reserved.   This program and the accompanying materials
7
 * All rights reserved.   This program and the accompanying materials
8
 * are made available under the terms of the Eclipse Public License v1.0
8
 * are made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 31-36 Link Here
31
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");%>
31
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");%>
32
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");%>
32
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");%>
33
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");%>
33
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");%>
34
<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.ValidationDelegate");%>
34
35
35
/**
36
/**
36
 * <!-- begin-user-doc -->
37
 * <!-- begin-user-doc -->
Lines 284-289 Link Here
284
285
285
<%}%>
286
<%}%>
286
<%}%>
287
<%}%>
288
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {%>
289
	/**
290
	 * The cached validation expression for the <%=constraint%> constraint of '<em><%=genClassifier.getFormattedName()%></em>'.
291
	 * <!-- begin-user-doc -->
292
	 * <!-- end-user-doc -->
293
	 * @generated
294
	 */
295
	protected static final <%=genModel.getImportedName("java.lang.String")%> <%=genClassifier.getClassifierID()%>__<%=CodeGenUtil.upperName(constraint)%>__EXP = "<%=genClassifier.getValidationExpression(constraint, genModel.getIndentation(stringBuffer))%>";<%=genModel.getNonNLS()%>
296
297
<%}%>
287
	/**
298
	/**
288
	 * Validates the <%=constraint%> constraint of '<em><%=genClassifier.getFormattedName()%></em>'.
299
	 * Validates the <%=constraint%> constraint of '<em><%=genClassifier.getFormattedName()%></em>'.
289
	 * <!-- begin-user-doc -->
300
	 * <!-- begin-user-doc -->
Lines 481-486 Link Here
481
		}
492
		}
482
		return <%=delegate%>validate<%=constraintDelegate.getName()%>_<%=constraint%>(<%=genClassifier.getSafeUncapName()%><%=accessor%>, <%=diagnostics%>, <%=context%>);
493
		return <%=delegate%>validate<%=constraintDelegate.getName()%>_<%=constraint%>(<%=genClassifier.getSafeUncapName()%><%=accessor%>, <%=diagnostics%>, <%=context%>);
483
<%} else {%>
494
<%} else {%>
495
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {%>
496
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%> delegate = getValidationDelegateRegistry(<%=context%>).getValidationDelegate(<%=genModel.getImportedName("org.eclipse.emf.common.util.URI")%>.createURI("<%=genClassifier.getValidationDelegate(constraint)%>"));<%=genModel.getNonNLS()%>
497
		if (delegate != null) {
498
			try {
499
				if (!delegate.validate(<%=genClassifier.getClassifierID()%>__<%=CodeGenUtil.upperName(constraint)%>__EXP, "<%=constraint%>", <%=genClassifier.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>)) {<%=genModel.getNonNLS()%>
500
					if (diagnostics != null) {
501
						<%=diagnostics%>.add
502
							(createDiagnostic
503
								(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
504
								 DIAGNOSTIC_SOURCE,
505
								 0,
506
								 "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
507
								 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
508
								 new Object[] { <%=genClassifier.getSafeUncapName()%> },
509
								 context));
510
					}
511
					return false;
512
				}
513
				return true;
514
			} catch (<%=genModel.getImportedName("java.lang.Throwable")%> throwable) {
515
				if (diagnostics != null) {
516
					<%=diagnostics%>.add
517
						(createDiagnostic
518
							(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
519
							 DIAGNOSTIC_SOURCE,
520
							 0,
521
							 "_UI_ConstraintDelegateException_diagnostic",<%=genModel.getNonNLS()%>
522
							 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>), throwable.getLocalizedMessage() },<%=genModel.getNonNLS()%>
523
							 new Object[] { <%=genClassifier.getSafeUncapName()%> },
524
							 context));
525
				}
526
				return false;
527
			}
528
		} else {
529
			if (diagnostics != null) {
530
				<%=diagnostics%>.add
531
					(createDiagnostic
532
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
533
						 DIAGNOSTIC_SOURCE,
534
						 0,
535
						 "_UI_ConstraintDelegateNotFound_diagnostic",<%=genModel.getNonNLS()%>
536
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>), "<%=genClassifier.getValidationDelegate(constraint)%>" },<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
537
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
538
						 context));
539
			}
540
			return false;
541
		}
542
  <%} else {%>
484
		// TODO implement the constraint
543
		// TODO implement the constraint
485
		// -> specify the condition that violates the constraint
544
		// -> specify the condition that violates the constraint
486
		// -> verify the diagnostic details, including severity, code, and message
545
		// -> verify the diagnostic details, including severity, code, and message
Lines 490-496 Link Here
490
			if (<%=diagnostics%> != null)
549
			if (<%=diagnostics%> != null)
491
			{
550
			{
492
				<%=diagnostics%>.add
551
				<%=diagnostics%>.add
493
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
552
    <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
494
					(createDiagnostic
553
					(createDiagnostic
495
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
554
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
496
						 DIAGNOSTIC_SOURCE,
555
						 DIAGNOSTIC_SOURCE,
Lines 499-516 Link Here
499
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
558
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
500
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
559
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
501
						 context));
560
						 context));
502
<%} else {%>
561
    <%} else {%>
503
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
562
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
504
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
563
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
505
						 DIAGNOSTIC_SOURCE,
564
						 DIAGNOSTIC_SOURCE,
506
						 0,
565
						 0,
507
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
566
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
508
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
567
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
509
<%}%>
568
    <%}%>
510
			}
569
			}
511
			return false;
570
			return false;
512
		}
571
		}
513
		return true;
572
		return true;
573
  <%}%>
514
<%}%>
574
<%}%>
515
<%} else if (constraintDelegate != null) {%>
575
<%} else if (constraintDelegate != null) {%>
516
		// TODO override the constraint, if desired
576
		// TODO override the constraint, if desired
Lines 523-529 Link Here
523
			if (<%=diagnostics%> != null)
583
			if (<%=diagnostics%> != null)
524
			{
584
			{
525
				<%=diagnostics%>.add
585
				<%=diagnostics%>.add
526
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
586
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
527
					(createDiagnostic
587
					(createDiagnostic
528
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
588
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
529
						 DIAGNOSTIC_SOURCE,
589
						 DIAGNOSTIC_SOURCE,
Lines 532-545 Link Here
532
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
592
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
533
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
593
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
534
						 context));
594
						 context));
535
<%} else {%>
595
  <%} else {%>
536
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
596
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
537
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
597
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
538
						 DIAGNOSTIC_SOURCE,
598
						 DIAGNOSTIC_SOURCE,
539
						 0,
599
						 0,
540
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
600
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
541
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
601
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
542
<%}%>
602
  <%}%>
543
			}
603
			}
544
			return false;
604
			return false;
545
		}
605
		}
Lines 547-552 Link Here
547
<%} else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {%>
607
<%} else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {%>
548
		return <%=genClassifier.getSafeUncapName()%>.<%=constraint%>(<%=diagnostics%>, <%=context%>);
608
		return <%=genClassifier.getSafeUncapName()%>.<%=constraint%>(<%=diagnostics%>, <%=context%>);
549
<%} else {%>
609
<%} else {%>
610
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {%>
611
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%> delegate = getValidationDelegateRegistry(<%=context%>).getValidationDelegate(<%=genModel.getImportedName("org.eclipse.emf.common.util.URI")%>.createURI("<%=genClassifier.getValidationDelegate(constraint)%>"));<%=genModel.getNonNLS()%>
612
		if (delegate != null) {
613
			try {
614
				if (!delegate.validate(<%=genClassifier.getClassifierID()%>__<%=CodeGenUtil.upperName(constraint)%>__EXP, "<%=constraint%>", <%=genClassifier.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>)) {<%=genModel.getNonNLS()%>
615
					if (diagnostics != null) {
616
						<%=diagnostics%>.add
617
							(createDiagnostic
618
								(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
619
								 DIAGNOSTIC_SOURCE,
620
								 0,
621
								 "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
622
								 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
623
								 new Object[] { <%=genClassifier.getSafeUncapName()%> },
624
								 context));
625
					}
626
					return false;
627
				}
628
				return true;
629
			} catch (<%=genModel.getImportedName("java.lang.Throwable")%> throwable) {
630
				if (diagnostics != null) {
631
					<%=diagnostics%>.add
632
						(createDiagnostic
633
							(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
634
							 DIAGNOSTIC_SOURCE,
635
							 0,
636
							 "_UI_ConstraintDelegateException_diagnostic",<%=genModel.getNonNLS()%>
637
							 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>), throwable.getLocalizedMessage() },<%=genModel.getNonNLS()%>
638
							 new Object[] { <%=genClassifier.getSafeUncapName()%> },
639
							 context));
640
				}
641
				return false;
642
			}
643
		} else {
644
			if (diagnostics != null) {
645
				<%=diagnostics%>.add
646
					(createDiagnostic
647
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
648
						 DIAGNOSTIC_SOURCE,
649
						 0,
650
						 "_UI_ConstraintDelegateNotFound_diagnostic",<%=genModel.getNonNLS()%>
651
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>), "<%=genClassifier.getValidationDelegate(constraint)%>" },<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
652
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
653
						 context));
654
			}
655
			return false;
656
		}
657
  <%} else {%>
550
		// TODO implement the constraint
658
		// TODO implement the constraint
551
		// -> specify the condition that violates the constraint
659
		// -> specify the condition that violates the constraint
552
		// -> verify the diagnostic details, including severity, code, and message
660
		// -> verify the diagnostic details, including severity, code, and message
Lines 556-562 Link Here
556
			if (<%=diagnostics%> != null)
664
			if (<%=diagnostics%> != null)
557
			{
665
			{
558
				<%=diagnostics%>.add
666
				<%=diagnostics%>.add
559
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
667
    <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
560
					(createDiagnostic
668
					(createDiagnostic
561
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
669
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
562
						 DIAGNOSTIC_SOURCE,
670
						 DIAGNOSTIC_SOURCE,
Lines 565-582 Link Here
565
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
673
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
566
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
674
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
567
						 context));
675
						 context));
568
<%} else {%>
676
    <%} else {%>
569
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
677
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
570
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
678
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
571
						 DIAGNOSTIC_SOURCE,
679
						 DIAGNOSTIC_SOURCE,
572
						 0,
680
						 0,
573
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
681
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
574
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
682
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
575
<%}%>
683
    <%}%>
576
			}
684
			}
577
			return false;
685
			return false;
578
		}
686
		}
579
		return true;
687
		return true;
688
  <%}%>
580
<%}}%>
689
<%}}%>
581
	}
690
	}
582
691
(-)templates/model/Class.javajet (-2 / +57 lines)
Lines 1-9 Link Here
1
<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Class" version="$Id: Class.javajet,v 1.85 2009/04/18 12:13:48 emerks Exp $" %>
1
<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.codegen.util.CodeGenUtil" class="Class" version="$Id: Class.javajet,v 1.85 2009/04/18 12:13:48 emerks Exp $" %>
2
<%
2
<%
3
/**
3
/**
4
 * <copyright>
4
 * <copyright>
5
 *
5
 *
6
 * Copyright (c) 2002-2007 IBM Corporation and others.
6
 * Copyright (c) 2002-2009 IBM Corporation and others.
7
 * All rights reserved.   This program and the accompanying materials
7
 * All rights reserved.   This program and the accompanying materials
8
 * are made available under the terms of the Eclipse Public License v1.0
8
 * are made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 1320-1325 Link Here
1320
<%for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {%>
1320
<%for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {%>
1321
<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
1321
<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
1322
<%@ start %>
1322
<%@ start %>
1323
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && isImplementation && genOperation.isInvariant() && genOperation.hasValidationExpression()) {%>
1324
	/**
1325
	 * The cached validation expression for the '{@link #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>) <em><%=genOperation.getFormattedName()%></em>}' operation.
1326
	 * <!-- begin-user-doc -->
1327
	 * <!-- end-user-doc -->
1328
	 * @see #<%=genOperation.getName()%>(<%=genOperation.getParameterTypes(", ")%>)
1329
	 * @generated
1330
	 */
1331
	protected static final <%=genModel.getImportedName("java.lang.String")%> <%=CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale())%><%=genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale())%>__EXP = "<%=genOperation.getValidationExpression("\t\t")%>";<%=genModel.getNonNLS()%>
1332
1333
  <%}%>
1323
<%if (isInterface) {%>
1334
<%if (isInterface) {%>
1324
<%@ include file="Class/genOperation.javadoc.override.javajetinc" fail="alternative" %>
1335
<%@ include file="Class/genOperation.javadoc.override.javajetinc" fail="alternative" %>
1325
<%@ start %>
1336
<%@ start %>
Lines 1373-1378 Link Here
1373
  <%if (genOperation.hasBody()) {%>
1384
  <%if (genOperation.hasBody()) {%>
1374
		<%=genOperation.getBody(genModel.getIndentation(stringBuffer))%>
1385
		<%=genOperation.getBody(genModel.getIndentation(stringBuffer))%>
1375
  <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName();%>
1386
  <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName();%>
1387
    <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genOperation.hasValidationExpression()) {%>
1388
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry registry = <%=context%> == null ? <%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry.INSTANCE : (<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry)<%=context%>.get(<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry.class);
1389
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%> delegate = (registry == null ? <%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry.INSTANCE : registry).getValidationDelegate(<%=genModel.getImportedName("org.eclipse.emf.common.util.URI")%>.createURI("<%=genOperation.getValidationDelegate()%>"));<%=genModel.getNonNLS()%>
1390
		if (delegate != null) {
1391
			try {
1392
				if (!delegate.validate(<%=CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale())%><%=genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale())%>__EXP, <%=opClass.getQualifiedClassifierAccessor()%>.getEOperations().get(<%=opClass.getEcoreClass().getEOperations().indexOf(genOperation.getEcoreOperation())%>), <%=genClass.getQualifiedClassifierAccessor()%>, this, <%=context%>)) {
1393
					if (diagnostics != null) {
1394
						<%=diagnostics%>.add
1395
							(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
1396
								(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
1397
								 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
1398
								 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
1399
								 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
1400
								 new Object [] { this }));
1401
					}
1402
					return false;
1403
				}
1404
				return true;
1405
			} catch (<%=genModel.getImportedName("java.lang.Throwable")%> throwable) {
1406
				if (diagnostics != null) {
1407
					<%=diagnostics%>.add
1408
						(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
1409
							(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
1410
							 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
1411
							 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
1412
							 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_InvariantDelegateException_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>), throwable.getLocalizedMessage() }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
1413
							 new Object [] { this }));
1414
				}
1415
				return false;
1416
			}
1417
		} else {
1418
			if (diagnostics != null) {
1419
				<%=diagnostics%>.add
1420
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
1421
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
1422
						 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
1423
						 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
1424
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_InvariantDelegateNotFound_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>), "<%=genOperation.getValidationDelegate()%>" }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
1425
						 new Object [] { this }));
1426
			}
1427
			return false;
1428
		}
1429
    <%} else {%>
1376
		// TODO: implement this method
1430
		// TODO: implement this method
1377
		// -> specify the condition that violates the invariant
1431
		// -> specify the condition that violates the invariant
1378
		// -> verify the details of the diagnostic, including severity and message
1432
		// -> verify the details of the diagnostic, including severity and message
Lines 1392-1397 Link Here
1392
			return false;
1446
			return false;
1393
		}
1447
		}
1394
		return true;
1448
		return true;
1449
    <%}%>
1395
  <%} else {%>
1450
  <%} else {%>
1396
<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
1451
<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
1397
<%@ start %>
1452
<%@ start %>
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenEnumLiteralImpl.java (-2 / +3 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 22-27 Link Here
22
import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel;
22
import org.eclipse.emf.codegen.ecore.genmodel.GenJDKLevel;
23
import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
23
import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
24
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
24
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
25
import org.eclipse.emf.codegen.util.CodeGenUtil;
25
import org.eclipse.emf.common.notify.Notification;
26
import org.eclipse.emf.common.notify.Notification;
26
import org.eclipse.emf.common.notify.NotificationChain;
27
import org.eclipse.emf.common.notify.NotificationChain;
27
import org.eclipse.emf.ecore.EClass;
28
import org.eclipse.emf.ecore.EClass;
Lines 328-334 Link Here
328
329
329
  public String getEnumLiteralID()
330
  public String getEnumLiteralID()
330
  {
331
  {
331
    return format(getName(), '_', null, false, true).toUpperCase(getGenModel().getLocale());
332
    return CodeGenUtil.upperName(getName(), getGenModel().getLocale());
332
  }
333
  }
333
  
334
  
334
  public String getEnumLiteralInstanceConstantName()
335
  public String getEnumLiteralInstanceConstantName()
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenModelPackageImpl.java (-1 / +2 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2002-2007 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 2383-2388 Link Here
2383
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF23);
2383
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF23);
2384
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF24);
2384
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF24);
2385
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF25);
2385
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF25);
2386
    addEEnumLiteral(genRuntimeVersionEEnum, GenRuntimeVersion.EMF26);
2386
2387
2387
    // Create resource
2388
    // Create resource
2388
    createResource(eNS_URI);
2389
    createResource(eNS_URI);
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenBaseImpl.java (-2 / +7 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2007 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 2502-2514 Link Here
2502
2502
2503
  protected String indent(String text, String indentation)
2503
  protected String indent(String text, String indentation)
2504
  {
2504
  {
2505
    return indent(text, indentation, getGenModel().getLineDelimiter());
2506
  }
2507
2508
  protected String indent(String text, String indentation, String lineDelimiter)
2509
  {
2505
    if (text == null)
2510
    if (text == null)
2506
    {
2511
    {
2507
      return null;
2512
      return null;
2508
    }
2513
    }
2509
    else
2514
    else
2510
    {
2515
    {
2511
      String separator = getGenModel().getLineDelimiter() + indentation;
2516
      String separator = lineDelimiter + indentation;
2512
      int increment = separator.length() - 1;
2517
      int increment = separator.length() - 1;
2513
      StringBuffer stringBuffer = new StringBuffer(text);
2518
      StringBuffer stringBuffer = new StringBuffer(text);
2514
      for (int i = 0; i < stringBuffer.length(); ++i)
2519
      for (int i = 0; i < stringBuffer.length(); ++i)
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenOperationImpl.java (-1 / +37 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 927-932 Link Here
927
    }
927
    }
928
  }
928
  }
929
929
930
  protected String getValidationExpression()
931
  {
932
    for (String validationDelegate : EcoreUtil.getValidationDelegates(getGenPackage().getEcorePackage()))
933
    {
934
      String expression = EcoreUtil.getAnnotation(getEcoreOperation(), validationDelegate, "body");
935
      if (expression != null)
936
      {
937
        return expression;
938
      }
939
    }
940
    return null;
941
  }
942
943
  public boolean hasValidationExpression()
944
  {
945
    return getValidationExpression() != null;
946
  }
947
948
  public String getValidationExpression(String indentation)
949
  {
950
    return indent(getValidationExpression(), indentation + "\"", "\" +" + getGenModel().getNonNLS() + getGenModel().getLineDelimiter());
951
  }
952
953
  public String getValidationDelegate()
954
  {
955
    for (String validationDelegate : EcoreUtil.getValidationDelegates(getGenPackage().getEcorePackage()))
956
    {
957
      String expression = EcoreUtil.getAnnotation(getEcoreOperation(), validationDelegate, "body");
958
      if (expression != null)
959
      {
960
        return validationDelegate;
961
      }
962
    }
963
    return null;
964
  }
965
930
  public List<GenClassifier> getGenExceptions()
966
  public List<GenClassifier> getGenExceptions()
931
  {
967
  {
932
    List<GenClassifier> result = new ArrayList<GenClassifier>();
968
    List<GenClassifier> result = new ArrayList<GenClassifier>();
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenClassifierImpl.java (-1 / +37 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 303-306 Link Here
303
  {
303
  {
304
    return getImportedInstanceClassName();
304
    return getImportedInstanceClassName();
305
  }
305
  }
306
307
  protected String getValidationExpression(String constraint)
308
  {
309
    for (String validationDelegate : EcoreUtil.getValidationDelegates(getGenPackage().getEcorePackage()))
310
    {
311
      String expression = EcoreUtil.getAnnotation(getEcoreClassifier(), validationDelegate, constraint);
312
      if (expression != null)
313
      {
314
        return expression;
315
      }
316
    }
317
    return null;
318
  }
319
320
  public boolean hasValidationExpression(String constraint)
321
  {
322
    return getValidationExpression(constraint) != null;
323
  }
324
325
  public String getValidationExpression(String constraint, String indentation)
326
  {
327
    return indent(getValidationExpression(constraint), indentation);
328
  }
329
330
  public String getValidationDelegate(String constraint)
331
  {
332
    for (String validationDelegate : EcoreUtil.getValidationDelegates(getGenPackage().getEcorePackage()))
333
    {
334
      String expression = EcoreUtil.getAnnotation(getEcoreClassifier(), validationDelegate, constraint);
335
      if (expression != null)
336
      {
337
        return validationDelegate;
338
      }
339
    }
340
    return null;
341
  }
306
}
342
}
(-)src/org/eclipse/emf/codegen/ecore/genmodel/impl/GenFeatureImpl.java (-2 / +3 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 33-38 Link Here
33
import org.eclipse.emf.codegen.ecore.genmodel.GenOperation;
33
import org.eclipse.emf.codegen.ecore.genmodel.GenOperation;
34
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
34
import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
35
import org.eclipse.emf.codegen.ecore.genmodel.GenPropertyKind;
35
import org.eclipse.emf.codegen.ecore.genmodel.GenPropertyKind;
36
import org.eclipse.emf.codegen.util.CodeGenUtil;
36
import org.eclipse.emf.common.notify.Notification;
37
import org.eclipse.emf.common.notify.Notification;
37
import org.eclipse.emf.common.notify.NotificationChain;
38
import org.eclipse.emf.common.notify.NotificationChain;
38
import org.eclipse.emf.common.util.EList;
39
import org.eclipse.emf.common.util.EList;
Lines 969-975 Link Here
969
970
970
  public String getUpperName()
971
  public String getUpperName()
971
  {
972
  {
972
    return format(getName(), '_', null, false, true).toUpperCase(getGenModel().getLocale());
973
    return CodeGenUtil.upperName(getName(), getGenModel().getLocale());
973
  }
974
  }
974
975
975
  public String getUncapName()
976
  public String getUncapName()
(-)model/GenModel.ecore (+1 lines)
Lines 308-312 Link Here
308
    <eLiterals name="EMF23" value="1" literal="2.3"/>
308
    <eLiterals name="EMF23" value="1" literal="2.3"/>
309
    <eLiterals name="EMF24" value="2" literal="2.4"/>
309
    <eLiterals name="EMF24" value="2" literal="2.4"/>
310
    <eLiterals name="EMF25" value="3" literal="2.5"/>
310
    <eLiterals name="EMF25" value="3" literal="2.5"/>
311
    <eLiterals name="EMF26" value="4" literal="2.6"/>
311
  </eClassifiers>
312
  </eClassifiers>
312
</ecore:EPackage>
313
</ecore:EPackage>
(-)model/GenModel.genmodel (-4 / +4 lines)
Lines 5-16 Link Here
5
    creationCommands="false" editDirectory="/org.eclipse.emf.codegen.ecore.ui/src"
5
    creationCommands="false" editDirectory="/org.eclipse.emf.codegen.ecore.ui/src"
6
    editorDirectory="/org.eclipse.emf.codegen.ecore.ui/src" modelPluginID="org.eclipse.emf.codegen.ecore"
6
    editorDirectory="/org.eclipse.emf.codegen.ecore.ui/src" modelPluginID="org.eclipse.emf.codegen.ecore"
7
    runtimeJar="true" modelName="GenModel" editPluginClass="org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin"
7
    runtimeJar="true" modelName="GenModel" editPluginClass="org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin"
8
    editorPluginClass="" updateClasspath="false" testsDirectory="" importerID="org.eclipse.emf.importer.rose"
8
    editorPluginClass="" updateClasspath="false" testsDirectory="" importerID="org.eclipse.emf.importer.ecore"
9
    complianceLevel="5.0" editPluginID="org.eclipse.emf.codegen.ecore.ui" language="en"
9
    complianceLevel="5.0" editPluginID="org.eclipse.emf.codegen.ecore.ui" language="en"
10
    usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
10
    usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
11
  <foreignModel>GenModel.mdl</foreignModel>
11
  <foreignModel>GenModel.ecore</foreignModel>
12
  <foreignModel>VABASE_PLUGINS_PATH</foreignModel>
13
  <foreignModel>../..</foreignModel>
14
  <genPackages prefix="GenModel" basePackage="org.eclipse.emf.codegen.ecore" disposableProviderFactory="true"
12
  <genPackages prefix="GenModel" basePackage="org.eclipse.emf.codegen.ecore" disposableProviderFactory="true"
15
      multipleEditorPages="false" generateModelWizard="false" contentTypeIdentifier="org.eclipse.emf.codegen.genmodel"
13
      multipleEditorPages="false" generateModelWizard="false" contentTypeIdentifier="org.eclipse.emf.codegen.genmodel"
16
      ecorePackage="GenModel.ecore#/">
14
      ecorePackage="GenModel.ecore#/">
Lines 45-50 Link Here
45
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF22"/>
43
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF22"/>
46
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF23"/>
44
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF23"/>
47
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF24"/>
45
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF24"/>
46
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF25"/>
47
      <genEnumLiterals ecoreEnumLiteral="GenModel.ecore#//GenRuntimeVersion/EMF26"/>
48
    </genEnums>
48
    </genEnums>
49
    <genClasses ecoreClass="GenModel.ecore#//GenModel">
49
    <genClasses ecoreClass="GenModel.ecore#//GenModel">
50
      <genFeatures createChild="false" propertyCategory="All" propertyDescription="A copyright string to appear in the header of each generated artifact"
50
      <genFeatures createChild="false" propertyCategory="All" propertyDescription="A copyright string to appear in the header of each generated artifact"
(-)src/org/eclipse/emf/codegen/ecore/genmodel/GenRuntimeVersion.java (-2 / +24 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2008 IBM Corporation and others.
4
 * Copyright (c) 2008-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 66-72 Link Here
66
   * @generated
66
   * @generated
67
   * @ordered
67
   * @ordered
68
   */
68
   */
69
  EMF25(3, "EMF25", "2.5");
69
  EMF25(3, "EMF25", "2.5"), /**
70
   * The '<em><b>EMF26</b></em>' literal object.
71
   * <!-- begin-user-doc -->
72
   * <!-- end-user-doc -->
73
   * @see #EMF26_VALUE
74
   * @generated
75
   * @ordered
76
   */
77
  EMF26(4, "EMF26", "2.6");
70
78
71
  /**
79
  /**
72
   * The '<em><b>EMF22</b></em>' literal value.
80
   * The '<em><b>EMF22</b></em>' literal value.
Lines 114-119 Link Here
114
  public static final int EMF25_VALUE = 3;
122
  public static final int EMF25_VALUE = 3;
115
123
116
  /**
124
  /**
125
   * The '<em><b>EMF26</b></em>' literal value.
126
   * <!-- begin-user-doc -->
127
   * @since 2.6
128
   * <!-- end-user-doc -->
129
   * @see #EMF26
130
   * @model literal="2.6"
131
   * @generated
132
   * @ordered
133
   */
134
  public static final int EMF26_VALUE = 4;
135
136
  /**
117
   * An array of all the '<em><b>Gen Runtime Version</b></em>' enumerators.
137
   * An array of all the '<em><b>Gen Runtime Version</b></em>' enumerators.
118
   * <!-- begin-user-doc -->
138
   * <!-- begin-user-doc -->
119
   * <!-- end-user-doc -->
139
   * <!-- end-user-doc -->
Lines 126-131 Link Here
126
      EMF23,
146
      EMF23,
127
      EMF24,
147
      EMF24,
128
      EMF25,
148
      EMF25,
149
      EMF26,
129
    };
150
    };
130
151
131
  /**
152
  /**
Lines 188-193 Link Here
188
      case EMF23_VALUE: return EMF23;
209
      case EMF23_VALUE: return EMF23;
189
      case EMF24_VALUE: return EMF24;
210
      case EMF24_VALUE: return EMF24;
190
      case EMF25_VALUE: return EMF25;
211
      case EMF25_VALUE: return EMF25;
212
      case EMF26_VALUE: return EMF26;
191
    }
213
    }
192
    return null;
214
    return null;
193
  }
215
  }
(-)src/org/eclipse/emf/codegen/ecore/genmodel/GenClassifier.java (-1 / +5 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 127-130 Link Here
127
  boolean hasOnlyDefaultConstraints();
127
  boolean hasOnlyDefaultConstraints();
128
128
129
  String getGeneratedInstanceClassFlag();
129
  String getGeneratedInstanceClassFlag();
130
131
  boolean hasValidationExpression(String constraint);
132
  String getValidationExpression(String constraint, String indentation);
133
  String getValidationDelegate(String constraint);
130
}
134
}
(-)src/org/eclipse/emf/codegen/ecore/genmodel/GenOperation.java (-1 / +5 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright> 
2
 * <copyright> 
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 191-196 Link Here
191
  boolean hasBody();
191
  boolean hasBody();
192
  String getBody(String indentation);
192
  String getBody(String indentation);
193
193
194
  boolean hasValidationExpression();
195
  String getValidationExpression(String indentation);
196
  String getValidationDelegate();
197
194
  List<GenClassifier> getGenExceptions();
198
  List<GenClassifier> getGenExceptions();
195
199
196
  /**
200
  /**
(-)src/org/eclipse/emf/codegen/ecore/templates/model/Class.java (-928 / +1124 lines)
Lines 2-7 Link Here
2
2
3
import java.util.*;
3
import java.util.*;
4
import org.eclipse.emf.codegen.ecore.genmodel.*;
4
import org.eclipse.emf.codegen.ecore.genmodel.*;
5
import org.eclipse.emf.codegen.util.CodeGenUtil;
5
6
6
public class Class
7
public class Class
7
{
8
{
Lines 1120-1590 Link Here
1120
  protected final String TEXT_1103 = "' ";
1121
  protected final String TEXT_1103 = "' ";
1121
  protected final String TEXT_1104 = " is set" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
1122
  protected final String TEXT_1104 = " is set" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
1122
  protected final String TEXT_1105 = NL + "\t}" + NL;
1123
  protected final String TEXT_1105 = NL + "\t}" + NL;
1123
  protected final String TEXT_1106 = NL + "\t/**";
1124
  protected final String TEXT_1106 = NL + "\t/**" + NL + "\t * The cached validation expression for the '{@link #";
1124
  protected final String TEXT_1107 = NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
1125
  protected final String TEXT_1107 = "(";
1125
  protected final String TEXT_1108 = NL + "\t * <!-- begin-model-doc -->";
1126
  protected final String TEXT_1108 = ") <em>";
1126
  protected final String TEXT_1109 = NL + "\t * ";
1127
  protected final String TEXT_1109 = "</em>}' operation." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
1127
  protected final String TEXT_1110 = NL + "\t * @param ";
1128
  protected final String TEXT_1110 = "(";
1128
  protected final String TEXT_1111 = NL + "\t *   ";
1129
  protected final String TEXT_1111 = ")" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected static final ";
1129
  protected final String TEXT_1112 = NL + "\t * @param ";
1130
  protected final String TEXT_1112 = " ";
1130
  protected final String TEXT_1113 = " ";
1131
  protected final String TEXT_1113 = "__EXP = \"";
1131
  protected final String TEXT_1114 = NL + "\t * <!-- end-model-doc -->";
1132
  protected final String TEXT_1114 = "\";";
1132
  protected final String TEXT_1115 = NL + "\t * @model ";
1133
  protected final String TEXT_1115 = NL;
1133
  protected final String TEXT_1116 = NL + "\t *        ";
1134
  protected final String TEXT_1116 = NL + "\t/**";
1134
  protected final String TEXT_1117 = NL + "\t * @model";
1135
  protected final String TEXT_1117 = NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
1135
  protected final String TEXT_1118 = NL + "\t * @generated" + NL + "\t */";
1136
  protected final String TEXT_1118 = NL + "\t * <!-- begin-model-doc -->";
1136
  protected final String TEXT_1119 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1137
  protected final String TEXT_1119 = NL + "\t * ";
1137
  protected final String TEXT_1120 = NL + "\t";
1138
  protected final String TEXT_1120 = NL + "\t * @param ";
1138
  protected final String TEXT_1121 = " ";
1139
  protected final String TEXT_1121 = NL + "\t *   ";
1139
  protected final String TEXT_1122 = "(";
1140
  protected final String TEXT_1122 = NL + "\t * @param ";
1140
  protected final String TEXT_1123 = ")";
1141
  protected final String TEXT_1123 = " ";
1141
  protected final String TEXT_1124 = ";" + NL;
1142
  protected final String TEXT_1124 = NL + "\t * <!-- end-model-doc -->";
1142
  protected final String TEXT_1125 = NL + "\tpublic ";
1143
  protected final String TEXT_1125 = NL + "\t * @model ";
1143
  protected final String TEXT_1126 = " ";
1144
  protected final String TEXT_1126 = NL + "\t *        ";
1144
  protected final String TEXT_1127 = "(";
1145
  protected final String TEXT_1127 = NL + "\t * @model";
1145
  protected final String TEXT_1128 = ")";
1146
  protected final String TEXT_1128 = NL + "\t * @generated" + NL + "\t */";
1146
  protected final String TEXT_1129 = NL + "\t{";
1147
  protected final String TEXT_1129 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1147
  protected final String TEXT_1130 = NL + "\t\t";
1148
  protected final String TEXT_1130 = NL + "\t";
1148
  protected final String TEXT_1131 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// -> specify the condition that violates the invariant" + NL + "\t\t// -> verify the details of the diagnostic, including severity and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
1149
  protected final String TEXT_1131 = " ";
1149
  protected final String TEXT_1132 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
1150
  protected final String TEXT_1132 = "(";
1150
  protected final String TEXT_1133 = ".add" + NL + "\t\t\t\t\t(new ";
1151
  protected final String TEXT_1133 = ")";
1151
  protected final String TEXT_1134 = NL + "\t\t\t\t\t\t(";
1152
  protected final String TEXT_1134 = ";" + NL;
1152
  protected final String TEXT_1135 = ".ERROR," + NL + "\t\t\t\t\t\t ";
1153
  protected final String TEXT_1135 = NL + "\tpublic ";
1153
  protected final String TEXT_1136 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t ";
1154
  protected final String TEXT_1136 = " ";
1154
  protected final String TEXT_1137 = ".";
1155
  protected final String TEXT_1137 = "(";
1155
  protected final String TEXT_1138 = "," + NL + "\t\t\t\t\t\t ";
1156
  protected final String TEXT_1138 = ")";
1156
  protected final String TEXT_1139 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
1157
  protected final String TEXT_1139 = NL + "\t{";
1157
  protected final String TEXT_1140 = "\", ";
1158
  protected final String TEXT_1140 = NL + "\t\t";
1158
  protected final String TEXT_1141 = ".getObjectLabel(this, ";
1159
  protected final String TEXT_1141 = NL + "\t\t";
1159
  protected final String TEXT_1142 = ") }),";
1160
  protected final String TEXT_1142 = ".Registry registry = ";
1160
  protected final String TEXT_1143 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
1161
  protected final String TEXT_1143 = " == null ? ";
1161
  protected final String TEXT_1144 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
1162
  protected final String TEXT_1144 = ".Registry.INSTANCE : (";
1162
  protected final String TEXT_1145 = NL + "\t}" + NL;
1163
  protected final String TEXT_1145 = ".Registry)";
1163
  protected final String TEXT_1146 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1164
  protected final String TEXT_1146 = ".get(";
1164
  protected final String TEXT_1147 = NL + "\t@SuppressWarnings(\"unchecked\")";
1165
  protected final String TEXT_1147 = ".Registry.class);" + NL + "\t\t";
1165
  protected final String TEXT_1148 = NL + "\t@Override";
1166
  protected final String TEXT_1148 = " delegate = (registry == null ? ";
1166
  protected final String TEXT_1149 = NL + "\tpublic ";
1167
  protected final String TEXT_1149 = ".Registry.INSTANCE : registry).getValidationDelegate(";
1167
  protected final String TEXT_1150 = " eInverseAdd(";
1168
  protected final String TEXT_1150 = ".createURI(\"";
1168
  protected final String TEXT_1151 = " otherEnd, int featureID, ";
1169
  protected final String TEXT_1151 = "\"));";
1169
  protected final String TEXT_1152 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1170
  protected final String TEXT_1152 = NL + "\t\tif (delegate != null) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tif (!delegate.validate(";
1170
  protected final String TEXT_1153 = ")" + NL + "\t\t{";
1171
  protected final String TEXT_1153 = "__EXP, ";
1171
  protected final String TEXT_1154 = NL + "\t\t\tcase ";
1172
  protected final String TEXT_1154 = ".getEOperations().get(";
1172
  protected final String TEXT_1155 = ":";
1173
  protected final String TEXT_1155 = "), ";
1173
  protected final String TEXT_1156 = NL + "\t\t\t\treturn ((";
1174
  protected final String TEXT_1156 = ", this, ";
1174
  protected final String TEXT_1157 = "(";
1175
  protected final String TEXT_1157 = ")) {" + NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
1175
  protected final String TEXT_1158 = ".InternalMapView";
1176
  protected final String TEXT_1158 = ".add" + NL + "\t\t\t\t\t\t\t(new ";
1176
  protected final String TEXT_1159 = ")";
1177
  protected final String TEXT_1159 = NL + "\t\t\t\t\t\t\t\t(";
1177
  protected final String TEXT_1160 = "()).eMap()).basicAdd(otherEnd, msgs);";
1178
  protected final String TEXT_1160 = ".ERROR," + NL + "\t\t\t\t\t\t\t\t ";
1178
  protected final String TEXT_1161 = NL + "\t\t\t\treturn (";
1179
  protected final String TEXT_1161 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t\t ";
1179
  protected final String TEXT_1162 = "()).basicAdd(otherEnd, msgs);";
1180
  protected final String TEXT_1162 = ".";
1180
  protected final String TEXT_1163 = NL + "\t\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\t\tmsgs = eBasicRemoveFromContainer(msgs);";
1181
  protected final String TEXT_1163 = "," + NL + "\t\t\t\t\t\t\t\t ";
1181
  protected final String TEXT_1164 = NL + "\t\t\t\treturn basicSet";
1182
  protected final String TEXT_1164 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
1182
  protected final String TEXT_1165 = "((";
1183
  protected final String TEXT_1165 = "\", ";
1183
  protected final String TEXT_1166 = ")otherEnd, msgs);";
1184
  protected final String TEXT_1166 = ".getObjectLabel(this, ";
1184
  protected final String TEXT_1167 = NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, ";
1185
  protected final String TEXT_1167 = ") }),";
1185
  protected final String TEXT_1168 = ", msgs);";
1186
  protected final String TEXT_1168 = NL + "\t\t\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn false;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t} catch (";
1186
  protected final String TEXT_1169 = NL + "\t\t\t\t";
1187
  protected final String TEXT_1169 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
1187
  protected final String TEXT_1170 = " ";
1188
  protected final String TEXT_1170 = ".add" + NL + "\t\t\t\t\t\t(new ";
1188
  protected final String TEXT_1171 = " = (";
1189
  protected final String TEXT_1171 = NL + "\t\t\t\t\t\t\t(";
1189
  protected final String TEXT_1172 = ")eVirtualGet(";
1190
  protected final String TEXT_1172 = ".ERROR," + NL + "\t\t\t\t\t\t\t ";
1190
  protected final String TEXT_1173 = ");";
1191
  protected final String TEXT_1173 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t ";
1191
  protected final String TEXT_1174 = NL + "\t\t\t\t";
1192
  protected final String TEXT_1174 = ".";
1192
  protected final String TEXT_1175 = " ";
1193
  protected final String TEXT_1175 = "," + NL + "\t\t\t\t\t\t\t ";
1193
  protected final String TEXT_1176 = " = ";
1194
  protected final String TEXT_1176 = ".INSTANCE.getString(\"_UI_InvariantDelegateException_diagnostic\", new Object[] { \"";
1194
  protected final String TEXT_1177 = "basicGet";
1195
  protected final String TEXT_1177 = "\", ";
1195
  protected final String TEXT_1178 = "();";
1196
  protected final String TEXT_1178 = ".getObjectLabel(this, ";
1196
  protected final String TEXT_1179 = NL + "\t\t\t\tif (";
1197
  protected final String TEXT_1179 = "), throwable.getLocalizedMessage() }),";
1197
  protected final String TEXT_1180 = " != null)";
1198
  protected final String TEXT_1180 = NL + "\t\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t";
1198
  protected final String TEXT_1181 = NL + "\t\t\t\t\tmsgs = ((";
1199
  protected final String TEXT_1181 = ".add" + NL + "\t\t\t\t\t(new ";
1199
  protected final String TEXT_1182 = ")";
1200
  protected final String TEXT_1182 = NL + "\t\t\t\t\t\t(";
1200
  protected final String TEXT_1183 = ").eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
1201
  protected final String TEXT_1183 = ".ERROR," + NL + "\t\t\t\t\t\t ";
1201
  protected final String TEXT_1184 = ", null, msgs);";
1202
  protected final String TEXT_1184 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t ";
1202
  protected final String TEXT_1185 = NL + "\t\t\t\t\tmsgs = ((";
1203
  protected final String TEXT_1185 = ".";
1203
  protected final String TEXT_1186 = ")";
1204
  protected final String TEXT_1186 = "," + NL + "\t\t\t\t\t\t ";
1204
  protected final String TEXT_1187 = ").eInverseRemove(this, ";
1205
  protected final String TEXT_1187 = ".INSTANCE.getString(\"_UI_InvariantDelegateNotFound_diagnostic\", new Object[] { \"";
1205
  protected final String TEXT_1188 = ", ";
1206
  protected final String TEXT_1188 = "\", ";
1206
  protected final String TEXT_1189 = ".class, msgs);";
1207
  protected final String TEXT_1189 = ".getObjectLabel(this, ";
1207
  protected final String TEXT_1190 = NL + "\t\t\t\treturn basicSet";
1208
  protected final String TEXT_1190 = "), \"";
1208
  protected final String TEXT_1191 = "((";
1209
  protected final String TEXT_1191 = "\" }),";
1209
  protected final String TEXT_1192 = ")otherEnd, msgs);";
1210
  protected final String TEXT_1192 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
1210
  protected final String TEXT_1193 = NL + "\t\t}";
1211
  protected final String TEXT_1193 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// -> specify the condition that violates the invariant" + NL + "\t\t// -> verify the details of the diagnostic, including severity and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
1211
  protected final String TEXT_1194 = NL + "\t\treturn super.eInverseAdd(otherEnd, featureID, msgs);";
1212
  protected final String TEXT_1194 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
1212
  protected final String TEXT_1195 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, featureID, msgs);";
1213
  protected final String TEXT_1195 = ".add" + NL + "\t\t\t\t\t(new ";
1213
  protected final String TEXT_1196 = NL + "\t}" + NL;
1214
  protected final String TEXT_1196 = NL + "\t\t\t\t\t\t(";
1214
  protected final String TEXT_1197 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1215
  protected final String TEXT_1197 = ".ERROR," + NL + "\t\t\t\t\t\t ";
1215
  protected final String TEXT_1198 = NL + "\t@Override";
1216
  protected final String TEXT_1198 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t ";
1216
  protected final String TEXT_1199 = NL + "\tpublic ";
1217
  protected final String TEXT_1199 = ".";
1217
  protected final String TEXT_1200 = " eInverseRemove(";
1218
  protected final String TEXT_1200 = "," + NL + "\t\t\t\t\t\t ";
1218
  protected final String TEXT_1201 = " otherEnd, int featureID, ";
1219
  protected final String TEXT_1201 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
1219
  protected final String TEXT_1202 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1220
  protected final String TEXT_1202 = "\", ";
1220
  protected final String TEXT_1203 = ")" + NL + "\t\t{";
1221
  protected final String TEXT_1203 = ".getObjectLabel(this, ";
1221
  protected final String TEXT_1204 = NL + "\t\t\tcase ";
1222
  protected final String TEXT_1204 = ") }),";
1222
  protected final String TEXT_1205 = ":";
1223
  protected final String TEXT_1205 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
1223
  protected final String TEXT_1206 = NL + "\t\t\t\treturn ((";
1224
  protected final String TEXT_1206 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
1224
  protected final String TEXT_1207 = ")((";
1225
  protected final String TEXT_1207 = NL + "\t}" + NL;
1225
  protected final String TEXT_1208 = ".InternalMapView";
1226
  protected final String TEXT_1208 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1226
  protected final String TEXT_1209 = ")";
1227
  protected final String TEXT_1209 = NL + "\t@SuppressWarnings(\"unchecked\")";
1227
  protected final String TEXT_1210 = "()).eMap()).basicRemove(otherEnd, msgs);";
1228
  protected final String TEXT_1210 = NL + "\t@Override";
1228
  protected final String TEXT_1211 = NL + "\t\t\t\treturn ((";
1229
  protected final String TEXT_1211 = NL + "\tpublic ";
1229
  protected final String TEXT_1212 = ")((";
1230
  protected final String TEXT_1212 = " eInverseAdd(";
1230
  protected final String TEXT_1213 = ".Internal.Wrapper)";
1231
  protected final String TEXT_1213 = " otherEnd, int featureID, ";
1231
  protected final String TEXT_1214 = "()).featureMap()).basicRemove(otherEnd, msgs);";
1232
  protected final String TEXT_1214 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1232
  protected final String TEXT_1215 = NL + "\t\t\t\treturn ((";
1233
  protected final String TEXT_1215 = ")" + NL + "\t\t{";
1233
  protected final String TEXT_1216 = ")";
1234
  protected final String TEXT_1216 = NL + "\t\t\tcase ";
1234
  protected final String TEXT_1217 = "()).basicRemove(otherEnd, msgs);";
1235
  protected final String TEXT_1217 = ":";
1235
  protected final String TEXT_1218 = NL + "\t\t\t\treturn eBasicSetContainer(null, ";
1236
  protected final String TEXT_1218 = NL + "\t\t\t\treturn ((";
1236
  protected final String TEXT_1219 = ", msgs);";
1237
  protected final String TEXT_1219 = "(";
1237
  protected final String TEXT_1220 = NL + "\t\t\t\treturn basicUnset";
1238
  protected final String TEXT_1220 = ".InternalMapView";
1238
  protected final String TEXT_1221 = "(msgs);";
1239
  protected final String TEXT_1221 = ")";
1239
  protected final String TEXT_1222 = NL + "\t\t\t\treturn basicSet";
1240
  protected final String TEXT_1222 = "()).eMap()).basicAdd(otherEnd, msgs);";
1240
  protected final String TEXT_1223 = "(null, msgs);";
1241
  protected final String TEXT_1223 = NL + "\t\t\t\treturn (";
1241
  protected final String TEXT_1224 = NL + "\t\t}";
1242
  protected final String TEXT_1224 = "()).basicAdd(otherEnd, msgs);";
1242
  protected final String TEXT_1225 = NL + "\t\treturn super.eInverseRemove(otherEnd, featureID, msgs);";
1243
  protected final String TEXT_1225 = NL + "\t\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\t\tmsgs = eBasicRemoveFromContainer(msgs);";
1243
  protected final String TEXT_1226 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, featureID, msgs);";
1244
  protected final String TEXT_1226 = NL + "\t\t\t\treturn basicSet";
1244
  protected final String TEXT_1227 = NL + "\t}" + NL;
1245
  protected final String TEXT_1227 = "((";
1245
  protected final String TEXT_1228 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1246
  protected final String TEXT_1228 = ")otherEnd, msgs);";
1246
  protected final String TEXT_1229 = NL + "\t@Override";
1247
  protected final String TEXT_1229 = NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, ";
1247
  protected final String TEXT_1230 = NL + "\tpublic ";
1248
  protected final String TEXT_1230 = ", msgs);";
1248
  protected final String TEXT_1231 = " eBasicRemoveFromContainerFeature(";
1249
  protected final String TEXT_1231 = NL + "\t\t\t\t";
1249
  protected final String TEXT_1232 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID()";
1250
  protected final String TEXT_1232 = " ";
1250
  protected final String TEXT_1233 = ")" + NL + "\t\t{";
1251
  protected final String TEXT_1233 = " = (";
1251
  protected final String TEXT_1234 = NL + "\t\t\tcase ";
1252
  protected final String TEXT_1234 = ")eVirtualGet(";
1252
  protected final String TEXT_1235 = ":" + NL + "\t\t\t\treturn eInternalContainer().eInverseRemove(this, ";
1253
  protected final String TEXT_1235 = ");";
1253
  protected final String TEXT_1236 = ", ";
1254
  protected final String TEXT_1236 = NL + "\t\t\t\t";
1254
  protected final String TEXT_1237 = ".class, msgs);";
1255
  protected final String TEXT_1237 = " ";
1255
  protected final String TEXT_1238 = NL + "\t\t}";
1256
  protected final String TEXT_1238 = " = ";
1256
  protected final String TEXT_1239 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(msgs);";
1257
  protected final String TEXT_1239 = "basicGet";
1257
  protected final String TEXT_1240 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(msgs);";
1258
  protected final String TEXT_1240 = "();";
1258
  protected final String TEXT_1241 = NL + "\t}" + NL;
1259
  protected final String TEXT_1241 = NL + "\t\t\t\tif (";
1259
  protected final String TEXT_1242 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1260
  protected final String TEXT_1242 = " != null)";
1260
  protected final String TEXT_1243 = NL + "\t@Override";
1261
  protected final String TEXT_1243 = NL + "\t\t\t\t\tmsgs = ((";
1261
  protected final String TEXT_1244 = NL + "\tpublic Object eGet(int featureID, boolean resolve, boolean coreType)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1262
  protected final String TEXT_1244 = ")";
1262
  protected final String TEXT_1245 = ")" + NL + "\t\t{";
1263
  protected final String TEXT_1245 = ").eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
1263
  protected final String TEXT_1246 = NL + "\t\t\tcase ";
1264
  protected final String TEXT_1246 = ", null, msgs);";
1264
  protected final String TEXT_1247 = ":";
1265
  protected final String TEXT_1247 = NL + "\t\t\t\t\tmsgs = ((";
1265
  protected final String TEXT_1248 = NL + "\t\t\t\treturn ";
1266
  protected final String TEXT_1248 = ")";
1266
  protected final String TEXT_1249 = "();";
1267
  protected final String TEXT_1249 = ").eInverseRemove(this, ";
1267
  protected final String TEXT_1250 = NL + "\t\t\t\treturn ";
1268
  protected final String TEXT_1250 = ", ";
1268
  protected final String TEXT_1251 = "() ? Boolean.TRUE : Boolean.FALSE;";
1269
  protected final String TEXT_1251 = ".class, msgs);";
1269
  protected final String TEXT_1252 = NL + "\t\t\t\treturn new ";
1270
  protected final String TEXT_1252 = NL + "\t\t\t\treturn basicSet";
1270
  protected final String TEXT_1253 = "(";
1271
  protected final String TEXT_1253 = "((";
1271
  protected final String TEXT_1254 = "());";
1272
  protected final String TEXT_1254 = ")otherEnd, msgs);";
1272
  protected final String TEXT_1255 = NL + "\t\t\t\tif (resolve) return ";
1273
  protected final String TEXT_1255 = NL + "\t\t}";
1273
  protected final String TEXT_1256 = "();" + NL + "\t\t\t\treturn basicGet";
1274
  protected final String TEXT_1256 = NL + "\t\treturn super.eInverseAdd(otherEnd, featureID, msgs);";
1274
  protected final String TEXT_1257 = "();";
1275
  protected final String TEXT_1257 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, featureID, msgs);";
1275
  protected final String TEXT_1258 = NL + "\t\t\t\tif (coreType) return ((";
1276
  protected final String TEXT_1258 = NL + "\t}" + NL;
1276
  protected final String TEXT_1259 = ".InternalMapView";
1277
  protected final String TEXT_1259 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1277
  protected final String TEXT_1260 = ")";
1278
  protected final String TEXT_1260 = NL + "\t@Override";
1278
  protected final String TEXT_1261 = "()).eMap();" + NL + "\t\t\t\telse return ";
1279
  protected final String TEXT_1261 = NL + "\tpublic ";
1279
  protected final String TEXT_1262 = "();";
1280
  protected final String TEXT_1262 = " eInverseRemove(";
1280
  protected final String TEXT_1263 = NL + "\t\t\t\tif (coreType) return ";
1281
  protected final String TEXT_1263 = " otherEnd, int featureID, ";
1281
  protected final String TEXT_1264 = "();" + NL + "\t\t\t\telse return ";
1282
  protected final String TEXT_1264 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1282
  protected final String TEXT_1265 = "().map();";
1283
  protected final String TEXT_1265 = ")" + NL + "\t\t{";
1283
  protected final String TEXT_1266 = NL + "\t\t\t\tif (coreType) return ((";
1284
  protected final String TEXT_1266 = NL + "\t\t\tcase ";
1284
  protected final String TEXT_1267 = ".Internal.Wrapper)";
1285
  protected final String TEXT_1267 = ":";
1285
  protected final String TEXT_1268 = "()).featureMap();" + NL + "\t\t\t\treturn ";
1286
  protected final String TEXT_1268 = NL + "\t\t\t\treturn ((";
1286
  protected final String TEXT_1269 = "();";
1287
  protected final String TEXT_1269 = ")((";
1287
  protected final String TEXT_1270 = NL + "\t\t\t\tif (coreType) return ";
1288
  protected final String TEXT_1270 = ".InternalMapView";
1288
  protected final String TEXT_1271 = "();" + NL + "\t\t\t\treturn ((";
1289
  protected final String TEXT_1271 = ")";
1289
  protected final String TEXT_1272 = ".Internal)";
1290
  protected final String TEXT_1272 = "()).eMap()).basicRemove(otherEnd, msgs);";
1290
  protected final String TEXT_1273 = "()).getWrapper();";
1291
  protected final String TEXT_1273 = NL + "\t\t\t\treturn ((";
1291
  protected final String TEXT_1274 = NL + "\t\t\t\treturn ";
1292
  protected final String TEXT_1274 = ")((";
1292
  protected final String TEXT_1275 = "();";
1293
  protected final String TEXT_1275 = ".Internal.Wrapper)";
1293
  protected final String TEXT_1276 = NL + "\t\t}";
1294
  protected final String TEXT_1276 = "()).featureMap()).basicRemove(otherEnd, msgs);";
1294
  protected final String TEXT_1277 = NL + "\t\treturn super.eGet(featureID, resolve, coreType);";
1295
  protected final String TEXT_1277 = NL + "\t\t\t\treturn ((";
1295
  protected final String TEXT_1278 = NL + "\t\treturn eDynamicGet(featureID, resolve, coreType);";
1296
  protected final String TEXT_1278 = ")";
1296
  protected final String TEXT_1279 = NL + "\t}" + NL;
1297
  protected final String TEXT_1279 = "()).basicRemove(otherEnd, msgs);";
1297
  protected final String TEXT_1280 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1298
  protected final String TEXT_1280 = NL + "\t\t\t\treturn eBasicSetContainer(null, ";
1298
  protected final String TEXT_1281 = NL + "\t@SuppressWarnings(\"unchecked\")";
1299
  protected final String TEXT_1281 = ", msgs);";
1299
  protected final String TEXT_1282 = NL + "\t@Override";
1300
  protected final String TEXT_1282 = NL + "\t\t\t\treturn basicUnset";
1300
  protected final String TEXT_1283 = NL + "\tpublic void eSet(int featureID, Object newValue)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1301
  protected final String TEXT_1283 = "(msgs);";
1301
  protected final String TEXT_1284 = ")" + NL + "\t\t{";
1302
  protected final String TEXT_1284 = NL + "\t\t\t\treturn basicSet";
1302
  protected final String TEXT_1285 = NL + "\t\t\tcase ";
1303
  protected final String TEXT_1285 = "(null, msgs);";
1303
  protected final String TEXT_1286 = ":";
1304
  protected final String TEXT_1286 = NL + "\t\t}";
1304
  protected final String TEXT_1287 = NL + "\t\t\t\t((";
1305
  protected final String TEXT_1287 = NL + "\t\treturn super.eInverseRemove(otherEnd, featureID, msgs);";
1305
  protected final String TEXT_1288 = ".Internal)((";
1306
  protected final String TEXT_1288 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, featureID, msgs);";
1306
  protected final String TEXT_1289 = ".Internal.Wrapper)";
1307
  protected final String TEXT_1289 = NL + "\t}" + NL;
1307
  protected final String TEXT_1290 = "()).featureMap()).set(newValue);";
1308
  protected final String TEXT_1290 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1308
  protected final String TEXT_1291 = NL + "\t\t\t\t((";
1309
  protected final String TEXT_1291 = NL + "\t@Override";
1309
  protected final String TEXT_1292 = ".Internal)";
1310
  protected final String TEXT_1292 = NL + "\tpublic ";
1310
  protected final String TEXT_1293 = "()).set(newValue);";
1311
  protected final String TEXT_1293 = " eBasicRemoveFromContainerFeature(";
1311
  protected final String TEXT_1294 = NL + "\t\t\t\t((";
1312
  protected final String TEXT_1294 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID()";
1312
  protected final String TEXT_1295 = ".Setting)((";
1313
  protected final String TEXT_1295 = ")" + NL + "\t\t{";
1313
  protected final String TEXT_1296 = ".InternalMapView";
1314
  protected final String TEXT_1296 = NL + "\t\t\tcase ";
1314
  protected final String TEXT_1297 = ")";
1315
  protected final String TEXT_1297 = ":" + NL + "\t\t\t\treturn eInternalContainer().eInverseRemove(this, ";
1315
  protected final String TEXT_1298 = "()).eMap()).set(newValue);";
1316
  protected final String TEXT_1298 = ", ";
1316
  protected final String TEXT_1299 = NL + "\t\t\t\t((";
1317
  protected final String TEXT_1299 = ".class, msgs);";
1317
  protected final String TEXT_1300 = ".Setting)";
1318
  protected final String TEXT_1300 = NL + "\t\t}";
1318
  protected final String TEXT_1301 = "()).set(newValue);";
1319
  protected final String TEXT_1301 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(msgs);";
1319
  protected final String TEXT_1302 = NL + "\t\t\t\t";
1320
  protected final String TEXT_1302 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(msgs);";
1320
  protected final String TEXT_1303 = "().clear();" + NL + "\t\t\t\t";
1321
  protected final String TEXT_1303 = NL + "\t}" + NL;
1321
  protected final String TEXT_1304 = "().addAll((";
1322
  protected final String TEXT_1304 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1322
  protected final String TEXT_1305 = "<? extends ";
1323
  protected final String TEXT_1305 = NL + "\t@Override";
1323
  protected final String TEXT_1306 = ">";
1324
  protected final String TEXT_1306 = NL + "\tpublic Object eGet(int featureID, boolean resolve, boolean coreType)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1324
  protected final String TEXT_1307 = ")newValue);";
1325
  protected final String TEXT_1307 = ")" + NL + "\t\t{";
1325
  protected final String TEXT_1308 = NL + "\t\t\t\tset";
1326
  protected final String TEXT_1308 = NL + "\t\t\tcase ";
1326
  protected final String TEXT_1309 = "(((";
1327
  protected final String TEXT_1309 = ":";
1327
  protected final String TEXT_1310 = ")newValue).";
1328
  protected final String TEXT_1310 = NL + "\t\t\t\treturn ";
1328
  protected final String TEXT_1311 = "());";
1329
  protected final String TEXT_1311 = "();";
1329
  protected final String TEXT_1312 = NL + "\t\t\t\tset";
1330
  protected final String TEXT_1312 = NL + "\t\t\t\treturn ";
1330
  protected final String TEXT_1313 = "(";
1331
  protected final String TEXT_1313 = "() ? Boolean.TRUE : Boolean.FALSE;";
1331
  protected final String TEXT_1314 = "(";
1332
  protected final String TEXT_1314 = NL + "\t\t\t\treturn new ";
1332
  protected final String TEXT_1315 = ")";
1333
  protected final String TEXT_1315 = "(";
1333
  protected final String TEXT_1316 = "newValue);";
1334
  protected final String TEXT_1316 = "());";
1334
  protected final String TEXT_1317 = NL + "\t\t\t\treturn;";
1335
  protected final String TEXT_1317 = NL + "\t\t\t\tif (resolve) return ";
1335
  protected final String TEXT_1318 = NL + "\t\t}";
1336
  protected final String TEXT_1318 = "();" + NL + "\t\t\t\treturn basicGet";
1336
  protected final String TEXT_1319 = NL + "\t\tsuper.eSet(featureID, newValue);";
1337
  protected final String TEXT_1319 = "();";
1337
  protected final String TEXT_1320 = NL + "\t\teDynamicSet(featureID, newValue);";
1338
  protected final String TEXT_1320 = NL + "\t\t\t\tif (coreType) return ((";
1338
  protected final String TEXT_1321 = NL + "\t}" + NL;
1339
  protected final String TEXT_1321 = ".InternalMapView";
1339
  protected final String TEXT_1322 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1340
  protected final String TEXT_1322 = ")";
1340
  protected final String TEXT_1323 = NL + "\t@Override";
1341
  protected final String TEXT_1323 = "()).eMap();" + NL + "\t\t\t\telse return ";
1341
  protected final String TEXT_1324 = NL + "\tpublic void eUnset(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1342
  protected final String TEXT_1324 = "();";
1342
  protected final String TEXT_1325 = ")" + NL + "\t\t{";
1343
  protected final String TEXT_1325 = NL + "\t\t\t\tif (coreType) return ";
1343
  protected final String TEXT_1326 = NL + "\t\t\tcase ";
1344
  protected final String TEXT_1326 = "();" + NL + "\t\t\t\telse return ";
1344
  protected final String TEXT_1327 = ":";
1345
  protected final String TEXT_1327 = "().map();";
1345
  protected final String TEXT_1328 = NL + "\t\t\t\t((";
1346
  protected final String TEXT_1328 = NL + "\t\t\t\tif (coreType) return ((";
1346
  protected final String TEXT_1329 = ".Internal.Wrapper)";
1347
  protected final String TEXT_1329 = ".Internal.Wrapper)";
1347
  protected final String TEXT_1330 = "()).featureMap().clear();";
1348
  protected final String TEXT_1330 = "()).featureMap();" + NL + "\t\t\t\treturn ";
1348
  protected final String TEXT_1331 = NL + "\t\t\t\t";
1349
  protected final String TEXT_1331 = "();";
1349
  protected final String TEXT_1332 = "().clear();";
1350
  protected final String TEXT_1332 = NL + "\t\t\t\tif (coreType) return ";
1350
  protected final String TEXT_1333 = NL + "\t\t\t\tunset";
1351
  protected final String TEXT_1333 = "();" + NL + "\t\t\t\treturn ((";
1351
  protected final String TEXT_1334 = "();";
1352
  protected final String TEXT_1334 = ".Internal)";
1352
  protected final String TEXT_1335 = NL + "\t\t\t\tset";
1353
  protected final String TEXT_1335 = "()).getWrapper();";
1353
  protected final String TEXT_1336 = "((";
1354
  protected final String TEXT_1336 = NL + "\t\t\t\treturn ";
1354
  protected final String TEXT_1337 = ")null);";
1355
  protected final String TEXT_1337 = "();";
1355
  protected final String TEXT_1338 = NL + "\t\t\t\tset";
1356
  protected final String TEXT_1338 = NL + "\t\t}";
1356
  protected final String TEXT_1339 = "(";
1357
  protected final String TEXT_1339 = NL + "\t\treturn super.eGet(featureID, resolve, coreType);";
1357
  protected final String TEXT_1340 = ");";
1358
  protected final String TEXT_1340 = NL + "\t\treturn eDynamicGet(featureID, resolve, coreType);";
1358
  protected final String TEXT_1341 = NL + "\t\t\t\treturn;";
1359
  protected final String TEXT_1341 = NL + "\t}" + NL;
1359
  protected final String TEXT_1342 = NL + "\t\t}";
1360
  protected final String TEXT_1342 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1360
  protected final String TEXT_1343 = NL + "\t\tsuper.eUnset(featureID);";
1361
  protected final String TEXT_1343 = NL + "\t@SuppressWarnings(\"unchecked\")";
1361
  protected final String TEXT_1344 = NL + "\t\teDynamicUnset(featureID);";
1362
  protected final String TEXT_1344 = NL + "\t@Override";
1362
  protected final String TEXT_1345 = NL + "\t}" + NL;
1363
  protected final String TEXT_1345 = NL + "\tpublic void eSet(int featureID, Object newValue)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1363
  protected final String TEXT_1346 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1364
  protected final String TEXT_1346 = ")" + NL + "\t\t{";
1364
  protected final String TEXT_1347 = NL + "\t@SuppressWarnings(\"unchecked\")";
1365
  protected final String TEXT_1347 = NL + "\t\t\tcase ";
1365
  protected final String TEXT_1348 = NL + "\t@Override";
1366
  protected final String TEXT_1348 = ":";
1366
  protected final String TEXT_1349 = NL + "\tpublic boolean eIsSet(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1367
  protected final String TEXT_1349 = NL + "\t\t\t\t((";
1367
  protected final String TEXT_1350 = ")" + NL + "\t\t{";
1368
  protected final String TEXT_1350 = ".Internal)((";
1368
  protected final String TEXT_1351 = NL + "\t\t\tcase ";
1369
  protected final String TEXT_1351 = ".Internal.Wrapper)";
1369
  protected final String TEXT_1352 = ":";
1370
  protected final String TEXT_1352 = "()).featureMap()).set(newValue);";
1370
  protected final String TEXT_1353 = NL + "\t\t\t\treturn !((";
1371
  protected final String TEXT_1353 = NL + "\t\t\t\t((";
1371
  protected final String TEXT_1354 = ".Internal.Wrapper)";
1372
  protected final String TEXT_1354 = ".Internal)";
1372
  protected final String TEXT_1355 = "()).featureMap().isEmpty();";
1373
  protected final String TEXT_1355 = "()).set(newValue);";
1373
  protected final String TEXT_1356 = NL + "\t\t\t\treturn ";
1374
  protected final String TEXT_1356 = NL + "\t\t\t\t((";
1374
  protected final String TEXT_1357 = " != null && !";
1375
  protected final String TEXT_1357 = ".Setting)((";
1375
  protected final String TEXT_1358 = ".featureMap().isEmpty();";
1376
  protected final String TEXT_1358 = ".InternalMapView";
1376
  protected final String TEXT_1359 = NL + "\t\t\t\treturn ";
1377
  protected final String TEXT_1359 = ")";
1377
  protected final String TEXT_1360 = " != null && !";
1378
  protected final String TEXT_1360 = "()).eMap()).set(newValue);";
1378
  protected final String TEXT_1361 = ".isEmpty();";
1379
  protected final String TEXT_1361 = NL + "\t\t\t\t((";
1379
  protected final String TEXT_1362 = NL + "\t\t\t\t";
1380
  protected final String TEXT_1362 = ".Setting)";
1380
  protected final String TEXT_1363 = " ";
1381
  protected final String TEXT_1363 = "()).set(newValue);";
1381
  protected final String TEXT_1364 = " = (";
1382
  protected final String TEXT_1364 = NL + "\t\t\t\t";
1382
  protected final String TEXT_1365 = ")eVirtualGet(";
1383
  protected final String TEXT_1365 = "().clear();" + NL + "\t\t\t\t";
1383
  protected final String TEXT_1366 = ");" + NL + "\t\t\t\treturn ";
1384
  protected final String TEXT_1366 = "().addAll((";
1384
  protected final String TEXT_1367 = " != null && !";
1385
  protected final String TEXT_1367 = "<? extends ";
1385
  protected final String TEXT_1368 = ".isEmpty();";
1386
  protected final String TEXT_1368 = ">";
1386
  protected final String TEXT_1369 = NL + "\t\t\t\treturn !";
1387
  protected final String TEXT_1369 = ")newValue);";
1387
  protected final String TEXT_1370 = "().isEmpty();";
1388
  protected final String TEXT_1370 = NL + "\t\t\t\tset";
1388
  protected final String TEXT_1371 = NL + "\t\t\t\treturn isSet";
1389
  protected final String TEXT_1371 = "(((";
1389
  protected final String TEXT_1372 = "();";
1390
  protected final String TEXT_1372 = ")newValue).";
1390
  protected final String TEXT_1373 = NL + "\t\t\t\treturn ";
1391
  protected final String TEXT_1373 = "());";
1391
  protected final String TEXT_1374 = " != null;";
1392
  protected final String TEXT_1374 = NL + "\t\t\t\tset";
1392
  protected final String TEXT_1375 = NL + "\t\t\t\treturn eVirtualGet(";
1393
  protected final String TEXT_1375 = "(";
1393
  protected final String TEXT_1376 = ") != null;";
1394
  protected final String TEXT_1376 = "(";
1394
  protected final String TEXT_1377 = NL + "\t\t\t\treturn basicGet";
1395
  protected final String TEXT_1377 = ")";
1395
  protected final String TEXT_1378 = "() != null;";
1396
  protected final String TEXT_1378 = "newValue);";
1396
  protected final String TEXT_1379 = NL + "\t\t\t\treturn ";
1397
  protected final String TEXT_1379 = NL + "\t\t\t\treturn;";
1397
  protected final String TEXT_1380 = " != null;";
1398
  protected final String TEXT_1380 = NL + "\t\t}";
1398
  protected final String TEXT_1381 = NL + "\t\t\t\treturn eVirtualGet(";
1399
  protected final String TEXT_1381 = NL + "\t\tsuper.eSet(featureID, newValue);";
1399
  protected final String TEXT_1382 = ") != null;";
1400
  protected final String TEXT_1382 = NL + "\t\teDynamicSet(featureID, newValue);";
1400
  protected final String TEXT_1383 = NL + "\t\t\t\treturn ";
1401
  protected final String TEXT_1383 = NL + "\t}" + NL;
1401
  protected final String TEXT_1384 = "() != null;";
1402
  protected final String TEXT_1384 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1402
  protected final String TEXT_1385 = NL + "\t\t\t\treturn ((";
1403
  protected final String TEXT_1385 = NL + "\t@Override";
1403
  protected final String TEXT_1386 = " & ";
1404
  protected final String TEXT_1386 = NL + "\tpublic void eUnset(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1404
  protected final String TEXT_1387 = "_EFLAG) != 0) != ";
1405
  protected final String TEXT_1387 = ")" + NL + "\t\t{";
1405
  protected final String TEXT_1388 = ";";
1406
  protected final String TEXT_1388 = NL + "\t\t\tcase ";
1406
  protected final String TEXT_1389 = NL + "\t\t\t\treturn (";
1407
  protected final String TEXT_1389 = ":";
1407
  protected final String TEXT_1390 = " & ";
1408
  protected final String TEXT_1390 = NL + "\t\t\t\t((";
1408
  protected final String TEXT_1391 = "_EFLAG) != ";
1409
  protected final String TEXT_1391 = ".Internal.Wrapper)";
1409
  protected final String TEXT_1392 = "_EFLAG_DEFAULT;";
1410
  protected final String TEXT_1392 = "()).featureMap().clear();";
1410
  protected final String TEXT_1393 = NL + "\t\t\t\treturn ";
1411
  protected final String TEXT_1393 = NL + "\t\t\t\t";
1411
  protected final String TEXT_1394 = " != ";
1412
  protected final String TEXT_1394 = "().clear();";
1412
  protected final String TEXT_1395 = ";";
1413
  protected final String TEXT_1395 = NL + "\t\t\t\tunset";
1413
  protected final String TEXT_1396 = NL + "\t\t\t\treturn eVirtualGet(";
1414
  protected final String TEXT_1396 = "();";
1414
  protected final String TEXT_1397 = ", ";
1415
  protected final String TEXT_1397 = NL + "\t\t\t\tset";
1415
  protected final String TEXT_1398 = ") != ";
1416
  protected final String TEXT_1398 = "((";
1416
  protected final String TEXT_1399 = ";";
1417
  protected final String TEXT_1399 = ")null);";
1417
  protected final String TEXT_1400 = NL + "\t\t\t\treturn ";
1418
  protected final String TEXT_1400 = NL + "\t\t\t\tset";
1418
  protected final String TEXT_1401 = "() != ";
1419
  protected final String TEXT_1401 = "(";
1419
  protected final String TEXT_1402 = ";";
1420
  protected final String TEXT_1402 = ");";
1420
  protected final String TEXT_1403 = NL + "\t\t\t\treturn ";
1421
  protected final String TEXT_1403 = NL + "\t\t\t\treturn;";
1421
  protected final String TEXT_1404 = " == null ? ";
1422
  protected final String TEXT_1404 = NL + "\t\t}";
1422
  protected final String TEXT_1405 = " != null : !";
1423
  protected final String TEXT_1405 = NL + "\t\tsuper.eUnset(featureID);";
1423
  protected final String TEXT_1406 = ".equals(";
1424
  protected final String TEXT_1406 = NL + "\t\teDynamicUnset(featureID);";
1424
  protected final String TEXT_1407 = ");";
1425
  protected final String TEXT_1407 = NL + "\t}" + NL;
1425
  protected final String TEXT_1408 = NL + "\t\t\t\t";
1426
  protected final String TEXT_1408 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1426
  protected final String TEXT_1409 = " ";
1427
  protected final String TEXT_1409 = NL + "\t@SuppressWarnings(\"unchecked\")";
1427
  protected final String TEXT_1410 = " = (";
1428
  protected final String TEXT_1410 = NL + "\t@Override";
1428
  protected final String TEXT_1411 = ")eVirtualGet(";
1429
  protected final String TEXT_1411 = NL + "\tpublic boolean eIsSet(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1429
  protected final String TEXT_1412 = ", ";
1430
  protected final String TEXT_1412 = ")" + NL + "\t\t{";
1430
  protected final String TEXT_1413 = ");" + NL + "\t\t\t\treturn ";
1431
  protected final String TEXT_1413 = NL + "\t\t\tcase ";
1431
  protected final String TEXT_1414 = " == null ? ";
1432
  protected final String TEXT_1414 = ":";
1432
  protected final String TEXT_1415 = " != null : !";
1433
  protected final String TEXT_1415 = NL + "\t\t\t\treturn !((";
1433
  protected final String TEXT_1416 = ".equals(";
1434
  protected final String TEXT_1416 = ".Internal.Wrapper)";
1434
  protected final String TEXT_1417 = ");";
1435
  protected final String TEXT_1417 = "()).featureMap().isEmpty();";
1435
  protected final String TEXT_1418 = NL + "\t\t\t\treturn ";
1436
  protected final String TEXT_1418 = NL + "\t\t\t\treturn ";
1436
  protected final String TEXT_1419 = " == null ? ";
1437
  protected final String TEXT_1419 = " != null && !";
1437
  protected final String TEXT_1420 = "() != null : !";
1438
  protected final String TEXT_1420 = ".featureMap().isEmpty();";
1438
  protected final String TEXT_1421 = ".equals(";
1439
  protected final String TEXT_1421 = NL + "\t\t\t\treturn ";
1439
  protected final String TEXT_1422 = "());";
1440
  protected final String TEXT_1422 = " != null && !";
1440
  protected final String TEXT_1423 = NL + "\t\t}";
1441
  protected final String TEXT_1423 = ".isEmpty();";
1441
  protected final String TEXT_1424 = NL + "\t\treturn super.eIsSet(featureID);";
1442
  protected final String TEXT_1424 = NL + "\t\t\t\t";
1442
  protected final String TEXT_1425 = NL + "\t\treturn eDynamicIsSet(featureID);";
1443
  protected final String TEXT_1425 = " ";
1443
  protected final String TEXT_1426 = NL + "\t}" + NL;
1444
  protected final String TEXT_1426 = " = (";
1444
  protected final String TEXT_1427 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1445
  protected final String TEXT_1427 = ")eVirtualGet(";
1445
  protected final String TEXT_1428 = NL + "\t@Override";
1446
  protected final String TEXT_1428 = ");" + NL + "\t\t\t\treturn ";
1446
  protected final String TEXT_1429 = NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class";
1447
  protected final String TEXT_1429 = " != null && !";
1447
  protected final String TEXT_1430 = " baseClass)" + NL + "\t{";
1448
  protected final String TEXT_1430 = ".isEmpty();";
1448
  protected final String TEXT_1431 = NL + "\t\tif (baseClass == ";
1449
  protected final String TEXT_1431 = NL + "\t\t\t\treturn !";
1449
  protected final String TEXT_1432 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID";
1450
  protected final String TEXT_1432 = "().isEmpty();";
1450
  protected final String TEXT_1433 = ")" + NL + "\t\t\t{";
1451
  protected final String TEXT_1433 = NL + "\t\t\t\treturn isSet";
1451
  protected final String TEXT_1434 = NL + "\t\t\t\tcase ";
1452
  protected final String TEXT_1434 = "();";
1452
  protected final String TEXT_1435 = ": return ";
1453
  protected final String TEXT_1435 = NL + "\t\t\t\treturn ";
1453
  protected final String TEXT_1436 = ";";
1454
  protected final String TEXT_1436 = " != null;";
1454
  protected final String TEXT_1437 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1455
  protected final String TEXT_1437 = NL + "\t\t\t\treturn eVirtualGet(";
1455
  protected final String TEXT_1438 = NL + "\t\treturn super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);" + NL + "\t}";
1456
  protected final String TEXT_1438 = ") != null;";
1456
  protected final String TEXT_1439 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1457
  protected final String TEXT_1439 = NL + "\t\t\t\treturn basicGet";
1457
  protected final String TEXT_1440 = NL + "\t@Override";
1458
  protected final String TEXT_1440 = "() != null;";
1458
  protected final String TEXT_1441 = NL + "\tpublic int eDerivedStructuralFeatureID(int baseFeatureID, Class";
1459
  protected final String TEXT_1441 = NL + "\t\t\t\treturn ";
1459
  protected final String TEXT_1442 = " baseClass)" + NL + "\t{";
1460
  protected final String TEXT_1442 = " != null;";
1460
  protected final String TEXT_1443 = NL + "\t\tif (baseClass == ";
1461
  protected final String TEXT_1443 = NL + "\t\t\t\treturn eVirtualGet(";
1461
  protected final String TEXT_1444 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{";
1462
  protected final String TEXT_1444 = ") != null;";
1462
  protected final String TEXT_1445 = NL + "\t\t\t\tcase ";
1463
  protected final String TEXT_1445 = NL + "\t\t\t\treturn ";
1463
  protected final String TEXT_1446 = ": return ";
1464
  protected final String TEXT_1446 = "() != null;";
1464
  protected final String TEXT_1447 = ";";
1465
  protected final String TEXT_1447 = NL + "\t\t\t\treturn ((";
1465
  protected final String TEXT_1448 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1466
  protected final String TEXT_1448 = " & ";
1466
  protected final String TEXT_1449 = NL + "\t\tif (baseClass == ";
1467
  protected final String TEXT_1449 = "_EFLAG) != 0) != ";
1467
  protected final String TEXT_1450 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID";
1468
  protected final String TEXT_1450 = ";";
1468
  protected final String TEXT_1451 = ")" + NL + "\t\t\t{";
1469
  protected final String TEXT_1451 = NL + "\t\t\t\treturn (";
1469
  protected final String TEXT_1452 = NL + "\t\t\t\tcase ";
1470
  protected final String TEXT_1452 = " & ";
1470
  protected final String TEXT_1453 = ": return ";
1471
  protected final String TEXT_1453 = "_EFLAG) != ";
1471
  protected final String TEXT_1454 = ";";
1472
  protected final String TEXT_1454 = "_EFLAG_DEFAULT;";
1472
  protected final String TEXT_1455 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1473
  protected final String TEXT_1455 = NL + "\t\t\t\treturn ";
1473
  protected final String TEXT_1456 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL;
1474
  protected final String TEXT_1456 = " != ";
1474
  protected final String TEXT_1457 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1475
  protected final String TEXT_1457 = ";";
1475
  protected final String TEXT_1458 = NL + "\t@Override";
1476
  protected final String TEXT_1458 = NL + "\t\t\t\treturn eVirtualGet(";
1476
  protected final String TEXT_1459 = NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn ";
1477
  protected final String TEXT_1459 = ", ";
1477
  protected final String TEXT_1460 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1478
  protected final String TEXT_1460 = ") != ";
1478
  protected final String TEXT_1461 = NL + "\t@Override";
1479
  protected final String TEXT_1461 = ";";
1479
  protected final String TEXT_1462 = NL + "\tprotected void eSetVirtualValues(Object[] newValues)" + NL + "\t{" + NL + "\t\t";
1480
  protected final String TEXT_1462 = NL + "\t\t\t\treturn ";
1480
  protected final String TEXT_1463 = " = newValues;" + NL + "\t}" + NL;
1481
  protected final String TEXT_1463 = "() != ";
1481
  protected final String TEXT_1464 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1482
  protected final String TEXT_1464 = ";";
1482
  protected final String TEXT_1465 = NL + "\t@Override";
1483
  protected final String TEXT_1465 = NL + "\t\t\t\treturn ";
1483
  protected final String TEXT_1466 = NL + "\tprotected int eVirtualIndexBits(int offset)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
1484
  protected final String TEXT_1466 = " == null ? ";
1484
  protected final String TEXT_1467 = NL + "\t\t\tcase ";
1485
  protected final String TEXT_1467 = " != null : !";
1485
  protected final String TEXT_1468 = " :" + NL + "\t\t\t\treturn ";
1486
  protected final String TEXT_1468 = ".equals(";
1486
  protected final String TEXT_1469 = ";";
1487
  protected final String TEXT_1469 = ");";
1487
  protected final String TEXT_1470 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1488
  protected final String TEXT_1470 = NL + "\t\t\t\t";
1488
  protected final String TEXT_1471 = NL + "\t@Override";
1489
  protected final String TEXT_1471 = " ";
1489
  protected final String TEXT_1472 = NL + "\tprotected void eSetVirtualIndexBits(int offset, int newIndexBits)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
1490
  protected final String TEXT_1472 = " = (";
1490
  protected final String TEXT_1473 = NL + "\t\t\tcase ";
1491
  protected final String TEXT_1473 = ")eVirtualGet(";
1491
  protected final String TEXT_1474 = " :" + NL + "\t\t\t\t";
1492
  protected final String TEXT_1474 = ", ";
1492
  protected final String TEXT_1475 = " = newIndexBits;" + NL + "\t\t\t\tbreak;";
1493
  protected final String TEXT_1475 = ");" + NL + "\t\t\t\treturn ";
1493
  protected final String TEXT_1476 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL;
1494
  protected final String TEXT_1476 = " == null ? ";
1494
  protected final String TEXT_1477 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1495
  protected final String TEXT_1477 = " != null : !";
1495
  protected final String TEXT_1478 = NL + "\t@Override";
1496
  protected final String TEXT_1478 = ".equals(";
1496
  protected final String TEXT_1479 = NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (eIsProxy()) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());";
1497
  protected final String TEXT_1479 = ");";
1497
  protected final String TEXT_1480 = NL + "\t\tresult.append(\" (";
1498
  protected final String TEXT_1480 = NL + "\t\t\t\treturn ";
1498
  protected final String TEXT_1481 = ": \");";
1499
  protected final String TEXT_1481 = " == null ? ";
1499
  protected final String TEXT_1482 = NL + "\t\tresult.append(\", ";
1500
  protected final String TEXT_1482 = "() != null : !";
1500
  protected final String TEXT_1483 = ": \");";
1501
  protected final String TEXT_1483 = ".equals(";
1501
  protected final String TEXT_1484 = NL + "\t\tif (eVirtualIsSet(";
1502
  protected final String TEXT_1484 = "());";
1502
  protected final String TEXT_1485 = ")) result.append(eVirtualGet(";
1503
  protected final String TEXT_1485 = NL + "\t\t}";
1503
  protected final String TEXT_1486 = ")); else result.append(\"<unset>\");";
1504
  protected final String TEXT_1486 = NL + "\t\treturn super.eIsSet(featureID);";
1504
  protected final String TEXT_1487 = NL + "\t\tif (";
1505
  protected final String TEXT_1487 = NL + "\t\treturn eDynamicIsSet(featureID);";
1505
  protected final String TEXT_1488 = "(";
1506
  protected final String TEXT_1488 = NL + "\t}" + NL;
1506
  protected final String TEXT_1489 = " & ";
1507
  protected final String TEXT_1489 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1507
  protected final String TEXT_1490 = "_ESETFLAG) != 0";
1508
  protected final String TEXT_1490 = NL + "\t@Override";
1508
  protected final String TEXT_1491 = "ESet";
1509
  protected final String TEXT_1491 = NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class";
1509
  protected final String TEXT_1492 = ") result.append((";
1510
  protected final String TEXT_1492 = " baseClass)" + NL + "\t{";
1510
  protected final String TEXT_1493 = " & ";
1511
  protected final String TEXT_1493 = NL + "\t\tif (baseClass == ";
1511
  protected final String TEXT_1494 = "_EFLAG) != 0); else result.append(\"<unset>\");";
1512
  protected final String TEXT_1494 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID";
1512
  protected final String TEXT_1495 = NL + "\t\tif (";
1513
  protected final String TEXT_1495 = ")" + NL + "\t\t\t{";
1513
  protected final String TEXT_1496 = "(";
1514
  protected final String TEXT_1496 = NL + "\t\t\t\tcase ";
1514
  protected final String TEXT_1497 = " & ";
1515
  protected final String TEXT_1497 = ": return ";
1515
  protected final String TEXT_1498 = "_ESETFLAG) != 0";
1516
  protected final String TEXT_1498 = ";";
1516
  protected final String TEXT_1499 = "ESet";
1517
  protected final String TEXT_1499 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1517
  protected final String TEXT_1500 = ") result.append(";
1518
  protected final String TEXT_1500 = NL + "\t\treturn super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);" + NL + "\t}";
1518
  protected final String TEXT_1501 = "_EFLAG_VALUES[(";
1519
  protected final String TEXT_1501 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1519
  protected final String TEXT_1502 = " & ";
1520
  protected final String TEXT_1502 = NL + "\t@Override";
1520
  protected final String TEXT_1503 = "_EFLAG) >>> ";
1521
  protected final String TEXT_1503 = NL + "\tpublic int eDerivedStructuralFeatureID(int baseFeatureID, Class";
1521
  protected final String TEXT_1504 = "_EFLAG_OFFSET]); else result.append(\"<unset>\");";
1522
  protected final String TEXT_1504 = " baseClass)" + NL + "\t{";
1522
  protected final String TEXT_1505 = NL + "\t\tif (";
1523
  protected final String TEXT_1505 = NL + "\t\tif (baseClass == ";
1523
  protected final String TEXT_1506 = "(";
1524
  protected final String TEXT_1506 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{";
1524
  protected final String TEXT_1507 = " & ";
1525
  protected final String TEXT_1507 = NL + "\t\t\t\tcase ";
1525
  protected final String TEXT_1508 = "_ESETFLAG) != 0";
1526
  protected final String TEXT_1508 = ": return ";
1526
  protected final String TEXT_1509 = "ESet";
1527
  protected final String TEXT_1509 = ";";
1527
  protected final String TEXT_1510 = ") result.append(";
1528
  protected final String TEXT_1510 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1528
  protected final String TEXT_1511 = "); else result.append(\"<unset>\");";
1529
  protected final String TEXT_1511 = NL + "\t\tif (baseClass == ";
1529
  protected final String TEXT_1512 = NL + "\t\tresult.append(eVirtualGet(";
1530
  protected final String TEXT_1512 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID";
1530
  protected final String TEXT_1513 = ", ";
1531
  protected final String TEXT_1513 = ")" + NL + "\t\t\t{";
1531
  protected final String TEXT_1514 = "));";
1532
  protected final String TEXT_1514 = NL + "\t\t\t\tcase ";
1532
  protected final String TEXT_1515 = NL + "\t\tresult.append((";
1533
  protected final String TEXT_1515 = ": return ";
1533
  protected final String TEXT_1516 = " & ";
1534
  protected final String TEXT_1516 = ";";
1534
  protected final String TEXT_1517 = "_EFLAG) != 0);";
1535
  protected final String TEXT_1517 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1535
  protected final String TEXT_1518 = NL + "\t\tresult.append(";
1536
  protected final String TEXT_1518 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL;
1536
  protected final String TEXT_1519 = "_EFLAG_VALUES[(";
1537
  protected final String TEXT_1519 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1537
  protected final String TEXT_1520 = " & ";
1538
  protected final String TEXT_1520 = NL + "\t@Override";
1538
  protected final String TEXT_1521 = "_EFLAG) >>> ";
1539
  protected final String TEXT_1521 = NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn ";
1539
  protected final String TEXT_1522 = "_EFLAG_OFFSET]);";
1540
  protected final String TEXT_1522 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1540
  protected final String TEXT_1523 = NL + "\t\tresult.append(";
1541
  protected final String TEXT_1523 = NL + "\t@Override";
1541
  protected final String TEXT_1524 = ");";
1542
  protected final String TEXT_1524 = NL + "\tprotected void eSetVirtualValues(Object[] newValues)" + NL + "\t{" + NL + "\t\t";
1542
  protected final String TEXT_1525 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL;
1543
  protected final String TEXT_1525 = " = newValues;" + NL + "\t}" + NL;
1543
  protected final String TEXT_1526 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int hash = -1;" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getHash()" + NL + "\t{" + NL + "\t\tif (hash == -1)" + NL + "\t\t{" + NL + "\t\t\t";
1544
  protected final String TEXT_1526 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1544
  protected final String TEXT_1527 = " theKey = getKey();" + NL + "\t\t\thash = (theKey == null ? 0 : theKey.hashCode());" + NL + "\t\t}" + NL + "\t\treturn hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setHash(int hash)" + NL + "\t{" + NL + "\t\tthis.hash = hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1545
  protected final String TEXT_1527 = NL + "\t@Override";
1545
  protected final String TEXT_1528 = " getKey()" + NL + "\t{";
1546
  protected final String TEXT_1528 = NL + "\tprotected int eVirtualIndexBits(int offset)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
1546
  protected final String TEXT_1529 = NL + "\t\treturn new ";
1547
  protected final String TEXT_1529 = NL + "\t\t\tcase ";
1547
  protected final String TEXT_1530 = "(getTypedKey());";
1548
  protected final String TEXT_1530 = " :" + NL + "\t\t\t\treturn ";
1548
  protected final String TEXT_1531 = NL + "\t\treturn getTypedKey();";
1549
  protected final String TEXT_1531 = ";";
1549
  protected final String TEXT_1532 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setKey(";
1550
  protected final String TEXT_1532 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1550
  protected final String TEXT_1533 = " key)" + NL + "\t{";
1551
  protected final String TEXT_1533 = NL + "\t@Override";
1551
  protected final String TEXT_1534 = NL + "\t\tgetTypedKey().addAll(";
1552
  protected final String TEXT_1534 = NL + "\tprotected void eSetVirtualIndexBits(int offset, int newIndexBits)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
1552
  protected final String TEXT_1535 = "(";
1553
  protected final String TEXT_1535 = NL + "\t\t\tcase ";
1553
  protected final String TEXT_1536 = ")";
1554
  protected final String TEXT_1536 = " :" + NL + "\t\t\t\t";
1554
  protected final String TEXT_1537 = "key);";
1555
  protected final String TEXT_1537 = " = newIndexBits;" + NL + "\t\t\t\tbreak;";
1555
  protected final String TEXT_1538 = NL + "\t\tsetTypedKey(key);";
1556
  protected final String TEXT_1538 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL;
1556
  protected final String TEXT_1539 = NL + "\t\tsetTypedKey(((";
1557
  protected final String TEXT_1539 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1557
  protected final String TEXT_1540 = ")key).";
1558
  protected final String TEXT_1540 = NL + "\t@Override";
1558
  protected final String TEXT_1541 = "());";
1559
  protected final String TEXT_1541 = NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (eIsProxy()) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());";
1559
  protected final String TEXT_1542 = NL + "\t\tsetTypedKey((";
1560
  protected final String TEXT_1542 = NL + "\t\tresult.append(\" (";
1560
  protected final String TEXT_1543 = ")key);";
1561
  protected final String TEXT_1543 = ": \");";
1561
  protected final String TEXT_1544 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1562
  protected final String TEXT_1544 = NL + "\t\tresult.append(\", ";
1562
  protected final String TEXT_1545 = " getValue()" + NL + "\t{";
1563
  protected final String TEXT_1545 = ": \");";
1563
  protected final String TEXT_1546 = NL + "\t\treturn new ";
1564
  protected final String TEXT_1546 = NL + "\t\tif (eVirtualIsSet(";
1564
  protected final String TEXT_1547 = "(getTypedValue());";
1565
  protected final String TEXT_1547 = ")) result.append(eVirtualGet(";
1565
  protected final String TEXT_1548 = NL + "\t\treturn getTypedValue();";
1566
  protected final String TEXT_1548 = ")); else result.append(\"<unset>\");";
1566
  protected final String TEXT_1549 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1567
  protected final String TEXT_1549 = NL + "\t\tif (";
1567
  protected final String TEXT_1550 = " setValue(";
1568
  protected final String TEXT_1550 = "(";
1568
  protected final String TEXT_1551 = " value)" + NL + "\t{" + NL + "\t\t";
1569
  protected final String TEXT_1551 = " & ";
1569
  protected final String TEXT_1552 = " oldValue = getValue();";
1570
  protected final String TEXT_1552 = "_ESETFLAG) != 0";
1570
  protected final String TEXT_1553 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll(";
1571
  protected final String TEXT_1553 = "ESet";
1571
  protected final String TEXT_1554 = "(";
1572
  protected final String TEXT_1554 = ") result.append((";
1572
  protected final String TEXT_1555 = ")";
1573
  protected final String TEXT_1555 = " & ";
1573
  protected final String TEXT_1556 = "value);";
1574
  protected final String TEXT_1556 = "_EFLAG) != 0); else result.append(\"<unset>\");";
1574
  protected final String TEXT_1557 = NL + "\t\tsetTypedValue(value);";
1575
  protected final String TEXT_1557 = NL + "\t\tif (";
1575
  protected final String TEXT_1558 = NL + "\t\tsetTypedValue(((";
1576
  protected final String TEXT_1558 = "(";
1576
  protected final String TEXT_1559 = ")value).";
1577
  protected final String TEXT_1559 = " & ";
1577
  protected final String TEXT_1560 = "());";
1578
  protected final String TEXT_1560 = "_ESETFLAG) != 0";
1578
  protected final String TEXT_1561 = NL + "\t\tsetTypedValue((";
1579
  protected final String TEXT_1561 = "ESet";
1579
  protected final String TEXT_1562 = ")value);";
1580
  protected final String TEXT_1562 = ") result.append(";
1580
  protected final String TEXT_1563 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1581
  protected final String TEXT_1563 = "_EFLAG_VALUES[(";
1581
  protected final String TEXT_1564 = NL + "\t@SuppressWarnings(\"unchecked\")";
1582
  protected final String TEXT_1564 = " & ";
1582
  protected final String TEXT_1565 = NL + "\tpublic ";
1583
  protected final String TEXT_1565 = "_EFLAG) >>> ";
1583
  protected final String TEXT_1566 = " getEMap()" + NL + "\t{" + NL + "\t\t";
1584
  protected final String TEXT_1566 = "_EFLAG_OFFSET]); else result.append(\"<unset>\");";
1584
  protected final String TEXT_1567 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
1585
  protected final String TEXT_1567 = NL + "\t\tif (";
1585
  protected final String TEXT_1568 = ")container.eGet(eContainmentFeature());" + NL + "\t}" + NL;
1586
  protected final String TEXT_1568 = "(";
1586
  protected final String TEXT_1569 = NL + "} //";
1587
  protected final String TEXT_1569 = " & ";
1587
  protected final String TEXT_1570 = NL;
1588
  protected final String TEXT_1570 = "_ESETFLAG) != 0";
1589
  protected final String TEXT_1571 = "ESet";
1590
  protected final String TEXT_1572 = ") result.append(";
1591
  protected final String TEXT_1573 = "); else result.append(\"<unset>\");";
1592
  protected final String TEXT_1574 = NL + "\t\tresult.append(eVirtualGet(";
1593
  protected final String TEXT_1575 = ", ";
1594
  protected final String TEXT_1576 = "));";
1595
  protected final String TEXT_1577 = NL + "\t\tresult.append((";
1596
  protected final String TEXT_1578 = " & ";
1597
  protected final String TEXT_1579 = "_EFLAG) != 0);";
1598
  protected final String TEXT_1580 = NL + "\t\tresult.append(";
1599
  protected final String TEXT_1581 = "_EFLAG_VALUES[(";
1600
  protected final String TEXT_1582 = " & ";
1601
  protected final String TEXT_1583 = "_EFLAG) >>> ";
1602
  protected final String TEXT_1584 = "_EFLAG_OFFSET]);";
1603
  protected final String TEXT_1585 = NL + "\t\tresult.append(";
1604
  protected final String TEXT_1586 = ");";
1605
  protected final String TEXT_1587 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL;
1606
  protected final String TEXT_1588 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int hash = -1;" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getHash()" + NL + "\t{" + NL + "\t\tif (hash == -1)" + NL + "\t\t{" + NL + "\t\t\t";
1607
  protected final String TEXT_1589 = " theKey = getKey();" + NL + "\t\t\thash = (theKey == null ? 0 : theKey.hashCode());" + NL + "\t\t}" + NL + "\t\treturn hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setHash(int hash)" + NL + "\t{" + NL + "\t\tthis.hash = hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1608
  protected final String TEXT_1590 = " getKey()" + NL + "\t{";
1609
  protected final String TEXT_1591 = NL + "\t\treturn new ";
1610
  protected final String TEXT_1592 = "(getTypedKey());";
1611
  protected final String TEXT_1593 = NL + "\t\treturn getTypedKey();";
1612
  protected final String TEXT_1594 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setKey(";
1613
  protected final String TEXT_1595 = " key)" + NL + "\t{";
1614
  protected final String TEXT_1596 = NL + "\t\tgetTypedKey().addAll(";
1615
  protected final String TEXT_1597 = "(";
1616
  protected final String TEXT_1598 = ")";
1617
  protected final String TEXT_1599 = "key);";
1618
  protected final String TEXT_1600 = NL + "\t\tsetTypedKey(key);";
1619
  protected final String TEXT_1601 = NL + "\t\tsetTypedKey(((";
1620
  protected final String TEXT_1602 = ")key).";
1621
  protected final String TEXT_1603 = "());";
1622
  protected final String TEXT_1604 = NL + "\t\tsetTypedKey((";
1623
  protected final String TEXT_1605 = ")key);";
1624
  protected final String TEXT_1606 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1625
  protected final String TEXT_1607 = " getValue()" + NL + "\t{";
1626
  protected final String TEXT_1608 = NL + "\t\treturn new ";
1627
  protected final String TEXT_1609 = "(getTypedValue());";
1628
  protected final String TEXT_1610 = NL + "\t\treturn getTypedValue();";
1629
  protected final String TEXT_1611 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1630
  protected final String TEXT_1612 = " setValue(";
1631
  protected final String TEXT_1613 = " value)" + NL + "\t{" + NL + "\t\t";
1632
  protected final String TEXT_1614 = " oldValue = getValue();";
1633
  protected final String TEXT_1615 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll(";
1634
  protected final String TEXT_1616 = "(";
1635
  protected final String TEXT_1617 = ")";
1636
  protected final String TEXT_1618 = "value);";
1637
  protected final String TEXT_1619 = NL + "\t\tsetTypedValue(value);";
1638
  protected final String TEXT_1620 = NL + "\t\tsetTypedValue(((";
1639
  protected final String TEXT_1621 = ")value).";
1640
  protected final String TEXT_1622 = "());";
1641
  protected final String TEXT_1623 = NL + "\t\tsetTypedValue((";
1642
  protected final String TEXT_1624 = ")value);";
1643
  protected final String TEXT_1625 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1644
  protected final String TEXT_1626 = NL + "\t@SuppressWarnings(\"unchecked\")";
1645
  protected final String TEXT_1627 = NL + "\tpublic ";
1646
  protected final String TEXT_1628 = " getEMap()" + NL + "\t{" + NL + "\t\t";
1647
  protected final String TEXT_1629 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
1648
  protected final String TEXT_1630 = ")container.eGet(eContainmentFeature());" + NL + "\t}" + NL;
1649
  protected final String TEXT_1631 = NL + "} //";
1650
  protected final String TEXT_1632 = NL;
1588
1651
1589
  public String generate(Object argument)
1652
  public String generate(Object argument)
1590
  {
1653
  {
Lines 1593-1599 Link Here
1593
/**
1656
/**
1594
 * <copyright>
1657
 * <copyright>
1595
 *
1658
 *
1596
 * Copyright (c) 2002-2007 IBM Corporation and others.
1659
 * Copyright (c) 2002-2009 IBM Corporation and others.
1597
 * All rights reserved.   This program and the accompanying materials
1660
 * All rights reserved.   This program and the accompanying materials
1598
 * are made available under the terms of the Eclipse Public License v1.0
1661
 * are made available under the terms of the Eclipse Public License v1.0
1599
 * which accompanies this distribution, and is available at
1662
 * which accompanies this distribution, and is available at
Lines 4189-5287 Link Here
4189
    }//for
4252
    }//for
4190
    }}.run();
4253
    }}.run();
4191
    for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {
4254
    for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {
4192
    if (isInterface) {
4255
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && isImplementation && genOperation.isInvariant() && genOperation.hasValidationExpression()) {
4193
    stringBuffer.append(TEXT_1106);
4256
    stringBuffer.append(TEXT_1106);
4257
    stringBuffer.append(genOperation.getName());
4194
    stringBuffer.append(TEXT_1107);
4258
    stringBuffer.append(TEXT_1107);
4195
    if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) {
4259
    stringBuffer.append(genOperation.getParameterTypes(", "));
4196
    stringBuffer.append(TEXT_1108);
4260
    stringBuffer.append(TEXT_1108);
4197
    if (genOperation.hasDocumentation()) {
4261
    stringBuffer.append(genOperation.getFormattedName());
4198
    stringBuffer.append(TEXT_1109);
4262
    stringBuffer.append(TEXT_1109);
4263
    stringBuffer.append(genOperation.getName());
4264
    stringBuffer.append(TEXT_1110);
4265
    stringBuffer.append(genOperation.getParameterTypes(", "));
4266
    stringBuffer.append(TEXT_1111);
4267
    stringBuffer.append(genModel.getImportedName("java.lang.String"));
4268
    stringBuffer.append(TEXT_1112);
4269
    stringBuffer.append(CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale()));
4270
    stringBuffer.append(genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale()));
4271
    stringBuffer.append(TEXT_1113);
4272
    stringBuffer.append(genOperation.getValidationExpression("\t\t"));
4273
    stringBuffer.append(TEXT_1114);
4274
    stringBuffer.append(genModel.getNonNLS());
4275
    stringBuffer.append(TEXT_1115);
4276
    }
4277
    if (isInterface) {
4278
    stringBuffer.append(TEXT_1116);
4279
    stringBuffer.append(TEXT_1117);
4280
    if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) {
4281
    stringBuffer.append(TEXT_1118);
4282
    if (genOperation.hasDocumentation()) {
4283
    stringBuffer.append(TEXT_1119);
4199
    stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
4284
    stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
4200
    }
4285
    }
4201
    for (GenParameter genParameter : genOperation.getGenParameters()) {
4286
    for (GenParameter genParameter : genOperation.getGenParameters()) {
4202
    if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation("");
4287
    if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation("");
4203
    if (documentation.contains("\n") || documentation.contains("\r")) {
4288
    if (documentation.contains("\n") || documentation.contains("\r")) {
4204
    stringBuffer.append(TEXT_1110);
4289
    stringBuffer.append(TEXT_1120);
4205
    stringBuffer.append(genParameter.getName());
4290
    stringBuffer.append(genParameter.getName());
4206
    stringBuffer.append(TEXT_1111);
4291
    stringBuffer.append(TEXT_1121);
4207
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4292
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4208
    } else {
4293
    } else {
4209
    stringBuffer.append(TEXT_1112);
4294
    stringBuffer.append(TEXT_1122);
4210
    stringBuffer.append(genParameter.getName());
4295
    stringBuffer.append(genParameter.getName());
4211
    stringBuffer.append(TEXT_1113);
4296
    stringBuffer.append(TEXT_1123);
4212
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4297
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4213
    }
4298
    }
4214
    }
4299
    }
4215
    }
4300
    }
4216
    stringBuffer.append(TEXT_1114);
4301
    stringBuffer.append(TEXT_1124);
4217
    }
4302
    }
4218
    if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
4303
    if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
4219
    stringBuffer.append(TEXT_1115);
4304
    stringBuffer.append(TEXT_1125);
4220
    stringBuffer.append(modelInfo);
4305
    stringBuffer.append(modelInfo);
4221
    } else {
4306
    } else {
4222
    stringBuffer.append(TEXT_1116);
4307
    stringBuffer.append(TEXT_1126);
4223
    stringBuffer.append(modelInfo);
4308
    stringBuffer.append(modelInfo);
4224
    }} if (first) {
4309
    }} if (first) {
4225
    stringBuffer.append(TEXT_1117);
4310
    stringBuffer.append(TEXT_1127);
4226
    }}
4311
    }}
4227
    stringBuffer.append(TEXT_1118);
4312
    stringBuffer.append(TEXT_1128);
4228
    //Class/genOperation.javadoc.override.javajetinc
4313
    //Class/genOperation.javadoc.override.javajetinc
4229
    } else {
4314
    } else {
4230
    stringBuffer.append(TEXT_1119);
4315
    stringBuffer.append(TEXT_1129);
4231
    if (isJDK50) { //Class/genOperation.annotations.insert.javajetinc
4316
    if (isJDK50) { //Class/genOperation.annotations.insert.javajetinc
4232
    }
4317
    }
4233
    }
4318
    }
4234
    if (!isImplementation) {
4319
    if (!isImplementation) {
4235
    stringBuffer.append(TEXT_1120);
4320
    stringBuffer.append(TEXT_1130);
4236
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4321
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4237
    stringBuffer.append(genOperation.getImportedType(genClass));
4322
    stringBuffer.append(genOperation.getImportedType(genClass));
4238
    stringBuffer.append(TEXT_1121);
4323
    stringBuffer.append(TEXT_1131);
4239
    stringBuffer.append(genOperation.getName());
4324
    stringBuffer.append(genOperation.getName());
4240
    stringBuffer.append(TEXT_1122);
4325
    stringBuffer.append(TEXT_1132);
4241
    stringBuffer.append(genOperation.getParameters(genClass));
4326
    stringBuffer.append(genOperation.getParameters(genClass));
4242
    stringBuffer.append(TEXT_1123);
4327
    stringBuffer.append(TEXT_1133);
4243
    stringBuffer.append(genOperation.getThrows(genClass));
4328
    stringBuffer.append(genOperation.getThrows(genClass));
4244
    stringBuffer.append(TEXT_1124);
4329
    stringBuffer.append(TEXT_1134);
4245
    } else {
4330
    } else {
4246
    stringBuffer.append(TEXT_1125);
4331
    stringBuffer.append(TEXT_1135);
4247
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4332
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4248
    stringBuffer.append(genOperation.getImportedType(genClass));
4333
    stringBuffer.append(genOperation.getImportedType(genClass));
4249
    stringBuffer.append(TEXT_1126);
4334
    stringBuffer.append(TEXT_1136);
4250
    stringBuffer.append(genOperation.getName());
4335
    stringBuffer.append(genOperation.getName());
4251
    stringBuffer.append(TEXT_1127);
4336
    stringBuffer.append(TEXT_1137);
4252
    stringBuffer.append(genOperation.getParameters(genClass));
4337
    stringBuffer.append(genOperation.getParameters(genClass));
4253
    stringBuffer.append(TEXT_1128);
4338
    stringBuffer.append(TEXT_1138);
4254
    stringBuffer.append(genOperation.getThrows(genClass));
4339
    stringBuffer.append(genOperation.getThrows(genClass));
4255
    stringBuffer.append(TEXT_1129);
4340
    stringBuffer.append(TEXT_1139);
4256
    if (genOperation.hasBody()) {
4341
    if (genOperation.hasBody()) {
4257
    stringBuffer.append(TEXT_1130);
4342
    stringBuffer.append(TEXT_1140);
4258
    stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer)));
4343
    stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer)));
4259
    } else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName();
4344
    } else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName();
4260
    stringBuffer.append(TEXT_1131);
4345
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genOperation.hasValidationExpression()) {
4346
    stringBuffer.append(TEXT_1141);
4347
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4348
    stringBuffer.append(TEXT_1142);
4349
    stringBuffer.append(context);
4350
    stringBuffer.append(TEXT_1143);
4351
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4352
    stringBuffer.append(TEXT_1144);
4353
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4354
    stringBuffer.append(TEXT_1145);
4355
    stringBuffer.append(context);
4356
    stringBuffer.append(TEXT_1146);
4357
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4358
    stringBuffer.append(TEXT_1147);
4359
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4360
    stringBuffer.append(TEXT_1148);
4361
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4362
    stringBuffer.append(TEXT_1149);
4363
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
4364
    stringBuffer.append(TEXT_1150);
4365
    stringBuffer.append(genOperation.getValidationDelegate());
4366
    stringBuffer.append(TEXT_1151);
4367
    stringBuffer.append(genModel.getNonNLS());
4368
    stringBuffer.append(TEXT_1152);
4369
    stringBuffer.append(CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale()));
4370
    stringBuffer.append(genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale()));
4371
    stringBuffer.append(TEXT_1153);
4372
    stringBuffer.append(opClass.getQualifiedClassifierAccessor());
4373
    stringBuffer.append(TEXT_1154);
4374
    stringBuffer.append(opClass.getEcoreClass().getEOperations().indexOf(genOperation.getEcoreOperation()));
4375
    stringBuffer.append(TEXT_1155);
4376
    stringBuffer.append(genClass.getQualifiedClassifierAccessor());
4377
    stringBuffer.append(TEXT_1156);
4378
    stringBuffer.append(context);
4379
    stringBuffer.append(TEXT_1157);
4261
    stringBuffer.append(diagnostics);
4380
    stringBuffer.append(diagnostics);
4262
    stringBuffer.append(TEXT_1132);
4381
    stringBuffer.append(TEXT_1158);
4382
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4383
    stringBuffer.append(TEXT_1159);
4384
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4385
    stringBuffer.append(TEXT_1160);
4386
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4387
    stringBuffer.append(TEXT_1161);
4388
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4389
    stringBuffer.append(TEXT_1162);
4390
    stringBuffer.append(opClass.getOperationID(genOperation));
4391
    stringBuffer.append(TEXT_1163);
4392
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4393
    stringBuffer.append(TEXT_1164);
4394
    stringBuffer.append(genOperation.getName());
4395
    stringBuffer.append(TEXT_1165);
4396
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4397
    stringBuffer.append(TEXT_1166);
4398
    stringBuffer.append(context);
4399
    stringBuffer.append(TEXT_1167);
4400
    stringBuffer.append(genModel.getNonNLS());
4401
    stringBuffer.append(genModel.getNonNLS(2));
4402
    stringBuffer.append(TEXT_1168);
4403
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
4404
    stringBuffer.append(TEXT_1169);
4263
    stringBuffer.append(diagnostics);
4405
    stringBuffer.append(diagnostics);
4264
    stringBuffer.append(TEXT_1133);
4406
    stringBuffer.append(TEXT_1170);
4265
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4407
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4266
    stringBuffer.append(TEXT_1134);
4408
    stringBuffer.append(TEXT_1171);
4267
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4409
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4268
    stringBuffer.append(TEXT_1135);
4410
    stringBuffer.append(TEXT_1172);
4269
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4411
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4270
    stringBuffer.append(TEXT_1136);
4412
    stringBuffer.append(TEXT_1173);
4271
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4413
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4272
    stringBuffer.append(TEXT_1137);
4414
    stringBuffer.append(TEXT_1174);
4273
    stringBuffer.append(opClass.getOperationID(genOperation));
4415
    stringBuffer.append(opClass.getOperationID(genOperation));
4274
    stringBuffer.append(TEXT_1138);
4416
    stringBuffer.append(TEXT_1175);
4275
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4417
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4276
    stringBuffer.append(TEXT_1139);
4418
    stringBuffer.append(TEXT_1176);
4277
    stringBuffer.append(genOperation.getName());
4419
    stringBuffer.append(genOperation.getName());
4278
    stringBuffer.append(TEXT_1140);
4420
    stringBuffer.append(TEXT_1177);
4279
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4421
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4280
    stringBuffer.append(TEXT_1141);
4422
    stringBuffer.append(TEXT_1178);
4281
    stringBuffer.append(context);
4423
    stringBuffer.append(context);
4282
    stringBuffer.append(TEXT_1142);
4424
    stringBuffer.append(TEXT_1179);
4283
    stringBuffer.append(genModel.getNonNLS());
4425
    stringBuffer.append(genModel.getNonNLS());
4284
    stringBuffer.append(genModel.getNonNLS(2));
4426
    stringBuffer.append(genModel.getNonNLS(2));
4285
    stringBuffer.append(TEXT_1143);
4427
    stringBuffer.append(TEXT_1180);
4428
    stringBuffer.append(diagnostics);
4429
    stringBuffer.append(TEXT_1181);
4430
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4431
    stringBuffer.append(TEXT_1182);
4432
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4433
    stringBuffer.append(TEXT_1183);
4434
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4435
    stringBuffer.append(TEXT_1184);
4436
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4437
    stringBuffer.append(TEXT_1185);
4438
    stringBuffer.append(opClass.getOperationID(genOperation));
4439
    stringBuffer.append(TEXT_1186);
4440
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4441
    stringBuffer.append(TEXT_1187);
4442
    stringBuffer.append(genOperation.getName());
4443
    stringBuffer.append(TEXT_1188);
4444
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4445
    stringBuffer.append(TEXT_1189);
4446
    stringBuffer.append(context);
4447
    stringBuffer.append(TEXT_1190);
4448
    stringBuffer.append(genOperation.getValidationDelegate());
4449
    stringBuffer.append(TEXT_1191);
4450
    stringBuffer.append(genModel.getNonNLS());
4451
    stringBuffer.append(genModel.getNonNLS(2));
4452
    stringBuffer.append(genModel.getNonNLS(3));
4453
    stringBuffer.append(TEXT_1192);
4286
    } else {
4454
    } else {
4287
    stringBuffer.append(TEXT_1144);
4455
    stringBuffer.append(TEXT_1193);
4456
    stringBuffer.append(diagnostics);
4457
    stringBuffer.append(TEXT_1194);
4458
    stringBuffer.append(diagnostics);
4459
    stringBuffer.append(TEXT_1195);
4460
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4461
    stringBuffer.append(TEXT_1196);
4462
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4463
    stringBuffer.append(TEXT_1197);
4464
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4465
    stringBuffer.append(TEXT_1198);
4466
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4467
    stringBuffer.append(TEXT_1199);
4468
    stringBuffer.append(opClass.getOperationID(genOperation));
4469
    stringBuffer.append(TEXT_1200);
4470
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4471
    stringBuffer.append(TEXT_1201);
4472
    stringBuffer.append(genOperation.getName());
4473
    stringBuffer.append(TEXT_1202);
4474
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4475
    stringBuffer.append(TEXT_1203);
4476
    stringBuffer.append(context);
4477
    stringBuffer.append(TEXT_1204);
4478
    stringBuffer.append(genModel.getNonNLS());
4479
    stringBuffer.append(genModel.getNonNLS(2));
4480
    stringBuffer.append(TEXT_1205);
4481
    }
4482
    } else {
4483
    stringBuffer.append(TEXT_1206);
4288
    //Class/implementedGenOperation.todo.override.javajetinc
4484
    //Class/implementedGenOperation.todo.override.javajetinc
4289
    }
4485
    }
4290
    stringBuffer.append(TEXT_1145);
4486
    stringBuffer.append(TEXT_1207);
4291
    }
4487
    }
4292
    //Class/implementedGenOperation.override.javajetinc
4488
    //Class/implementedGenOperation.override.javajetinc
4293
    }//for
4489
    }//for
4294
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
4490
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
4295
    stringBuffer.append(TEXT_1146);
4491
    stringBuffer.append(TEXT_1208);
4296
    if (genModel.useGenerics()) {
4492
    if (genModel.useGenerics()) {
4297
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4493
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4298
    if (genFeature.isUncheckedCast(genClass)) {
4494
    if (genFeature.isUncheckedCast(genClass)) {
4299
    stringBuffer.append(TEXT_1147);
4495
    stringBuffer.append(TEXT_1209);
4300
    break; }
4496
    break; }
4301
    }
4497
    }
4302
    }
4498
    }
4303
    if (genModel.useClassOverrideAnnotation()) {
4499
    if (genModel.useClassOverrideAnnotation()) {
4304
    stringBuffer.append(TEXT_1148);
4500
    stringBuffer.append(TEXT_1210);
4305
    }
4501
    }
4306
    stringBuffer.append(TEXT_1149);
4502
    stringBuffer.append(TEXT_1211);
4307
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4503
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4308
    stringBuffer.append(TEXT_1150);
4504
    stringBuffer.append(TEXT_1212);
4309
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4505
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4310
    stringBuffer.append(TEXT_1151);
4506
    stringBuffer.append(TEXT_1213);
4311
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4507
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4312
    stringBuffer.append(TEXT_1152);
4508
    stringBuffer.append(TEXT_1214);
4313
    stringBuffer.append(negativeOffsetCorrection);
4509
    stringBuffer.append(negativeOffsetCorrection);
4314
    stringBuffer.append(TEXT_1153);
4510
    stringBuffer.append(TEXT_1215);
4315
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4511
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4316
    stringBuffer.append(TEXT_1154);
4512
    stringBuffer.append(TEXT_1216);
4317
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4513
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4318
    stringBuffer.append(TEXT_1155);
4514
    stringBuffer.append(TEXT_1217);
4319
    if (genFeature.isListType()) { String cast = "("  + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + (!genModel.useGenerics() ? ")" : "<" + genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject") + ">)(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + "<?>)");
4515
    if (genFeature.isListType()) { String cast = "("  + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + (!genModel.useGenerics() ? ")" : "<" + genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject") + ">)(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + "<?>)");
4320
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4516
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4321
    stringBuffer.append(TEXT_1156);
4517
    stringBuffer.append(TEXT_1218);
4322
    stringBuffer.append(cast);
4518
    stringBuffer.append(cast);
4323
    stringBuffer.append(TEXT_1157);
4519
    stringBuffer.append(TEXT_1219);
4324
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4520
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4325
    stringBuffer.append(TEXT_1158);
4521
    stringBuffer.append(TEXT_1220);
4326
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4522
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4327
    stringBuffer.append(TEXT_1159);
4523
    stringBuffer.append(TEXT_1221);
4328
    stringBuffer.append(genFeature.getGetAccessor());
4524
    stringBuffer.append(genFeature.getGetAccessor());
4329
    stringBuffer.append(TEXT_1160);
4525
    stringBuffer.append(TEXT_1222);
4330
    } else {
4526
    } else {
4331
    stringBuffer.append(TEXT_1161);
4527
    stringBuffer.append(TEXT_1223);
4332
    stringBuffer.append(cast);
4528
    stringBuffer.append(cast);
4333
    stringBuffer.append(genFeature.getGetAccessor());
4529
    stringBuffer.append(genFeature.getGetAccessor());
4334
    stringBuffer.append(TEXT_1162);
4530
    stringBuffer.append(TEXT_1224);
4335
    }
4531
    }
4336
    } else if (genFeature.isContainer()) {
4532
    } else if (genFeature.isContainer()) {
4337
    stringBuffer.append(TEXT_1163);
4533
    stringBuffer.append(TEXT_1225);
4338
    if (genFeature.isBasicSet()) {
4534
    if (genFeature.isBasicSet()) {
4339
    stringBuffer.append(TEXT_1164);
4535
    stringBuffer.append(TEXT_1226);
4340
    stringBuffer.append(genFeature.getAccessorName());
4536
    stringBuffer.append(genFeature.getAccessorName());
4341
    stringBuffer.append(TEXT_1165);
4537
    stringBuffer.append(TEXT_1227);
4342
    stringBuffer.append(genFeature.getImportedType(genClass));
4538
    stringBuffer.append(genFeature.getImportedType(genClass));
4343
    stringBuffer.append(TEXT_1166);
4539
    stringBuffer.append(TEXT_1228);
4344
    } else {
4540
    } else {
4345
    stringBuffer.append(TEXT_1167);
4541
    stringBuffer.append(TEXT_1229);
4346
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4542
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4347
    stringBuffer.append(positiveOffsetCorrection);
4543
    stringBuffer.append(positiveOffsetCorrection);
4348
    stringBuffer.append(TEXT_1168);
4544
    stringBuffer.append(TEXT_1230);
4349
    }
4545
    }
4350
    } else {
4546
    } else {
4351
    if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4547
    if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4352
    stringBuffer.append(TEXT_1169);
4548
    stringBuffer.append(TEXT_1231);
4353
    stringBuffer.append(genFeature.getImportedType(genClass));
4549
    stringBuffer.append(genFeature.getImportedType(genClass));
4354
    stringBuffer.append(TEXT_1170);
4550
    stringBuffer.append(TEXT_1232);
4355
    stringBuffer.append(genFeature.getSafeName());
4551
    stringBuffer.append(genFeature.getSafeName());
4356
    stringBuffer.append(TEXT_1171);
4552
    stringBuffer.append(TEXT_1233);
4357
    stringBuffer.append(genFeature.getImportedType(genClass));
4553
    stringBuffer.append(genFeature.getImportedType(genClass));
4358
    stringBuffer.append(TEXT_1172);
4554
    stringBuffer.append(TEXT_1234);
4359
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4555
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4360
    stringBuffer.append(positiveOffsetCorrection);
4556
    stringBuffer.append(positiveOffsetCorrection);
4361
    stringBuffer.append(TEXT_1173);
4557
    stringBuffer.append(TEXT_1235);
4362
    } else if (genFeature.isVolatile() || genClass.getImplementingGenModel(genFeature).isDynamicDelegation()) {
4558
    } else if (genFeature.isVolatile() || genClass.getImplementingGenModel(genFeature).isDynamicDelegation()) {
4363
    stringBuffer.append(TEXT_1174);
4559
    stringBuffer.append(TEXT_1236);
4364
    stringBuffer.append(genFeature.getImportedType(genClass));
4560
    stringBuffer.append(genFeature.getImportedType(genClass));
4365
    stringBuffer.append(TEXT_1175);
4561
    stringBuffer.append(TEXT_1237);
4366
    stringBuffer.append(genFeature.getSafeName());
4562
    stringBuffer.append(genFeature.getSafeName());
4367
    stringBuffer.append(TEXT_1176);
4563
    stringBuffer.append(TEXT_1238);
4368
    if (genFeature.isResolveProxies()) {
4564
    if (genFeature.isResolveProxies()) {
4369
    stringBuffer.append(TEXT_1177);
4565
    stringBuffer.append(TEXT_1239);
4370
    stringBuffer.append(genFeature.getAccessorName());
4566
    stringBuffer.append(genFeature.getAccessorName());
4371
    } else {
4567
    } else {
4372
    stringBuffer.append(genFeature.getGetAccessor());
4568
    stringBuffer.append(genFeature.getGetAccessor());
4373
    }
4569
    }
4374
    stringBuffer.append(TEXT_1178);
4570
    stringBuffer.append(TEXT_1240);
4375
    }
4571
    }
4376
    stringBuffer.append(TEXT_1179);
4572
    stringBuffer.append(TEXT_1241);
4377
    stringBuffer.append(genFeature.getSafeName());
4573
    stringBuffer.append(genFeature.getSafeName());
4378
    stringBuffer.append(TEXT_1180);
4574
    stringBuffer.append(TEXT_1242);
4379
    if (genFeature.isEffectiveContains()) {
4575
    if (genFeature.isEffectiveContains()) {
4380
    stringBuffer.append(TEXT_1181);
4576
    stringBuffer.append(TEXT_1243);
4381
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4577
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4382
    stringBuffer.append(TEXT_1182);
4578
    stringBuffer.append(TEXT_1244);
4383
    stringBuffer.append(genFeature.getSafeName());
4579
    stringBuffer.append(genFeature.getSafeName());
4384
    stringBuffer.append(TEXT_1183);
4580
    stringBuffer.append(TEXT_1245);
4385
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4581
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4386
    stringBuffer.append(negativeOffsetCorrection);
4582
    stringBuffer.append(negativeOffsetCorrection);
4387
    stringBuffer.append(TEXT_1184);
4583
    stringBuffer.append(TEXT_1246);
4388
    } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4584
    } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4389
    stringBuffer.append(TEXT_1185);
4585
    stringBuffer.append(TEXT_1247);
4390
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4586
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4391
    stringBuffer.append(TEXT_1186);
4587
    stringBuffer.append(TEXT_1248);
4392
    stringBuffer.append(genFeature.getSafeName());
4588
    stringBuffer.append(genFeature.getSafeName());
4393
    stringBuffer.append(TEXT_1187);
4589
    stringBuffer.append(TEXT_1249);
4394
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4590
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4395
    stringBuffer.append(reverseOffsetCorrection);
4591
    stringBuffer.append(reverseOffsetCorrection);
4396
    stringBuffer.append(TEXT_1188);
4592
    stringBuffer.append(TEXT_1250);
4397
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4593
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4398
    stringBuffer.append(TEXT_1189);
4594
    stringBuffer.append(TEXT_1251);
4399
    }
4595
    }
4400
    stringBuffer.append(TEXT_1190);
4596
    stringBuffer.append(TEXT_1252);
4401
    stringBuffer.append(genFeature.getAccessorName());
4597
    stringBuffer.append(genFeature.getAccessorName());
4402
    stringBuffer.append(TEXT_1191);
4598
    stringBuffer.append(TEXT_1253);
4403
    stringBuffer.append(genFeature.getImportedType(genClass));
4599
    stringBuffer.append(genFeature.getImportedType(genClass));
4404
    stringBuffer.append(TEXT_1192);
4600
    stringBuffer.append(TEXT_1254);
4405
    }
4601
    }
4406
    }
4602
    }
4407
    stringBuffer.append(TEXT_1193);
4603
    stringBuffer.append(TEXT_1255);
4408
    if (genModel.isMinimalReflectiveMethods()) {
4604
    if (genModel.isMinimalReflectiveMethods()) {
4409
    stringBuffer.append(TEXT_1194);
4605
    stringBuffer.append(TEXT_1256);
4410
    } else {
4606
    } else {
4411
    stringBuffer.append(TEXT_1195);
4607
    stringBuffer.append(TEXT_1257);
4412
    }
4608
    }
4413
    stringBuffer.append(TEXT_1196);
4609
    stringBuffer.append(TEXT_1258);
4414
    }
4610
    }
4415
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
4611
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
4416
    stringBuffer.append(TEXT_1197);
4612
    stringBuffer.append(TEXT_1259);
4417
    if (genModel.useClassOverrideAnnotation()) {
4613
    if (genModel.useClassOverrideAnnotation()) {
4418
    stringBuffer.append(TEXT_1198);
4614
    stringBuffer.append(TEXT_1260);
4419
    }
4615
    }
4420
    stringBuffer.append(TEXT_1199);
4616
    stringBuffer.append(TEXT_1261);
4421
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4617
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4422
    stringBuffer.append(TEXT_1200);
4618
    stringBuffer.append(TEXT_1262);
4423
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4619
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4424
    stringBuffer.append(TEXT_1201);
4620
    stringBuffer.append(TEXT_1263);
4425
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4621
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4426
    stringBuffer.append(TEXT_1202);
4622
    stringBuffer.append(TEXT_1264);
4427
    stringBuffer.append(negativeOffsetCorrection);
4623
    stringBuffer.append(negativeOffsetCorrection);
4428
    stringBuffer.append(TEXT_1203);
4624
    stringBuffer.append(TEXT_1265);
4429
    for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) {
4625
    for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) {
4430
    stringBuffer.append(TEXT_1204);
4626
    stringBuffer.append(TEXT_1266);
4431
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4627
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4432
    stringBuffer.append(TEXT_1205);
4628
    stringBuffer.append(TEXT_1267);
4433
    if (genFeature.isListType()) {
4629
    if (genFeature.isListType()) {
4434
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4630
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4435
    stringBuffer.append(TEXT_1206);
4631
    stringBuffer.append(TEXT_1268);
4436
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4632
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4437
    stringBuffer.append(singleWildcard);
4633
    stringBuffer.append(singleWildcard);
4438
    stringBuffer.append(TEXT_1207);
4634
    stringBuffer.append(TEXT_1269);
4439
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4635
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4440
    stringBuffer.append(TEXT_1208);
4636
    stringBuffer.append(TEXT_1270);
4441
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4637
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4442
    stringBuffer.append(TEXT_1209);
4638
    stringBuffer.append(TEXT_1271);
4443
    stringBuffer.append(genFeature.getGetAccessor());
4639
    stringBuffer.append(genFeature.getGetAccessor());
4444
    stringBuffer.append(TEXT_1210);
4640
    stringBuffer.append(TEXT_1272);
4445
    } else if (genFeature.isWrappedFeatureMapType()) {
4641
    } else if (genFeature.isWrappedFeatureMapType()) {
4446
    stringBuffer.append(TEXT_1211);
4642
    stringBuffer.append(TEXT_1273);
4447
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4643
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4448
    stringBuffer.append(singleWildcard);
4644
    stringBuffer.append(singleWildcard);
4449
    stringBuffer.append(TEXT_1212);
4645
    stringBuffer.append(TEXT_1274);
4450
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4646
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4451
    stringBuffer.append(TEXT_1213);
4647
    stringBuffer.append(TEXT_1275);
4452
    stringBuffer.append(genFeature.getGetAccessor());
4648
    stringBuffer.append(genFeature.getGetAccessor());
4453
    stringBuffer.append(TEXT_1214);
4649
    stringBuffer.append(TEXT_1276);
4454
    } else {
4650
    } else {
4455
    stringBuffer.append(TEXT_1215);
4651
    stringBuffer.append(TEXT_1277);
4456
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4652
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4457
    stringBuffer.append(singleWildcard);
4653
    stringBuffer.append(singleWildcard);
4458
    stringBuffer.append(TEXT_1216);
4654
    stringBuffer.append(TEXT_1278);
4459
    stringBuffer.append(genFeature.getGetAccessor());
4655
    stringBuffer.append(genFeature.getGetAccessor());
4460
    stringBuffer.append(TEXT_1217);
4656
    stringBuffer.append(TEXT_1279);
4461
    }
4657
    }
4462
    } else if (genFeature.isContainer() && !genFeature.isBasicSet()) {
4658
    } else if (genFeature.isContainer() && !genFeature.isBasicSet()) {
4463
    stringBuffer.append(TEXT_1218);
4659
    stringBuffer.append(TEXT_1280);
4464
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4660
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4465
    stringBuffer.append(positiveOffsetCorrection);
4661
    stringBuffer.append(positiveOffsetCorrection);
4466
    stringBuffer.append(TEXT_1219);
4662
    stringBuffer.append(TEXT_1281);
4467
    } else if (genFeature.isUnsettable()) {
4663
    } else if (genFeature.isUnsettable()) {
4468
    stringBuffer.append(TEXT_1220);
4664
    stringBuffer.append(TEXT_1282);
4469
    stringBuffer.append(genFeature.getAccessorName());
4665
    stringBuffer.append(genFeature.getAccessorName());
4470
    stringBuffer.append(TEXT_1221);
4666
    stringBuffer.append(TEXT_1283);
4471
    } else {
4667
    } else {
4472
    stringBuffer.append(TEXT_1222);
4668
    stringBuffer.append(TEXT_1284);
4473
    stringBuffer.append(genFeature.getAccessorName());
4669
    stringBuffer.append(genFeature.getAccessorName());
4474
    stringBuffer.append(TEXT_1223);
4670
    stringBuffer.append(TEXT_1285);
4475
    }
4671
    }
4476
    }
4672
    }
4477
    stringBuffer.append(TEXT_1224);
4673
    stringBuffer.append(TEXT_1286);
4478
    if (genModel.isMinimalReflectiveMethods()) {
4674
    if (genModel.isMinimalReflectiveMethods()) {
4479
    stringBuffer.append(TEXT_1225);
4675
    stringBuffer.append(TEXT_1287);
4480
    } else {
4676
    } else {
4481
    stringBuffer.append(TEXT_1226);
4677
    stringBuffer.append(TEXT_1288);
4482
    }
4678
    }
4483
    stringBuffer.append(TEXT_1227);
4679
    stringBuffer.append(TEXT_1289);
4484
    }
4680
    }
4485
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
4681
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
4486
    stringBuffer.append(TEXT_1228);
4682
    stringBuffer.append(TEXT_1290);
4487
    if (genModel.useClassOverrideAnnotation()) {
4683
    if (genModel.useClassOverrideAnnotation()) {
4488
    stringBuffer.append(TEXT_1229);
4684
    stringBuffer.append(TEXT_1291);
4489
    }
4685
    }
4490
    stringBuffer.append(TEXT_1230);
4686
    stringBuffer.append(TEXT_1292);
4491
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4687
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4492
    stringBuffer.append(TEXT_1231);
4688
    stringBuffer.append(TEXT_1293);
4493
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4689
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4494
    stringBuffer.append(TEXT_1232);
4690
    stringBuffer.append(TEXT_1294);
4495
    stringBuffer.append(negativeOffsetCorrection);
4691
    stringBuffer.append(negativeOffsetCorrection);
4496
    stringBuffer.append(TEXT_1233);
4692
    stringBuffer.append(TEXT_1295);
4497
    for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) {
4693
    for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) {
4498
    GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4694
    GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4499
    stringBuffer.append(TEXT_1234);
4695
    stringBuffer.append(TEXT_1296);
4500
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4696
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4501
    stringBuffer.append(TEXT_1235);
4697
    stringBuffer.append(TEXT_1297);
4502
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4698
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4503
    stringBuffer.append(reverseOffsetCorrection);
4699
    stringBuffer.append(reverseOffsetCorrection);
4504
    stringBuffer.append(TEXT_1236);
4700
    stringBuffer.append(TEXT_1298);
4505
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4701
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4506
    stringBuffer.append(TEXT_1237);
4702
    stringBuffer.append(TEXT_1299);
4507
    }
4703
    }
4508
    stringBuffer.append(TEXT_1238);
4704
    stringBuffer.append(TEXT_1300);
4509
    if (genModel.isMinimalReflectiveMethods()) {
4705
    if (genModel.isMinimalReflectiveMethods()) {
4510
    stringBuffer.append(TEXT_1239);
4706
    stringBuffer.append(TEXT_1301);
4511
    } else {
4707
    } else {
4512
    stringBuffer.append(TEXT_1240);
4708
    stringBuffer.append(TEXT_1302);
4513
    }
4709
    }
4514
    stringBuffer.append(TEXT_1241);
4710
    stringBuffer.append(TEXT_1303);
4515
    }
4711
    }
4516
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) {
4712
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) {
4517
    stringBuffer.append(TEXT_1242);
4713
    stringBuffer.append(TEXT_1304);
4518
    if (genModel.useClassOverrideAnnotation()) {
4714
    if (genModel.useClassOverrideAnnotation()) {
4519
    stringBuffer.append(TEXT_1243);
4715
    stringBuffer.append(TEXT_1305);
4520
    }
4716
    }
4521
    stringBuffer.append(TEXT_1244);
4717
    stringBuffer.append(TEXT_1306);
4522
    stringBuffer.append(negativeOffsetCorrection);
4718
    stringBuffer.append(negativeOffsetCorrection);
4523
    stringBuffer.append(TEXT_1245);
4719
    stringBuffer.append(TEXT_1307);
4524
    for (GenFeature genFeature : genClass.getEGetGenFeatures()) {
4720
    for (GenFeature genFeature : genClass.getEGetGenFeatures()) {
4525
    stringBuffer.append(TEXT_1246);
4721
    stringBuffer.append(TEXT_1308);
4526
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4722
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4527
    stringBuffer.append(TEXT_1247);
4723
    stringBuffer.append(TEXT_1309);
4528
    if (genFeature.isPrimitiveType()) {
4724
    if (genFeature.isPrimitiveType()) {
4529
    if (isJDK50) {
4725
    if (isJDK50) {
4530
    stringBuffer.append(TEXT_1248);
4726
    stringBuffer.append(TEXT_1310);
4531
    stringBuffer.append(genFeature.getGetAccessor());
4727
    stringBuffer.append(genFeature.getGetAccessor());
4532
    stringBuffer.append(TEXT_1249);
4728
    stringBuffer.append(TEXT_1311);
4533
    } else if (genFeature.isBooleanType()) {
4729
    } else if (genFeature.isBooleanType()) {
4534
    stringBuffer.append(TEXT_1250);
4730
    stringBuffer.append(TEXT_1312);
4535
    stringBuffer.append(genFeature.getGetAccessor());
4731
    stringBuffer.append(genFeature.getGetAccessor());
4536
    stringBuffer.append(TEXT_1251);
4732
    stringBuffer.append(TEXT_1313);
4537
    } else {
4733
    } else {
4538
    stringBuffer.append(TEXT_1252);
4734
    stringBuffer.append(TEXT_1314);
4539
    stringBuffer.append(genFeature.getObjectType(genClass));
4735
    stringBuffer.append(genFeature.getObjectType(genClass));
4540
    stringBuffer.append(TEXT_1253);
4736
    stringBuffer.append(TEXT_1315);
4541
    stringBuffer.append(genFeature.getGetAccessor());
4737
    stringBuffer.append(genFeature.getGetAccessor());
4542
    stringBuffer.append(TEXT_1254);
4738
    stringBuffer.append(TEXT_1316);
4543
    }
4739
    }
4544
    } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
4740
    } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
4545
    stringBuffer.append(TEXT_1255);
4741
    stringBuffer.append(TEXT_1317);
4546
    stringBuffer.append(genFeature.getGetAccessor());
4742
    stringBuffer.append(genFeature.getGetAccessor());
4547
    stringBuffer.append(TEXT_1256);
4743
    stringBuffer.append(TEXT_1318);
4548
    stringBuffer.append(genFeature.getAccessorName());
4744
    stringBuffer.append(genFeature.getAccessorName());
4549
    stringBuffer.append(TEXT_1257);
4745
    stringBuffer.append(TEXT_1319);
4550
    } else if (genFeature.isMapType()) {
4746
    } else if (genFeature.isMapType()) {
4551
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4747
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4552
    stringBuffer.append(TEXT_1258);
4748
    stringBuffer.append(TEXT_1320);
4553
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4749
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4554
    stringBuffer.append(TEXT_1259);
4750
    stringBuffer.append(TEXT_1321);
4555
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4751
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4556
    stringBuffer.append(TEXT_1260);
4752
    stringBuffer.append(TEXT_1322);
4557
    stringBuffer.append(genFeature.getGetAccessor());
4753
    stringBuffer.append(genFeature.getGetAccessor());
4558
    stringBuffer.append(TEXT_1261);
4754
    stringBuffer.append(TEXT_1323);
4559
    stringBuffer.append(genFeature.getGetAccessor());
4755
    stringBuffer.append(genFeature.getGetAccessor());
4560
    stringBuffer.append(TEXT_1262);
4756
    stringBuffer.append(TEXT_1324);
4561
    } else {
4757
    } else {
4562
    stringBuffer.append(TEXT_1263);
4758
    stringBuffer.append(TEXT_1325);
4563
    stringBuffer.append(genFeature.getGetAccessor());
4759
    stringBuffer.append(genFeature.getGetAccessor());
4564
    stringBuffer.append(TEXT_1264);
4760
    stringBuffer.append(TEXT_1326);
4565
    stringBuffer.append(genFeature.getGetAccessor());
4761
    stringBuffer.append(genFeature.getGetAccessor());
4566
    stringBuffer.append(TEXT_1265);
4762
    stringBuffer.append(TEXT_1327);
4567
    }
4763
    }
4568
    } else if (genFeature.isWrappedFeatureMapType()) {
4764
    } else if (genFeature.isWrappedFeatureMapType()) {
4569
    stringBuffer.append(TEXT_1266);
4765
    stringBuffer.append(TEXT_1328);
4570
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4766
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4571
    stringBuffer.append(TEXT_1267);
4767
    stringBuffer.append(TEXT_1329);
4572
    stringBuffer.append(genFeature.getGetAccessor());
4768
    stringBuffer.append(genFeature.getGetAccessor());
4573
    stringBuffer.append(TEXT_1268);
4769
    stringBuffer.append(TEXT_1330);
4574
    stringBuffer.append(genFeature.getGetAccessor());
4770
    stringBuffer.append(genFeature.getGetAccessor());
4575
    stringBuffer.append(TEXT_1269);
4771
    stringBuffer.append(TEXT_1331);
4576
    } else if (genFeature.isFeatureMapType()) {
4772
    } else if (genFeature.isFeatureMapType()) {
4577
    stringBuffer.append(TEXT_1270);
4773
    stringBuffer.append(TEXT_1332);
4578
    stringBuffer.append(genFeature.getGetAccessor());
4774
    stringBuffer.append(genFeature.getGetAccessor());
4579
    stringBuffer.append(TEXT_1271);
4775
    stringBuffer.append(TEXT_1333);
4580
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4776
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4581
    stringBuffer.append(TEXT_1272);
4777
    stringBuffer.append(TEXT_1334);
4582
    stringBuffer.append(genFeature.getGetAccessor());
4778
    stringBuffer.append(genFeature.getGetAccessor());
4583
    stringBuffer.append(TEXT_1273);
4779
    stringBuffer.append(TEXT_1335);
4584
    } else {
4780
    } else {
4585
    stringBuffer.append(TEXT_1274);
4781
    stringBuffer.append(TEXT_1336);
4586
    stringBuffer.append(genFeature.getGetAccessor());
4782
    stringBuffer.append(genFeature.getGetAccessor());
4587
    stringBuffer.append(TEXT_1275);
4783
    stringBuffer.append(TEXT_1337);
4588
    }
4784
    }
4589
    }
4785
    }
4590
    stringBuffer.append(TEXT_1276);
4786
    stringBuffer.append(TEXT_1338);
4591
    if (genModel.isMinimalReflectiveMethods()) {
4787
    if (genModel.isMinimalReflectiveMethods()) {
4592
    stringBuffer.append(TEXT_1277);
4788
    stringBuffer.append(TEXT_1339);
4593
    } else {
4789
    } else {
4594
    stringBuffer.append(TEXT_1278);
4790
    stringBuffer.append(TEXT_1340);
4595
    }
4791
    }
4596
    stringBuffer.append(TEXT_1279);
4792
    stringBuffer.append(TEXT_1341);
4597
    }
4793
    }
4598
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
4794
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
4599
    stringBuffer.append(TEXT_1280);
4795
    stringBuffer.append(TEXT_1342);
4600
    if (genModel.useGenerics()) {
4796
    if (genModel.useGenerics()) {
4601
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4797
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4602
    if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
4798
    if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
4603
    stringBuffer.append(TEXT_1281);
4799
    stringBuffer.append(TEXT_1343);
4604
    break; }
4800
    break; }
4605
    }
4801
    }
4606
    }
4802
    }
4607
    if (genModel.useClassOverrideAnnotation()) {
4803
    if (genModel.useClassOverrideAnnotation()) {
4608
    stringBuffer.append(TEXT_1282);
4804
    stringBuffer.append(TEXT_1344);
4609
    }
4805
    }
4610
    stringBuffer.append(TEXT_1283);
4806
    stringBuffer.append(TEXT_1345);
4611
    stringBuffer.append(negativeOffsetCorrection);
4807
    stringBuffer.append(negativeOffsetCorrection);
4612
    stringBuffer.append(TEXT_1284);
4808
    stringBuffer.append(TEXT_1346);
4613
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4809
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4614
    stringBuffer.append(TEXT_1285);
4810
    stringBuffer.append(TEXT_1347);
4615
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4811
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4616
    stringBuffer.append(TEXT_1286);
4812
    stringBuffer.append(TEXT_1348);
4617
    if (genFeature.isListType()) {
4813
    if (genFeature.isListType()) {
4618
    if (genFeature.isWrappedFeatureMapType()) {
4814
    if (genFeature.isWrappedFeatureMapType()) {
4619
    stringBuffer.append(TEXT_1287);
4815
    stringBuffer.append(TEXT_1349);
4620
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4816
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4621
    stringBuffer.append(TEXT_1288);
4817
    stringBuffer.append(TEXT_1350);
4622
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4818
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4623
    stringBuffer.append(TEXT_1289);
4819
    stringBuffer.append(TEXT_1351);
4624
    stringBuffer.append(genFeature.getGetAccessor());
4820
    stringBuffer.append(genFeature.getGetAccessor());
4625
    stringBuffer.append(TEXT_1290);
4821
    stringBuffer.append(TEXT_1352);
4626
    } else if (genFeature.isFeatureMapType()) {
4822
    } else if (genFeature.isFeatureMapType()) {
4627
    stringBuffer.append(TEXT_1291);
4823
    stringBuffer.append(TEXT_1353);
4628
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4824
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4629
    stringBuffer.append(TEXT_1292);
4825
    stringBuffer.append(TEXT_1354);
4630
    stringBuffer.append(genFeature.getGetAccessor());
4826
    stringBuffer.append(genFeature.getGetAccessor());
4631
    stringBuffer.append(TEXT_1293);
4827
    stringBuffer.append(TEXT_1355);
4632
    } else if (genFeature.isMapType()) {
4828
    } else if (genFeature.isMapType()) {
4633
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4829
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4634
    stringBuffer.append(TEXT_1294);
4830
    stringBuffer.append(TEXT_1356);
4635
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4831
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4636
    stringBuffer.append(TEXT_1295);
4832
    stringBuffer.append(TEXT_1357);
4637
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4833
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4638
    stringBuffer.append(TEXT_1296);
4834
    stringBuffer.append(TEXT_1358);
4639
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4835
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4640
    stringBuffer.append(TEXT_1297);
4836
    stringBuffer.append(TEXT_1359);
4641
    stringBuffer.append(genFeature.getGetAccessor());
4837
    stringBuffer.append(genFeature.getGetAccessor());
4642
    stringBuffer.append(TEXT_1298);
4838
    stringBuffer.append(TEXT_1360);
4643
    } else {
4839
    } else {
4644
    stringBuffer.append(TEXT_1299);
4840
    stringBuffer.append(TEXT_1361);
4645
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4841
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4646
    stringBuffer.append(TEXT_1300);
4842
    stringBuffer.append(TEXT_1362);
4647
    stringBuffer.append(genFeature.getGetAccessor());
4843
    stringBuffer.append(genFeature.getGetAccessor());
4648
    stringBuffer.append(TEXT_1301);
4844
    stringBuffer.append(TEXT_1363);
4649
    }
4845
    }
4650
    } else {
4846
    } else {
4651
    stringBuffer.append(TEXT_1302);
4847
    stringBuffer.append(TEXT_1364);
4652
    stringBuffer.append(genFeature.getGetAccessor());
4848
    stringBuffer.append(genFeature.getGetAccessor());
4653
    stringBuffer.append(TEXT_1303);
4849
    stringBuffer.append(TEXT_1365);
4654
    stringBuffer.append(genFeature.getGetAccessor());
4850
    stringBuffer.append(genFeature.getGetAccessor());
4655
    stringBuffer.append(TEXT_1304);
4851
    stringBuffer.append(TEXT_1366);
4656
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
4852
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
4657
    if (isJDK50) {
4853
    if (isJDK50) {
4658
    stringBuffer.append(TEXT_1305);
4854
    stringBuffer.append(TEXT_1367);
4659
    stringBuffer.append(genFeature.getListItemType(genClass));
4855
    stringBuffer.append(genFeature.getListItemType(genClass));
4660
    stringBuffer.append(TEXT_1306);
4856
    stringBuffer.append(TEXT_1368);
4661
    }
4857
    }
4662
    stringBuffer.append(TEXT_1307);
4858
    stringBuffer.append(TEXT_1369);
4663
    }
4859
    }
4664
    } else if (!isJDK50 && genFeature.isPrimitiveType()) {
4860
    } else if (!isJDK50 && genFeature.isPrimitiveType()) {
4665
    stringBuffer.append(TEXT_1308);
4861
    stringBuffer.append(TEXT_1370);
4666
    stringBuffer.append(genFeature.getAccessorName());
4862
    stringBuffer.append(genFeature.getAccessorName());
4667
    stringBuffer.append(TEXT_1309);
4863
    stringBuffer.append(TEXT_1371);
4668
    stringBuffer.append(genFeature.getObjectType(genClass));
4864
    stringBuffer.append(genFeature.getObjectType(genClass));
4669
    stringBuffer.append(TEXT_1310);
4865
    stringBuffer.append(TEXT_1372);
4670
    stringBuffer.append(genFeature.getPrimitiveValueFunction());
4866
    stringBuffer.append(genFeature.getPrimitiveValueFunction());
4671
    stringBuffer.append(TEXT_1311);
4867
    stringBuffer.append(TEXT_1373);
4672
    } else {
4868
    } else {
4673
    stringBuffer.append(TEXT_1312);
4869
    stringBuffer.append(TEXT_1374);
4674
    stringBuffer.append(genFeature.getAccessorName());
4870
    stringBuffer.append(genFeature.getAccessorName());
4675
    stringBuffer.append(TEXT_1313);
4871
    stringBuffer.append(TEXT_1375);
4676
    if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) {
4872
    if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) {
4677
    stringBuffer.append(TEXT_1314);
4873
    stringBuffer.append(TEXT_1376);
4678
    stringBuffer.append(genFeature.getObjectType(genClass));
4874
    stringBuffer.append(genFeature.getObjectType(genClass));
4679
    stringBuffer.append(TEXT_1315);
4875
    stringBuffer.append(TEXT_1377);
4680
    }
4876
    }
4681
    stringBuffer.append(TEXT_1316);
4877
    stringBuffer.append(TEXT_1378);
4682
    }
4878
    }
4683
    stringBuffer.append(TEXT_1317);
4879
    stringBuffer.append(TEXT_1379);
4684
    }
4880
    }
4685
    stringBuffer.append(TEXT_1318);
4881
    stringBuffer.append(TEXT_1380);
4686
    if (genModel.isMinimalReflectiveMethods()) {
4882
    if (genModel.isMinimalReflectiveMethods()) {
4687
    stringBuffer.append(TEXT_1319);
4883
    stringBuffer.append(TEXT_1381);
4688
    } else {
4884
    } else {
4689
    stringBuffer.append(TEXT_1320);
4885
    stringBuffer.append(TEXT_1382);
4690
    }
4886
    }
4691
    stringBuffer.append(TEXT_1321);
4887
    stringBuffer.append(TEXT_1383);
4692
    }
4888
    }
4693
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) {
4889
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) {
4694
    stringBuffer.append(TEXT_1322);
4890
    stringBuffer.append(TEXT_1384);
4695
    if (genModel.useClassOverrideAnnotation()) {
4891
    if (genModel.useClassOverrideAnnotation()) {
4696
    stringBuffer.append(TEXT_1323);
4892
    stringBuffer.append(TEXT_1385);
4697
    }
4893
    }
4698
    stringBuffer.append(TEXT_1324);
4894
    stringBuffer.append(TEXT_1386);
4699
    stringBuffer.append(negativeOffsetCorrection);
4895
    stringBuffer.append(negativeOffsetCorrection);
4700
    stringBuffer.append(TEXT_1325);
4896
    stringBuffer.append(TEXT_1387);
4701
    for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) {
4897
    for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) {
4702
    stringBuffer.append(TEXT_1326);
4898
    stringBuffer.append(TEXT_1388);
4703
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4899
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4704
    stringBuffer.append(TEXT_1327);
4900
    stringBuffer.append(TEXT_1389);
4705
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4901
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4706
    if (genFeature.isWrappedFeatureMapType()) {
4902
    if (genFeature.isWrappedFeatureMapType()) {
4707
    stringBuffer.append(TEXT_1328);
4903
    stringBuffer.append(TEXT_1390);
4708
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4904
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4709
    stringBuffer.append(TEXT_1329);
4905
    stringBuffer.append(TEXT_1391);
4710
    stringBuffer.append(genFeature.getGetAccessor());
4906
    stringBuffer.append(genFeature.getGetAccessor());
4711
    stringBuffer.append(TEXT_1330);
4907
    stringBuffer.append(TEXT_1392);
4712
    } else {
4908
    } else {
4713
    stringBuffer.append(TEXT_1331);
4909
    stringBuffer.append(TEXT_1393);
4714
    stringBuffer.append(genFeature.getGetAccessor());
4910
    stringBuffer.append(genFeature.getGetAccessor());
4715
    stringBuffer.append(TEXT_1332);
4911
    stringBuffer.append(TEXT_1394);
4716
    }
4912
    }
4717
    } else if (genFeature.isUnsettable()) {
4913
    } else if (genFeature.isUnsettable()) {
4718
    stringBuffer.append(TEXT_1333);
4914
    stringBuffer.append(TEXT_1395);
4719
    stringBuffer.append(genFeature.getAccessorName());
4915
    stringBuffer.append(genFeature.getAccessorName());
4720
    stringBuffer.append(TEXT_1334);
4916
    stringBuffer.append(TEXT_1396);
4721
    } else if (!genFeature.hasEDefault()) {
4917
    } else if (!genFeature.hasEDefault()) {
4722
    stringBuffer.append(TEXT_1335);
4918
    stringBuffer.append(TEXT_1397);
4723
    stringBuffer.append(genFeature.getAccessorName());
4919
    stringBuffer.append(genFeature.getAccessorName());
4724
    stringBuffer.append(TEXT_1336);
4920
    stringBuffer.append(TEXT_1398);
4725
    stringBuffer.append(genFeature.getImportedType(genClass));
4921
    stringBuffer.append(genFeature.getImportedType(genClass));
4726
    stringBuffer.append(TEXT_1337);
4922
    stringBuffer.append(TEXT_1399);
4727
    } else {
4923
    } else {
4728
    stringBuffer.append(TEXT_1338);
4924
    stringBuffer.append(TEXT_1400);
4729
    stringBuffer.append(genFeature.getAccessorName());
4925
    stringBuffer.append(genFeature.getAccessorName());
4730
    stringBuffer.append(TEXT_1339);
4926
    stringBuffer.append(TEXT_1401);
4731
    stringBuffer.append(genFeature.getEDefault());
4927
    stringBuffer.append(genFeature.getEDefault());
4732
    stringBuffer.append(TEXT_1340);
4928
    stringBuffer.append(TEXT_1402);
4733
    }
4929
    }
4734
    stringBuffer.append(TEXT_1341);
4930
    stringBuffer.append(TEXT_1403);
4735
    }
4931
    }
4736
    stringBuffer.append(TEXT_1342);
4932
    stringBuffer.append(TEXT_1404);
4737
    if (genModel.isMinimalReflectiveMethods()) {
4933
    if (genModel.isMinimalReflectiveMethods()) {
4738
    stringBuffer.append(TEXT_1343);
4934
    stringBuffer.append(TEXT_1405);
4739
    } else {
4935
    } else {
4740
    stringBuffer.append(TEXT_1344);
4936
    stringBuffer.append(TEXT_1406);
4741
    }
4937
    }
4742
    stringBuffer.append(TEXT_1345);
4938
    stringBuffer.append(TEXT_1407);
4743
    //Class/eUnset.override.javajetinc
4939
    //Class/eUnset.override.javajetinc
4744
    }
4940
    }
4745
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) {
4941
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) {
4746
    stringBuffer.append(TEXT_1346);
4942
    stringBuffer.append(TEXT_1408);
4747
    if (genModel.useGenerics()) {
4943
    if (genModel.useGenerics()) {
4748
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) {
4944
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) {
4749
    if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4945
    if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4750
    stringBuffer.append(TEXT_1347);
4946
    stringBuffer.append(TEXT_1409);
4751
    break; }
4947
    break; }
4752
    }
4948
    }
4753
    }
4949
    }
4754
    if (genModel.useClassOverrideAnnotation()) {
4950
    if (genModel.useClassOverrideAnnotation()) {
4755
    stringBuffer.append(TEXT_1348);
4951
    stringBuffer.append(TEXT_1410);
4756
    }
4952
    }
4757
    stringBuffer.append(TEXT_1349);
4953
    stringBuffer.append(TEXT_1411);
4758
    stringBuffer.append(negativeOffsetCorrection);
4954
    stringBuffer.append(negativeOffsetCorrection);
4759
    stringBuffer.append(TEXT_1350);
4955
    stringBuffer.append(TEXT_1412);
4760
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { String safeNameAccessor = genFeature.getSafeName(); if ("featureID".equals(safeNameAccessor)) { safeNameAccessor = "this." + safeNameAccessor; }
4956
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { String safeNameAccessor = genFeature.getSafeName(); if ("featureID".equals(safeNameAccessor)) { safeNameAccessor = "this." + safeNameAccessor; }
4761
    stringBuffer.append(TEXT_1351);
4957
    stringBuffer.append(TEXT_1413);
4762
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4958
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4763
    stringBuffer.append(TEXT_1352);
4959
    stringBuffer.append(TEXT_1414);
4764
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4960
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4765
    if (genFeature.isWrappedFeatureMapType()) {
4961
    if (genFeature.isWrappedFeatureMapType()) {
4766
    if (genFeature.isVolatile()) {
4962
    if (genFeature.isVolatile()) {
4767
    stringBuffer.append(TEXT_1353);
4963
    stringBuffer.append(TEXT_1415);
4768
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4964
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4769
    stringBuffer.append(TEXT_1354);
4965
    stringBuffer.append(TEXT_1416);
4770
    stringBuffer.append(genFeature.getGetAccessor());
4966
    stringBuffer.append(genFeature.getGetAccessor());
4771
    stringBuffer.append(TEXT_1355);
4967
    stringBuffer.append(TEXT_1417);
4772
    } else {
4968
    } else {
4773
    stringBuffer.append(TEXT_1356);
4969
    stringBuffer.append(TEXT_1418);
4774
    stringBuffer.append(safeNameAccessor);
4970
    stringBuffer.append(safeNameAccessor);
4775
    stringBuffer.append(TEXT_1357);
4971
    stringBuffer.append(TEXT_1419);
4776
    stringBuffer.append(safeNameAccessor);
4972
    stringBuffer.append(safeNameAccessor);
4777
    stringBuffer.append(TEXT_1358);
4973
    stringBuffer.append(TEXT_1420);
4778
    }
4974
    }
4779
    } else {
4975
    } else {
4780
    if (genClass.isField(genFeature)) {
4976
    if (genClass.isField(genFeature)) {
4781
    stringBuffer.append(TEXT_1359);
4977
    stringBuffer.append(TEXT_1421);
4782
    stringBuffer.append(safeNameAccessor);
4978
    stringBuffer.append(safeNameAccessor);
4783
    stringBuffer.append(TEXT_1360);
4979
    stringBuffer.append(TEXT_1422);
4784
    stringBuffer.append(safeNameAccessor);
4980
    stringBuffer.append(safeNameAccessor);
4785
    stringBuffer.append(TEXT_1361);
4981
    stringBuffer.append(TEXT_1423);
4786
    } else {
4982
    } else {
4787
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4983
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4788
    stringBuffer.append(TEXT_1362);
4984
    stringBuffer.append(TEXT_1424);
4789
    stringBuffer.append(genFeature.getImportedType(genClass));
4985
    stringBuffer.append(genFeature.getImportedType(genClass));
4790
    stringBuffer.append(TEXT_1363);
4986
    stringBuffer.append(TEXT_1425);
4791
    stringBuffer.append(safeNameAccessor);
4987
    stringBuffer.append(safeNameAccessor);
4792
    stringBuffer.append(TEXT_1364);
4988
    stringBuffer.append(TEXT_1426);
4793
    stringBuffer.append(genFeature.getImportedType(genClass));
4989
    stringBuffer.append(genFeature.getImportedType(genClass));
4794
    stringBuffer.append(TEXT_1365);
4990
    stringBuffer.append(TEXT_1427);
4795
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4991
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4796
    stringBuffer.append(positiveOffsetCorrection);
4992
    stringBuffer.append(positiveOffsetCorrection);
4797
    stringBuffer.append(TEXT_1366);
4993
    stringBuffer.append(TEXT_1428);
4798
    stringBuffer.append(safeNameAccessor);
4994
    stringBuffer.append(safeNameAccessor);
4799
    stringBuffer.append(TEXT_1367);
4995
    stringBuffer.append(TEXT_1429);
4800
    stringBuffer.append(safeNameAccessor);
4996
    stringBuffer.append(safeNameAccessor);
4801
    stringBuffer.append(TEXT_1368);
4997
    stringBuffer.append(TEXT_1430);
4802
    } else {
4998
    } else {
4803
    stringBuffer.append(TEXT_1369);
4999
    stringBuffer.append(TEXT_1431);
4804
    stringBuffer.append(genFeature.getGetAccessor());
5000
    stringBuffer.append(genFeature.getGetAccessor());
4805
    stringBuffer.append(TEXT_1370);
5001
    stringBuffer.append(TEXT_1432);
4806
    }
5002
    }
4807
    }
5003
    }
4808
    }
5004
    }
4809
    } else if (genFeature.isUnsettable()) {
5005
    } else if (genFeature.isUnsettable()) {
4810
    stringBuffer.append(TEXT_1371);
5006
    stringBuffer.append(TEXT_1433);
4811
    stringBuffer.append(genFeature.getAccessorName());
5007
    stringBuffer.append(genFeature.getAccessorName());
4812
    stringBuffer.append(TEXT_1372);
5008
    stringBuffer.append(TEXT_1434);
4813
    } else if (genFeature.isResolveProxies()) {
5009
    } else if (genFeature.isResolveProxies()) {
4814
    if (genClass.isField(genFeature)) {
5010
    if (genClass.isField(genFeature)) {
4815
    stringBuffer.append(TEXT_1373);
5011
    stringBuffer.append(TEXT_1435);
4816
    stringBuffer.append(safeNameAccessor);
5012
    stringBuffer.append(safeNameAccessor);
4817
    stringBuffer.append(TEXT_1374);
5013
    stringBuffer.append(TEXT_1436);
4818
    } else {
5014
    } else {
4819
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5015
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4820
    stringBuffer.append(TEXT_1375);
5016
    stringBuffer.append(TEXT_1437);
4821
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5017
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4822
    stringBuffer.append(positiveOffsetCorrection);
5018
    stringBuffer.append(positiveOffsetCorrection);
4823
    stringBuffer.append(TEXT_1376);
5019
    stringBuffer.append(TEXT_1438);
4824
    } else {
5020
    } else {
4825
    stringBuffer.append(TEXT_1377);
5021
    stringBuffer.append(TEXT_1439);
4826
    stringBuffer.append(genFeature.getAccessorName());
5022
    stringBuffer.append(genFeature.getAccessorName());
4827
    stringBuffer.append(TEXT_1378);
5023
    stringBuffer.append(TEXT_1440);
4828
    }
5024
    }
4829
    }
5025
    }
4830
    } else if (!genFeature.hasEDefault()) {
5026
    } else if (!genFeature.hasEDefault()) {
4831
    if (genClass.isField(genFeature)) {
5027
    if (genClass.isField(genFeature)) {
4832
    stringBuffer.append(TEXT_1379);
5028
    stringBuffer.append(TEXT_1441);
4833
    stringBuffer.append(safeNameAccessor);
5029
    stringBuffer.append(safeNameAccessor);
4834
    stringBuffer.append(TEXT_1380);
5030
    stringBuffer.append(TEXT_1442);
4835
    } else {
5031
    } else {
4836
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5032
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4837
    stringBuffer.append(TEXT_1381);
5033
    stringBuffer.append(TEXT_1443);
4838
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5034
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4839
    stringBuffer.append(positiveOffsetCorrection);
5035
    stringBuffer.append(positiveOffsetCorrection);
4840
    stringBuffer.append(TEXT_1382);
5036
    stringBuffer.append(TEXT_1444);
4841
    } else {
5037
    } else {
4842
    stringBuffer.append(TEXT_1383);
5038
    stringBuffer.append(TEXT_1445);
4843
    stringBuffer.append(genFeature.getGetAccessor());
5039
    stringBuffer.append(genFeature.getGetAccessor());
4844
    stringBuffer.append(TEXT_1384);
5040
    stringBuffer.append(TEXT_1446);
4845
    }
5041
    }
4846
    }
5042
    }
4847
    } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
5043
    } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
4848
    if (genClass.isField(genFeature)) {
5044
    if (genClass.isField(genFeature)) {
4849
    if (genClass.isFlag(genFeature)) {
5045
    if (genClass.isFlag(genFeature)) {
4850
    if (genFeature.isBooleanType()) {
5046
    if (genFeature.isBooleanType()) {
4851
    stringBuffer.append(TEXT_1385);
5047
    stringBuffer.append(TEXT_1447);
4852
    stringBuffer.append(genClass.getFlagsField(genFeature));
5048
    stringBuffer.append(genClass.getFlagsField(genFeature));
4853
    stringBuffer.append(TEXT_1386);
5049
    stringBuffer.append(TEXT_1448);
4854
    stringBuffer.append(genFeature.getUpperName());
5050
    stringBuffer.append(genFeature.getUpperName());
4855
    stringBuffer.append(TEXT_1387);
5051
    stringBuffer.append(TEXT_1449);
4856
    stringBuffer.append(genFeature.getEDefault());
5052
    stringBuffer.append(genFeature.getEDefault());
4857
    stringBuffer.append(TEXT_1388);
5053
    stringBuffer.append(TEXT_1450);
4858
    } else {
5054
    } else {
4859
    stringBuffer.append(TEXT_1389);
5055
    stringBuffer.append(TEXT_1451);
4860
    stringBuffer.append(genClass.getFlagsField(genFeature));
5056
    stringBuffer.append(genClass.getFlagsField(genFeature));
4861
    stringBuffer.append(TEXT_1390);
5057
    stringBuffer.append(TEXT_1452);
4862
    stringBuffer.append(genFeature.getUpperName());
5058
    stringBuffer.append(genFeature.getUpperName());
4863
    stringBuffer.append(TEXT_1391);
5059
    stringBuffer.append(TEXT_1453);
4864
    stringBuffer.append(genFeature.getUpperName());
5060
    stringBuffer.append(genFeature.getUpperName());
4865
    stringBuffer.append(TEXT_1392);
5061
    stringBuffer.append(TEXT_1454);
4866
    }
5062
    }
4867
    } else {
5063
    } else {
4868
    stringBuffer.append(TEXT_1393);
5064
    stringBuffer.append(TEXT_1455);
4869
    stringBuffer.append(safeNameAccessor);
5065
    stringBuffer.append(safeNameAccessor);
4870
    stringBuffer.append(TEXT_1394);
5066
    stringBuffer.append(TEXT_1456);
4871
    stringBuffer.append(genFeature.getEDefault());
5067
    stringBuffer.append(genFeature.getEDefault());
4872
    stringBuffer.append(TEXT_1395);
5068
    stringBuffer.append(TEXT_1457);
4873
    }
5069
    }
4874
    } else {
5070
    } else {
4875
    if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5071
    if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4876
    stringBuffer.append(TEXT_1396);
5072
    stringBuffer.append(TEXT_1458);
4877
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5073
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4878
    stringBuffer.append(positiveOffsetCorrection);
5074
    stringBuffer.append(positiveOffsetCorrection);
4879
    stringBuffer.append(TEXT_1397);
5075
    stringBuffer.append(TEXT_1459);
4880
    stringBuffer.append(genFeature.getEDefault());
5076
    stringBuffer.append(genFeature.getEDefault());
4881
    stringBuffer.append(TEXT_1398);
5077
    stringBuffer.append(TEXT_1460);
4882
    stringBuffer.append(genFeature.getEDefault());
5078
    stringBuffer.append(genFeature.getEDefault());
4883
    stringBuffer.append(TEXT_1399);
5079
    stringBuffer.append(TEXT_1461);
4884
    } else {
5080
    } else {
4885
    stringBuffer.append(TEXT_1400);
5081
    stringBuffer.append(TEXT_1462);
4886
    stringBuffer.append(genFeature.getGetAccessor());
5082
    stringBuffer.append(genFeature.getGetAccessor());
4887
    stringBuffer.append(TEXT_1401);
5083
    stringBuffer.append(TEXT_1463);
4888
    stringBuffer.append(genFeature.getEDefault());
5084
    stringBuffer.append(genFeature.getEDefault());
4889
    stringBuffer.append(TEXT_1402);
5085
    stringBuffer.append(TEXT_1464);
4890
    }
5086
    }
4891
    }
5087
    }
4892
    } else {//datatype
5088
    } else {//datatype
4893
    if (genClass.isField(genFeature)) {
5089
    if (genClass.isField(genFeature)) {
4894
    stringBuffer.append(TEXT_1403);
5090
    stringBuffer.append(TEXT_1465);
4895
    stringBuffer.append(genFeature.getEDefault());
5091
    stringBuffer.append(genFeature.getEDefault());
4896
    stringBuffer.append(TEXT_1404);
5092
    stringBuffer.append(TEXT_1466);
4897
    stringBuffer.append(safeNameAccessor);
5093
    stringBuffer.append(safeNameAccessor);
4898
    stringBuffer.append(TEXT_1405);
5094
    stringBuffer.append(TEXT_1467);
4899
    stringBuffer.append(genFeature.getEDefault());
5095
    stringBuffer.append(genFeature.getEDefault());
4900
    stringBuffer.append(TEXT_1406);
5096
    stringBuffer.append(TEXT_1468);
4901
    stringBuffer.append(safeNameAccessor);
5097
    stringBuffer.append(safeNameAccessor);
4902
    stringBuffer.append(TEXT_1407);
5098
    stringBuffer.append(TEXT_1469);
4903
    } else {
5099
    } else {
4904
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5100
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4905
    stringBuffer.append(TEXT_1408);
5101
    stringBuffer.append(TEXT_1470);
4906
    stringBuffer.append(genFeature.getImportedType(genClass));
5102
    stringBuffer.append(genFeature.getImportedType(genClass));
4907
    stringBuffer.append(TEXT_1409);
5103
    stringBuffer.append(TEXT_1471);
4908
    stringBuffer.append(safeNameAccessor);
5104
    stringBuffer.append(safeNameAccessor);
4909
    stringBuffer.append(TEXT_1410);
5105
    stringBuffer.append(TEXT_1472);
4910
    stringBuffer.append(genFeature.getImportedType(genClass));
5106
    stringBuffer.append(genFeature.getImportedType(genClass));
4911
    stringBuffer.append(TEXT_1411);
5107
    stringBuffer.append(TEXT_1473);
4912
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5108
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4913
    stringBuffer.append(positiveOffsetCorrection);
5109
    stringBuffer.append(positiveOffsetCorrection);
4914
    stringBuffer.append(TEXT_1412);
5110
    stringBuffer.append(TEXT_1474);
4915
    stringBuffer.append(genFeature.getEDefault());
5111
    stringBuffer.append(genFeature.getEDefault());
4916
    stringBuffer.append(TEXT_1413);
5112
    stringBuffer.append(TEXT_1475);
4917
    stringBuffer.append(genFeature.getEDefault());
5113
    stringBuffer.append(genFeature.getEDefault());
4918
    stringBuffer.append(TEXT_1414);
5114
    stringBuffer.append(TEXT_1476);
4919
    stringBuffer.append(safeNameAccessor);
5115
    stringBuffer.append(safeNameAccessor);
4920
    stringBuffer.append(TEXT_1415);
5116
    stringBuffer.append(TEXT_1477);
4921
    stringBuffer.append(genFeature.getEDefault());
5117
    stringBuffer.append(genFeature.getEDefault());
4922
    stringBuffer.append(TEXT_1416);
5118
    stringBuffer.append(TEXT_1478);
4923
    stringBuffer.append(safeNameAccessor);
5119
    stringBuffer.append(safeNameAccessor);
4924
    stringBuffer.append(TEXT_1417);
5120
    stringBuffer.append(TEXT_1479);
4925
    } else {
5121
    } else {
4926
    stringBuffer.append(TEXT_1418);
5122
    stringBuffer.append(TEXT_1480);
4927
    stringBuffer.append(genFeature.getEDefault());
5123
    stringBuffer.append(genFeature.getEDefault());
4928
    stringBuffer.append(TEXT_1419);
5124
    stringBuffer.append(TEXT_1481);
4929
    stringBuffer.append(genFeature.getGetAccessor());
5125
    stringBuffer.append(genFeature.getGetAccessor());
4930
    stringBuffer.append(TEXT_1420);
5126
    stringBuffer.append(TEXT_1482);
4931
    stringBuffer.append(genFeature.getEDefault());
5127
    stringBuffer.append(genFeature.getEDefault());
4932
    stringBuffer.append(TEXT_1421);
5128
    stringBuffer.append(TEXT_1483);
4933
    stringBuffer.append(genFeature.getGetAccessor());
5129
    stringBuffer.append(genFeature.getGetAccessor());
4934
    stringBuffer.append(TEXT_1422);
5130
    stringBuffer.append(TEXT_1484);
4935
    }
5131
    }
4936
    }
5132
    }
4937
    }
5133
    }
4938
    }
5134
    }
4939
    stringBuffer.append(TEXT_1423);
5135
    stringBuffer.append(TEXT_1485);
4940
    if (genModel.isMinimalReflectiveMethods()) {
5136
    if (genModel.isMinimalReflectiveMethods()) {
4941
    stringBuffer.append(TEXT_1424);
5137
    stringBuffer.append(TEXT_1486);
4942
    } else {
5138
    } else {
4943
    stringBuffer.append(TEXT_1425);
5139
    stringBuffer.append(TEXT_1487);
4944
    }
5140
    }
4945
    stringBuffer.append(TEXT_1426);
5141
    stringBuffer.append(TEXT_1488);
4946
    //Class/eIsSet.override.javajetinc
5142
    //Class/eIsSet.override.javajetinc
4947
    }
5143
    }
4948
    if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) {
5144
    if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) {
4949
    if (!genClass.getMixinGenFeatures().isEmpty()) {
5145
    if (!genClass.getMixinGenFeatures().isEmpty()) {
4950
    stringBuffer.append(TEXT_1427);
5146
    stringBuffer.append(TEXT_1489);
4951
    if (genModel.useClassOverrideAnnotation()) {
5147
    if (genModel.useClassOverrideAnnotation()) {
4952
    stringBuffer.append(TEXT_1428);
5148
    stringBuffer.append(TEXT_1490);
4953
    }
5149
    }
4954
    stringBuffer.append(TEXT_1429);
5150
    stringBuffer.append(TEXT_1491);
4955
    stringBuffer.append(singleWildcard);
5151
    stringBuffer.append(singleWildcard);
4956
    stringBuffer.append(TEXT_1430);
5152
    stringBuffer.append(TEXT_1492);
4957
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
5153
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
4958
    stringBuffer.append(TEXT_1431);
5154
    stringBuffer.append(TEXT_1493);
4959
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
5155
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
4960
    stringBuffer.append(TEXT_1432);
5156
    stringBuffer.append(TEXT_1494);
4961
    stringBuffer.append(negativeOffsetCorrection);
5157
    stringBuffer.append(negativeOffsetCorrection);
4962
    stringBuffer.append(TEXT_1433);
5158
    stringBuffer.append(TEXT_1495);
4963
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
5159
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
4964
    stringBuffer.append(TEXT_1434);
5160
    stringBuffer.append(TEXT_1496);
4965
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5161
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4966
    stringBuffer.append(TEXT_1435);
5162
    stringBuffer.append(TEXT_1497);
4967
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
5163
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
4968
    stringBuffer.append(TEXT_1436);
5164
    stringBuffer.append(TEXT_1498);
4969
    }
5165
    }
4970
    stringBuffer.append(TEXT_1437);
5166
    stringBuffer.append(TEXT_1499);
4971
    }
5167
    }
4972
    stringBuffer.append(TEXT_1438);
5168
    stringBuffer.append(TEXT_1500);
4973
    }
5169
    }
4974
    stringBuffer.append(TEXT_1439);
5170
    stringBuffer.append(TEXT_1501);
4975
    if (genModel.useClassOverrideAnnotation()) {
5171
    if (genModel.useClassOverrideAnnotation()) {
4976
    stringBuffer.append(TEXT_1440);
5172
    stringBuffer.append(TEXT_1502);
4977
    }
5173
    }
4978
    stringBuffer.append(TEXT_1441);
5174
    stringBuffer.append(TEXT_1503);
4979
    stringBuffer.append(singleWildcard);
5175
    stringBuffer.append(singleWildcard);
4980
    stringBuffer.append(TEXT_1442);
5176
    stringBuffer.append(TEXT_1504);
4981
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
5177
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
4982
    stringBuffer.append(TEXT_1443);
5178
    stringBuffer.append(TEXT_1505);
4983
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
5179
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
4984
    stringBuffer.append(TEXT_1444);
5180
    stringBuffer.append(TEXT_1506);
4985
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
5181
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
4986
    stringBuffer.append(TEXT_1445);
5182
    stringBuffer.append(TEXT_1507);
4987
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
5183
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
4988
    stringBuffer.append(TEXT_1446);
5184
    stringBuffer.append(TEXT_1508);
4989
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5185
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4990
    stringBuffer.append(positiveOffsetCorrection);
5186
    stringBuffer.append(positiveOffsetCorrection);
4991
    stringBuffer.append(TEXT_1447);
5187
    stringBuffer.append(TEXT_1509);
4992
    }
5188
    }
4993
    stringBuffer.append(TEXT_1448);
5189
    stringBuffer.append(TEXT_1510);
4994
    }
5190
    }
4995
    if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) {
5191
    if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) {
4996
    stringBuffer.append(TEXT_1449);
5192
    stringBuffer.append(TEXT_1511);
4997
    stringBuffer.append(genClass.getRawImportedInterfaceName());
5193
    stringBuffer.append(genClass.getRawImportedInterfaceName());
4998
    stringBuffer.append(TEXT_1450);
5194
    stringBuffer.append(TEXT_1512);
4999
    stringBuffer.append(negativeOffsetCorrection);
5195
    stringBuffer.append(negativeOffsetCorrection);
5000
    stringBuffer.append(TEXT_1451);
5196
    stringBuffer.append(TEXT_1513);
5001
    for (GenFeature genFeature : genClass.getGenFeatures()) {
5197
    for (GenFeature genFeature : genClass.getGenFeatures()) {
5002
    stringBuffer.append(TEXT_1452);
5198
    stringBuffer.append(TEXT_1514);
5003
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5199
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5004
    stringBuffer.append(TEXT_1453);
5200
    stringBuffer.append(TEXT_1515);
5005
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5201
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5006
    stringBuffer.append(positiveOffsetCorrection);
5202
    stringBuffer.append(positiveOffsetCorrection);
5007
    stringBuffer.append(TEXT_1454);
5203
    stringBuffer.append(TEXT_1516);
5008
    }
5204
    }
5009
    stringBuffer.append(TEXT_1455);
5205
    stringBuffer.append(TEXT_1517);
5010
    }
5206
    }
5011
    stringBuffer.append(TEXT_1456);
5207
    stringBuffer.append(TEXT_1518);
5012
    }
5208
    }
5013
    if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
5209
    if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
5014
    if (eVirtualValuesField != null) {
5210
    if (eVirtualValuesField != null) {
5015
    stringBuffer.append(TEXT_1457);
5211
    stringBuffer.append(TEXT_1519);
5016
    if (genModel.useClassOverrideAnnotation()) {
5212
    if (genModel.useClassOverrideAnnotation()) {
5017
    stringBuffer.append(TEXT_1458);
5213
    stringBuffer.append(TEXT_1520);
5018
    }
5214
    }
5019
    stringBuffer.append(TEXT_1459);
5215
    stringBuffer.append(TEXT_1521);
5020
    stringBuffer.append(eVirtualValuesField);
5216
    stringBuffer.append(eVirtualValuesField);
5021
    stringBuffer.append(TEXT_1460);
5217
    stringBuffer.append(TEXT_1522);
5022
    if (genModel.useClassOverrideAnnotation()) {
5218
    if (genModel.useClassOverrideAnnotation()) {
5023
    stringBuffer.append(TEXT_1461);
5219
    stringBuffer.append(TEXT_1523);
5024
    }
5220
    }
5025
    stringBuffer.append(TEXT_1462);
5221
    stringBuffer.append(TEXT_1524);
5026
    stringBuffer.append(eVirtualValuesField);
5222
    stringBuffer.append(eVirtualValuesField);
5027
    stringBuffer.append(TEXT_1463);
5223
    stringBuffer.append(TEXT_1525);
5028
    }
5224
    }
5029
    { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());
5225
    { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());
5030
    if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>());
5226
    if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>());
5031
    stringBuffer.append(TEXT_1464);
5227
    stringBuffer.append(TEXT_1526);
5032
    if (genModel.useClassOverrideAnnotation()) {
5228
    if (genModel.useClassOverrideAnnotation()) {
5033
    stringBuffer.append(TEXT_1465);
5229
    stringBuffer.append(TEXT_1527);
5034
    }
5230
    }
5035
    stringBuffer.append(TEXT_1466);
5231
    stringBuffer.append(TEXT_1528);
5036
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5232
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5037
    stringBuffer.append(TEXT_1467);
5233
    stringBuffer.append(TEXT_1529);
5038
    stringBuffer.append(i);
5234
    stringBuffer.append(i);
5039
    stringBuffer.append(TEXT_1468);
5235
    stringBuffer.append(TEXT_1530);
5040
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5236
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5041
    stringBuffer.append(TEXT_1469);
5237
    stringBuffer.append(TEXT_1531);
5042
    }
5238
    }
5043
    stringBuffer.append(TEXT_1470);
5239
    stringBuffer.append(TEXT_1532);
5044
    if (genModel.useClassOverrideAnnotation()) {
5240
    if (genModel.useClassOverrideAnnotation()) {
5045
    stringBuffer.append(TEXT_1471);
5241
    stringBuffer.append(TEXT_1533);
5046
    }
5242
    }
5047
    stringBuffer.append(TEXT_1472);
5243
    stringBuffer.append(TEXT_1534);
5048
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5244
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5049
    stringBuffer.append(TEXT_1473);
5245
    stringBuffer.append(TEXT_1535);
5050
    stringBuffer.append(i);
5246
    stringBuffer.append(i);
5051
    stringBuffer.append(TEXT_1474);
5247
    stringBuffer.append(TEXT_1536);
5052
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5248
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5053
    stringBuffer.append(TEXT_1475);
5249
    stringBuffer.append(TEXT_1537);
5054
    }
5250
    }
5055
    stringBuffer.append(TEXT_1476);
5251
    stringBuffer.append(TEXT_1538);
5056
    }
5252
    }
5057
    }
5253
    }
5058
    }
5254
    }
5059
    if (!genClass.hasImplementedToStringGenOperation() && isImplementation && !genModel.isReflectiveDelegation() && !genModel.isDynamicDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
5255
    if (!genClass.hasImplementedToStringGenOperation() && isImplementation && !genModel.isReflectiveDelegation() && !genModel.isDynamicDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
5060
    stringBuffer.append(TEXT_1477);
5256
    stringBuffer.append(TEXT_1539);
5061
    if (genModel.useClassOverrideAnnotation()) {
5257
    if (genModel.useClassOverrideAnnotation()) {
5062
    stringBuffer.append(TEXT_1478);
5258
    stringBuffer.append(TEXT_1540);
5063
    }
5259
    }
5064
    stringBuffer.append(TEXT_1479);
5260
    stringBuffer.append(TEXT_1541);
5065
    { boolean first = true;
5261
    { boolean first = true;
5066
    for (GenFeature genFeature : genClass.getToStringGenFeatures()) {
5262
    for (GenFeature genFeature : genClass.getToStringGenFeatures()) {
5067
    if (first) { first = false;
5263
    if (first) { first = false;
5068
    stringBuffer.append(TEXT_1480);
5264
    stringBuffer.append(TEXT_1542);
5069
    stringBuffer.append(genFeature.getName());
5265
    stringBuffer.append(genFeature.getName());
5070
    stringBuffer.append(TEXT_1481);
5266
    stringBuffer.append(TEXT_1543);
5071
    stringBuffer.append(genModel.getNonNLS());
5267
    stringBuffer.append(genModel.getNonNLS());
5072
    } else {
5268
    } else {
5073
    stringBuffer.append(TEXT_1482);
5269
    stringBuffer.append(TEXT_1544);
5074
    stringBuffer.append(genFeature.getName());
5270
    stringBuffer.append(genFeature.getName());
5075
    stringBuffer.append(TEXT_1483);
5271
    stringBuffer.append(TEXT_1545);
5076
    stringBuffer.append(genModel.getNonNLS());
5272
    stringBuffer.append(genModel.getNonNLS());
5077
    }
5273
    }
5078
    if (genFeature.isUnsettable() && !genFeature.isListType()) {
5274
    if (genFeature.isUnsettable() && !genFeature.isListType()) {
5079
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5275
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5080
    stringBuffer.append(TEXT_1484);
5276
    stringBuffer.append(TEXT_1546);
5081
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5277
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5082
    stringBuffer.append(positiveOffsetCorrection);
5278
    stringBuffer.append(positiveOffsetCorrection);
5083
    stringBuffer.append(TEXT_1485);
5279
    stringBuffer.append(TEXT_1547);
5084
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5280
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5085
    stringBuffer.append(positiveOffsetCorrection);
5281
    stringBuffer.append(positiveOffsetCorrection);
5086
    stringBuffer.append(TEXT_1486);
5282
    stringBuffer.append(TEXT_1548);
5087
    stringBuffer.append(genModel.getNonNLS());
5283
    stringBuffer.append(genModel.getNonNLS());
5088
    } else {
5284
    } else {
5089
    if (genClass.isFlag(genFeature)) {
5285
    if (genClass.isFlag(genFeature)) {
5090
    if (genFeature.isBooleanType()) {
5286
    if (genFeature.isBooleanType()) {
5091
    stringBuffer.append(TEXT_1487);
5287
    stringBuffer.append(TEXT_1549);
5092
    if (genClass.isESetFlag(genFeature)) {
5288
    if (genClass.isESetFlag(genFeature)) {
5093
    stringBuffer.append(TEXT_1488);
5289
    stringBuffer.append(TEXT_1550);
5094
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5290
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5095
    stringBuffer.append(TEXT_1489);
5291
    stringBuffer.append(TEXT_1551);
5096
    stringBuffer.append(genFeature.getUpperName());
5292
    stringBuffer.append(genFeature.getUpperName());
5097
    stringBuffer.append(TEXT_1490);
5293
    stringBuffer.append(TEXT_1552);
5098
    } else {
5294
    } else {
5099
    stringBuffer.append(genFeature.getUncapName());
5295
    stringBuffer.append(genFeature.getUncapName());
5100
    stringBuffer.append(TEXT_1491);
5296
    stringBuffer.append(TEXT_1553);
5101
    }
5297
    }
5102
    stringBuffer.append(TEXT_1492);
5298
    stringBuffer.append(TEXT_1554);
5103
    stringBuffer.append(genClass.getFlagsField(genFeature));
5299
    stringBuffer.append(genClass.getFlagsField(genFeature));
5104
    stringBuffer.append(TEXT_1493);
5300
    stringBuffer.append(TEXT_1555);
5105
    stringBuffer.append(genFeature.getUpperName());
5301
    stringBuffer.append(genFeature.getUpperName());
5106
    stringBuffer.append(TEXT_1494);
5302
    stringBuffer.append(TEXT_1556);
5107
    stringBuffer.append(genModel.getNonNLS());
5303
    stringBuffer.append(genModel.getNonNLS());
5108
    } else {
5304
    } else {
5109
    stringBuffer.append(TEXT_1495);
5305
    stringBuffer.append(TEXT_1557);
5110
    if (genClass.isESetFlag(genFeature)) {
5306
    if (genClass.isESetFlag(genFeature)) {
5111
    stringBuffer.append(TEXT_1496);
5307
    stringBuffer.append(TEXT_1558);
5112
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5308
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5113
    stringBuffer.append(TEXT_1497);
5309
    stringBuffer.append(TEXT_1559);
5114
    stringBuffer.append(genFeature.getUpperName());
5310
    stringBuffer.append(genFeature.getUpperName());
5115
    stringBuffer.append(TEXT_1498);
5311
    stringBuffer.append(TEXT_1560);
5116
    } else {
5312
    } else {
5117
    stringBuffer.append(genFeature.getUncapName());
5313
    stringBuffer.append(genFeature.getUncapName());
5118
    stringBuffer.append(TEXT_1499);
5314
    stringBuffer.append(TEXT_1561);
5119
    }
5315
    }
5120
    stringBuffer.append(TEXT_1500);
5316
    stringBuffer.append(TEXT_1562);
5121
    stringBuffer.append(genFeature.getUpperName());
5317
    stringBuffer.append(genFeature.getUpperName());
5122
    stringBuffer.append(TEXT_1501);
5318
    stringBuffer.append(TEXT_1563);
5123
    stringBuffer.append(genClass.getFlagsField(genFeature));
5319
    stringBuffer.append(genClass.getFlagsField(genFeature));
5124
    stringBuffer.append(TEXT_1502);
5320
    stringBuffer.append(TEXT_1564);
5125
    stringBuffer.append(genFeature.getUpperName());
5321
    stringBuffer.append(genFeature.getUpperName());
5126
    stringBuffer.append(TEXT_1503);
5322
    stringBuffer.append(TEXT_1565);
5127
    stringBuffer.append(genFeature.getUpperName());
5323
    stringBuffer.append(genFeature.getUpperName());
5128
    stringBuffer.append(TEXT_1504);
5324
    stringBuffer.append(TEXT_1566);
5129
    stringBuffer.append(genModel.getNonNLS());
5325
    stringBuffer.append(genModel.getNonNLS());
5130
    }
5326
    }
5131
    } else {
5327
    } else {
5132
    stringBuffer.append(TEXT_1505);
5328
    stringBuffer.append(TEXT_1567);
5133
    if (genClass.isESetFlag(genFeature)) {
5329
    if (genClass.isESetFlag(genFeature)) {
5134
    stringBuffer.append(TEXT_1506);
5330
    stringBuffer.append(TEXT_1568);
5135
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5331
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5136
    stringBuffer.append(TEXT_1507);
5332
    stringBuffer.append(TEXT_1569);
5137
    stringBuffer.append(genFeature.getUpperName());
5333
    stringBuffer.append(genFeature.getUpperName());
5138
    stringBuffer.append(TEXT_1508);
5334
    stringBuffer.append(TEXT_1570);
5139
    } else {
5335
    } else {
5140
    stringBuffer.append(genFeature.getUncapName());
5336
    stringBuffer.append(genFeature.getUncapName());
5141
    stringBuffer.append(TEXT_1509);
5337
    stringBuffer.append(TEXT_1571);
5142
    }
5338
    }
5143
    stringBuffer.append(TEXT_1510);
5339
    stringBuffer.append(TEXT_1572);
5144
    stringBuffer.append(genFeature.getSafeName());
5340
    stringBuffer.append(genFeature.getSafeName());
5145
    stringBuffer.append(TEXT_1511);
5341
    stringBuffer.append(TEXT_1573);
5146
    stringBuffer.append(genModel.getNonNLS());
5342
    stringBuffer.append(genModel.getNonNLS());
5147
    }
5343
    }
5148
    }
5344
    }
5149
    } else {
5345
    } else {
5150
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5346
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5151
    stringBuffer.append(TEXT_1512);
5347
    stringBuffer.append(TEXT_1574);
5152
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5348
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5153
    stringBuffer.append(positiveOffsetCorrection);
5349
    stringBuffer.append(positiveOffsetCorrection);
5154
    if (!genFeature.isListType() && !genFeature.isReferenceType()){
5350
    if (!genFeature.isListType() && !genFeature.isReferenceType()){
5155
    stringBuffer.append(TEXT_1513);
5351
    stringBuffer.append(TEXT_1575);
5156
    stringBuffer.append(genFeature.getEDefault());
5352
    stringBuffer.append(genFeature.getEDefault());
5157
    }
5353
    }
5158
    stringBuffer.append(TEXT_1514);
5354
    stringBuffer.append(TEXT_1576);
5159
    } else {
5355
    } else {
5160
    if (genClass.isFlag(genFeature)) {
5356
    if (genClass.isFlag(genFeature)) {
5161
    if (genFeature.isBooleanType()) {
5357
    if (genFeature.isBooleanType()) {
5162
    stringBuffer.append(TEXT_1515);
5358
    stringBuffer.append(TEXT_1577);
5163
    stringBuffer.append(genClass.getFlagsField(genFeature));
5359
    stringBuffer.append(genClass.getFlagsField(genFeature));
5164
    stringBuffer.append(TEXT_1516);
5360
    stringBuffer.append(TEXT_1578);
5165
    stringBuffer.append(genFeature.getUpperName());
5361
    stringBuffer.append(genFeature.getUpperName());
5166
    stringBuffer.append(TEXT_1517);
5362
    stringBuffer.append(TEXT_1579);
5167
    } else {
5363
    } else {
5168
    stringBuffer.append(TEXT_1518);
5364
    stringBuffer.append(TEXT_1580);
5169
    stringBuffer.append(genFeature.getUpperName());
5365
    stringBuffer.append(genFeature.getUpperName());
5170
    stringBuffer.append(TEXT_1519);
5366
    stringBuffer.append(TEXT_1581);
5171
    stringBuffer.append(genClass.getFlagsField(genFeature));
5367
    stringBuffer.append(genClass.getFlagsField(genFeature));
5172
    stringBuffer.append(TEXT_1520);
5368
    stringBuffer.append(TEXT_1582);
5173
    stringBuffer.append(genFeature.getUpperName());
5369
    stringBuffer.append(genFeature.getUpperName());
5174
    stringBuffer.append(TEXT_1521);
5370
    stringBuffer.append(TEXT_1583);
5175
    stringBuffer.append(genFeature.getUpperName());
5371
    stringBuffer.append(genFeature.getUpperName());
5176
    stringBuffer.append(TEXT_1522);
5372
    stringBuffer.append(TEXT_1584);
5177
    }
5373
    }
5178
    } else {
5374
    } else {
5179
    stringBuffer.append(TEXT_1523);
5375
    stringBuffer.append(TEXT_1585);
5180
    stringBuffer.append(genFeature.getSafeName());
5376
    stringBuffer.append(genFeature.getSafeName());
5181
    stringBuffer.append(TEXT_1524);
5377
    stringBuffer.append(TEXT_1586);
5182
    }
5378
    }
5183
    }
5379
    }
5184
    }
5380
    }
5185
    }
5381
    }
5186
    }
5382
    }
5187
    stringBuffer.append(TEXT_1525);
5383
    stringBuffer.append(TEXT_1587);
5188
    }
5384
    }
5189
    if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
5385
    if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
5190
    String objectType = genModel.getImportedName("java.lang.Object");
5386
    String objectType = genModel.getImportedName("java.lang.Object");
5191
    String keyType = isJDK50 ? keyFeature.getObjectType(genClass) : objectType;
5387
    String keyType = isJDK50 ? keyFeature.getObjectType(genClass) : objectType;
5192
    String valueType = isJDK50 ? valueFeature.getObjectType(genClass) : objectType;
5388
    String valueType = isJDK50 ? valueFeature.getObjectType(genClass) : objectType;
5193
    String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (isJDK50 ? "<" + keyType + ", " + valueType + ">" : "");
5389
    String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (isJDK50 ? "<" + keyType + ", " + valueType + ">" : "");
5194
    stringBuffer.append(TEXT_1526);
5390
    stringBuffer.append(TEXT_1588);
5195
    stringBuffer.append(objectType);
5391
    stringBuffer.append(objectType);
5196
    stringBuffer.append(TEXT_1527);
5392
    stringBuffer.append(TEXT_1589);
5197
    stringBuffer.append(keyType);
5393
    stringBuffer.append(keyType);
5198
    stringBuffer.append(TEXT_1528);
5394
    stringBuffer.append(TEXT_1590);
5199
    if (!isJDK50 && keyFeature.isPrimitiveType()) {
5395
    if (!isJDK50 && keyFeature.isPrimitiveType()) {
5200
    stringBuffer.append(TEXT_1529);
5396
    stringBuffer.append(TEXT_1591);
5201
    stringBuffer.append(keyFeature.getObjectType(genClass));
5397
    stringBuffer.append(keyFeature.getObjectType(genClass));
5202
    stringBuffer.append(TEXT_1530);
5398
    stringBuffer.append(TEXT_1592);
5203
    } else {
5399
    } else {
5204
    stringBuffer.append(TEXT_1531);
5400
    stringBuffer.append(TEXT_1593);
5205
    }
5401
    }
5206
    stringBuffer.append(TEXT_1532);
5402
    stringBuffer.append(TEXT_1594);
5207
    stringBuffer.append(keyType);
5403
    stringBuffer.append(keyType);
5208
    stringBuffer.append(TEXT_1533);
5404
    stringBuffer.append(TEXT_1595);
5209
    if (keyFeature.isListType()) {
5405
    if (keyFeature.isListType()) {
5210
    stringBuffer.append(TEXT_1534);
5406
    stringBuffer.append(TEXT_1596);
5211
    if (!genModel.useGenerics()) {
5407
    if (!genModel.useGenerics()) {
5212
    stringBuffer.append(TEXT_1535);
5408
    stringBuffer.append(TEXT_1597);
5213
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5409
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5214
    stringBuffer.append(TEXT_1536);
5410
    stringBuffer.append(TEXT_1598);
5215
    }
5411
    }
5216
    stringBuffer.append(TEXT_1537);
5412
    stringBuffer.append(TEXT_1599);
5217
    } else if (isJDK50) {
5413
    } else if (isJDK50) {
5218
    stringBuffer.append(TEXT_1538);
5414
    stringBuffer.append(TEXT_1600);
5219
    } else if (keyFeature.isPrimitiveType()) {
5415
    } else if (keyFeature.isPrimitiveType()) {
5220
    stringBuffer.append(TEXT_1539);
5416
    stringBuffer.append(TEXT_1601);
5221
    stringBuffer.append(keyFeature.getObjectType(genClass));
5417
    stringBuffer.append(keyFeature.getObjectType(genClass));
5222
    stringBuffer.append(TEXT_1540);
5418
    stringBuffer.append(TEXT_1602);
5223
    stringBuffer.append(keyFeature.getPrimitiveValueFunction());
5419
    stringBuffer.append(keyFeature.getPrimitiveValueFunction());
5224
    stringBuffer.append(TEXT_1541);
5420
    stringBuffer.append(TEXT_1603);
5225
    } else {
5421
    } else {
5226
    stringBuffer.append(TEXT_1542);
5422
    stringBuffer.append(TEXT_1604);
5227
    stringBuffer.append(keyFeature.getImportedType(genClass));
5423
    stringBuffer.append(keyFeature.getImportedType(genClass));
5228
    stringBuffer.append(TEXT_1543);
5424
    stringBuffer.append(TEXT_1605);
5229
    }
5425
    }
5230
    stringBuffer.append(TEXT_1544);
5426
    stringBuffer.append(TEXT_1606);
5231
    stringBuffer.append(valueType);
5427
    stringBuffer.append(valueType);
5232
    stringBuffer.append(TEXT_1545);
5428
    stringBuffer.append(TEXT_1607);
5233
    if (!isJDK50 && valueFeature.isPrimitiveType()) {
5429
    if (!isJDK50 && valueFeature.isPrimitiveType()) {
5234
    stringBuffer.append(TEXT_1546);
5430
    stringBuffer.append(TEXT_1608);
5235
    stringBuffer.append(valueFeature.getObjectType(genClass));
5431
    stringBuffer.append(valueFeature.getObjectType(genClass));
5236
    stringBuffer.append(TEXT_1547);
5432
    stringBuffer.append(TEXT_1609);
5237
    } else {
5433
    } else {
5238
    stringBuffer.append(TEXT_1548);
5434
    stringBuffer.append(TEXT_1610);
5239
    }
5435
    }
5240
    stringBuffer.append(TEXT_1549);
5436
    stringBuffer.append(TEXT_1611);
5241
    stringBuffer.append(valueType);
5437
    stringBuffer.append(valueType);
5242
    stringBuffer.append(TEXT_1550);
5438
    stringBuffer.append(TEXT_1612);
5243
    stringBuffer.append(valueType);
5439
    stringBuffer.append(valueType);
5244
    stringBuffer.append(TEXT_1551);
5440
    stringBuffer.append(TEXT_1613);
5245
    stringBuffer.append(valueType);
5441
    stringBuffer.append(valueType);
5246
    stringBuffer.append(TEXT_1552);
5442
    stringBuffer.append(TEXT_1614);
5247
    if (valueFeature.isListType()) {
5443
    if (valueFeature.isListType()) {
5248
    stringBuffer.append(TEXT_1553);
5444
    stringBuffer.append(TEXT_1615);
5249
    if (!genModel.useGenerics()) {
5445
    if (!genModel.useGenerics()) {
5250
    stringBuffer.append(TEXT_1554);
5446
    stringBuffer.append(TEXT_1616);
5251
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5447
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5252
    stringBuffer.append(TEXT_1555);
5448
    stringBuffer.append(TEXT_1617);
5253
    }
5449
    }
5254
    stringBuffer.append(TEXT_1556);
5450
    stringBuffer.append(TEXT_1618);
5255
    } else if (isJDK50) {
5451
    } else if (isJDK50) {
5256
    stringBuffer.append(TEXT_1557);
5452
    stringBuffer.append(TEXT_1619);
5257
    } else if (valueFeature.isPrimitiveType()) {
5453
    } else if (valueFeature.isPrimitiveType()) {
5258
    stringBuffer.append(TEXT_1558);
5454
    stringBuffer.append(TEXT_1620);
5259
    stringBuffer.append(valueFeature.getObjectType(genClass));
5455
    stringBuffer.append(valueFeature.getObjectType(genClass));
5260
    stringBuffer.append(TEXT_1559);
5456
    stringBuffer.append(TEXT_1621);
5261
    stringBuffer.append(valueFeature.getPrimitiveValueFunction());
5457
    stringBuffer.append(valueFeature.getPrimitiveValueFunction());
5262
    stringBuffer.append(TEXT_1560);
5458
    stringBuffer.append(TEXT_1622);
5263
    } else {
5459
    } else {
5264
    stringBuffer.append(TEXT_1561);
5460
    stringBuffer.append(TEXT_1623);
5265
    stringBuffer.append(valueFeature.getImportedType(genClass));
5461
    stringBuffer.append(valueFeature.getImportedType(genClass));
5266
    stringBuffer.append(TEXT_1562);
5462
    stringBuffer.append(TEXT_1624);
5267
    }
5463
    }
5268
    stringBuffer.append(TEXT_1563);
5464
    stringBuffer.append(TEXT_1625);
5269
    if (genModel.useGenerics()) {
5465
    if (genModel.useGenerics()) {
5270
    stringBuffer.append(TEXT_1564);
5466
    stringBuffer.append(TEXT_1626);
5271
    }
5467
    }
5272
    stringBuffer.append(TEXT_1565);
5468
    stringBuffer.append(TEXT_1627);
5273
    stringBuffer.append(eMapType);
5469
    stringBuffer.append(eMapType);
5274
    stringBuffer.append(TEXT_1566);
5470
    stringBuffer.append(TEXT_1628);
5275
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
5471
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
5276
    stringBuffer.append(TEXT_1567);
5472
    stringBuffer.append(TEXT_1629);
5277
    stringBuffer.append(eMapType);
5473
    stringBuffer.append(eMapType);
5278
    stringBuffer.append(TEXT_1568);
5474
    stringBuffer.append(TEXT_1630);
5279
    }
5475
    }
5280
    stringBuffer.append(TEXT_1569);
5476
    stringBuffer.append(TEXT_1631);
5281
    stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
5477
    stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
5282
    // TODO fix the space above
5478
    // TODO fix the space above
5283
    genModel.emitSortedImports();
5479
    genModel.emitSortedImports();
5284
    stringBuffer.append(TEXT_1570);
5480
    stringBuffer.append(TEXT_1632);
5285
    return stringBuffer.toString();
5481
    return stringBuffer.toString();
5286
  }
5482
  }
5287
}
5483
}
(-)src/org/eclipse/emf/codegen/ecore/templates/model/ValidatorClass.java (-790 / +1065 lines)
Lines 157-580 Link Here
157
  protected final String TEXT_139 = "(";
157
  protected final String TEXT_139 = "(";
158
  protected final String TEXT_140 = ")";
158
  protected final String TEXT_140 = ")";
159
  protected final String TEXT_141 = NL + "\t\t\t });" + NL;
159
  protected final String TEXT_141 = NL + "\t\t\t });" + NL;
160
  protected final String TEXT_142 = NL + "\t/**" + NL + "\t * Validates the ";
160
  protected final String TEXT_142 = NL + "\t/**" + NL + "\t * The cached validation expression for the ";
161
  protected final String TEXT_143 = " constraint of '<em>";
161
  protected final String TEXT_143 = " constraint of '<em>";
162
  protected final String TEXT_144 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean validate";
162
  protected final String TEXT_144 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected static final ";
163
  protected final String TEXT_145 = "_";
163
  protected final String TEXT_145 = " ";
164
  protected final String TEXT_146 = "(";
164
  protected final String TEXT_146 = "__";
165
  protected final String TEXT_147 = " ";
165
  protected final String TEXT_147 = "__EXP = \"";
166
  protected final String TEXT_148 = ", DiagnosticChain ";
166
  protected final String TEXT_148 = "\";";
167
  protected final String TEXT_149 = ", ";
167
  protected final String TEXT_149 = NL;
168
  protected final String TEXT_150 = " ";
168
  protected final String TEXT_150 = NL + "\t/**" + NL + "\t * Validates the ";
169
  protected final String TEXT_151 = ")" + NL + "\t{";
169
  protected final String TEXT_151 = " constraint of '<em>";
170
  protected final String TEXT_152 = NL + "\t\tboolean ";
170
  protected final String TEXT_152 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean validate";
171
  protected final String TEXT_153 = " = true;" + NL + "\t\tfor (";
171
  protected final String TEXT_153 = "_";
172
  protected final String TEXT_154 = " i = ";
172
  protected final String TEXT_154 = "(";
173
  protected final String TEXT_155 = ".iterator(); i.hasNext() && (result || diagnostics != null); )" + NL + "\t\t{" + NL + "\t\t\tObject item = i.next();";
173
  protected final String TEXT_155 = " ";
174
  protected final String TEXT_156 = NL + "\t\t\tif (";
174
  protected final String TEXT_156 = ", DiagnosticChain ";
175
  protected final String TEXT_157 = ".isInstance(item))" + NL + "\t\t\t{" + NL + "\t\t\t\tresult &= ";
175
  protected final String TEXT_157 = ", ";
176
  protected final String TEXT_158 = "validate";
176
  protected final String TEXT_158 = " ";
177
  protected final String TEXT_159 = "(";
177
  protected final String TEXT_159 = ")" + NL + "\t{";
178
  protected final String TEXT_160 = "(";
178
  protected final String TEXT_160 = NL + "\t\tboolean ";
179
  protected final String TEXT_161 = "(";
179
  protected final String TEXT_161 = " = true;" + NL + "\t\tfor (";
180
  protected final String TEXT_162 = ")";
180
  protected final String TEXT_162 = " i = ";
181
  protected final String TEXT_163 = ").";
181
  protected final String TEXT_163 = ".iterator(); i.hasNext() && (result || diagnostics != null); )" + NL + "\t\t{" + NL + "\t\t\tObject item = i.next();";
182
  protected final String TEXT_164 = "()";
182
  protected final String TEXT_164 = NL + "\t\t\tif (";
183
  protected final String TEXT_165 = ", ";
183
  protected final String TEXT_165 = ".isInstance(item))" + NL + "\t\t\t{" + NL + "\t\t\t\tresult &= ";
184
  protected final String TEXT_166 = ", ";
184
  protected final String TEXT_166 = "validate";
185
  protected final String TEXT_167 = ");" + NL + "\t\t\t}" + NL + "\t\t\telse";
185
  protected final String TEXT_167 = "(";
186
  protected final String TEXT_168 = NL + "\t\t\tif (!";
186
  protected final String TEXT_168 = "(";
187
  protected final String TEXT_169 = ".isInstance(item))";
187
  protected final String TEXT_169 = "(";
188
  protected final String TEXT_170 = NL + "\t\t\t{" + NL + "\t\t\t\tresult = false;" + NL + "\t\t\t\treportDataValueTypeViolation(";
188
  protected final String TEXT_170 = ")";
189
  protected final String TEXT_171 = ", item, ";
189
  protected final String TEXT_171 = ").";
190
  protected final String TEXT_172 = ", ";
190
  protected final String TEXT_172 = "()";
191
  protected final String TEXT_173 = ");" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;";
191
  protected final String TEXT_173 = ", ";
192
  protected final String TEXT_174 = NL + "\t\tif (diagnostics != null)" + NL + "\t\t{" + NL + "\t\t\t";
192
  protected final String TEXT_174 = ", ";
193
  protected final String TEXT_175 = " tempDiagnostics = new BasicDiagnostic();";
193
  protected final String TEXT_175 = ");" + NL + "\t\t\t}" + NL + "\t\t\telse";
194
  protected final String TEXT_176 = NL + "\t\t\tif (";
194
  protected final String TEXT_176 = NL + "\t\t\tif (!";
195
  protected final String TEXT_177 = "validate";
195
  protected final String TEXT_177 = ".isInstance(item))";
196
  protected final String TEXT_178 = "(";
196
  protected final String TEXT_178 = NL + "\t\t\t{" + NL + "\t\t\t\tresult = false;" + NL + "\t\t\t\treportDataValueTypeViolation(";
197
  protected final String TEXT_179 = ", tempDiagnostics, ";
197
  protected final String TEXT_179 = ", item, ";
198
  protected final String TEXT_180 = ")) return true;";
198
  protected final String TEXT_180 = ", ";
199
  protected final String TEXT_181 = NL + "\t\t\tif (";
199
  protected final String TEXT_181 = ");" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;";
200
  protected final String TEXT_182 = ".isInstance(";
200
  protected final String TEXT_182 = NL + "\t\tif (diagnostics != null)" + NL + "\t\t{" + NL + "\t\t\t";
201
  protected final String TEXT_183 = "))" + NL + "\t\t\t{" + NL + "\t\t\t\t";
201
  protected final String TEXT_183 = " tempDiagnostics = new BasicDiagnostic();";
202
  protected final String TEXT_184 = "if (";
202
  protected final String TEXT_184 = NL + "\t\t\tif (";
203
  protected final String TEXT_185 = "validate";
203
  protected final String TEXT_185 = "validate";
204
  protected final String TEXT_186 = "(";
204
  protected final String TEXT_186 = "(";
205
  protected final String TEXT_187 = "(";
205
  protected final String TEXT_187 = ", tempDiagnostics, ";
206
  protected final String TEXT_188 = "(";
206
  protected final String TEXT_188 = ")) return true;";
207
  protected final String TEXT_189 = ")";
207
  protected final String TEXT_189 = NL + "\t\t\tif (";
208
  protected final String TEXT_190 = ").";
208
  protected final String TEXT_190 = ".isInstance(";
209
  protected final String TEXT_191 = "()";
209
  protected final String TEXT_191 = "))" + NL + "\t\t\t{" + NL + "\t\t\t\t";
210
  protected final String TEXT_192 = ", tempDiagnostics, ";
210
  protected final String TEXT_192 = "if (";
211
  protected final String TEXT_193 = ")) ";
211
  protected final String TEXT_193 = "validate";
212
  protected final String TEXT_194 = "return true;" + NL + "\t\t\t}";
212
  protected final String TEXT_194 = "(";
213
  protected final String TEXT_195 = NL + "\t\t\tfor (";
213
  protected final String TEXT_195 = "(";
214
  protected final String TEXT_196 = " diagnostic : tempDiagnostics.getChildren())" + NL + "\t\t\t{" + NL + "\t\t\t\tdiagnostics.add(diagnostic);" + NL + "\t\t\t}";
214
  protected final String TEXT_196 = "(";
215
  protected final String TEXT_197 = NL + "\t\t\t";
215
  protected final String TEXT_197 = ")";
216
  protected final String TEXT_198 = " children = tempDiagnostics.getChildren();" + NL + "\t\t\tfor (int i = 0; i < children.size(); i++)" + NL + "\t\t\t{" + NL + "\t\t\t\tdiagnostics.add((";
216
  protected final String TEXT_198 = ").";
217
  protected final String TEXT_199 = ")children.get(i));" + NL + "\t\t\t}";
217
  protected final String TEXT_199 = "()";
218
  protected final String TEXT_200 = NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{";
218
  protected final String TEXT_200 = ", tempDiagnostics, ";
219
  protected final String TEXT_201 = NL + "\t\t\tif (";
219
  protected final String TEXT_201 = ")) ";
220
  protected final String TEXT_202 = "validate";
220
  protected final String TEXT_202 = "return true;" + NL + "\t\t\t}";
221
  protected final String TEXT_203 = "(";
221
  protected final String TEXT_203 = NL + "\t\t\tfor (";
222
  protected final String TEXT_204 = ", null, ";
222
  protected final String TEXT_204 = " diagnostic : tempDiagnostics.getChildren())" + NL + "\t\t\t{" + NL + "\t\t\t\tdiagnostics.add(diagnostic);" + NL + "\t\t\t}";
223
  protected final String TEXT_205 = ")) return true;";
223
  protected final String TEXT_205 = NL + "\t\t\t";
224
  protected final String TEXT_206 = NL + "\t\t\tif (";
224
  protected final String TEXT_206 = " children = tempDiagnostics.getChildren();" + NL + "\t\t\tfor (int i = 0; i < children.size(); i++)" + NL + "\t\t\t{" + NL + "\t\t\t\tdiagnostics.add((";
225
  protected final String TEXT_207 = ".isInstance(";
225
  protected final String TEXT_207 = ")children.get(i));" + NL + "\t\t\t}";
226
  protected final String TEXT_208 = "))" + NL + "\t\t\t{" + NL + "\t\t\t\t";
226
  protected final String TEXT_208 = NL + "\t\t}" + NL + "\t\telse" + NL + "\t\t{";
227
  protected final String TEXT_209 = "if (";
227
  protected final String TEXT_209 = NL + "\t\t\tif (";
228
  protected final String TEXT_210 = "validate";
228
  protected final String TEXT_210 = "validate";
229
  protected final String TEXT_211 = "(";
229
  protected final String TEXT_211 = "(";
230
  protected final String TEXT_212 = "(";
230
  protected final String TEXT_212 = ", null, ";
231
  protected final String TEXT_213 = "(";
231
  protected final String TEXT_213 = ")) return true;";
232
  protected final String TEXT_214 = ")";
232
  protected final String TEXT_214 = NL + "\t\t\tif (";
233
  protected final String TEXT_215 = ").";
233
  protected final String TEXT_215 = ".isInstance(";
234
  protected final String TEXT_216 = "()";
234
  protected final String TEXT_216 = "))" + NL + "\t\t\t{" + NL + "\t\t\t\t";
235
  protected final String TEXT_217 = ", null, ";
235
  protected final String TEXT_217 = "if (";
236
  protected final String TEXT_218 = ")) ";
236
  protected final String TEXT_218 = "validate";
237
  protected final String TEXT_219 = "return true;" + NL + "\t\t\t}";
237
  protected final String TEXT_219 = "(";
238
  protected final String TEXT_220 = NL + "\t\t}" + NL + "\t\treturn false;";
238
  protected final String TEXT_220 = "(";
239
  protected final String TEXT_221 = NL + "\t\treturn validatePattern(";
239
  protected final String TEXT_221 = "(";
240
  protected final String TEXT_222 = ", ";
240
  protected final String TEXT_222 = ")";
241
  protected final String TEXT_223 = "new ";
241
  protected final String TEXT_223 = ").";
242
  protected final String TEXT_224 = "(";
242
  protected final String TEXT_224 = "()";
243
  protected final String TEXT_225 = ")";
243
  protected final String TEXT_225 = ", null, ";
244
  protected final String TEXT_226 = ", ";
244
  protected final String TEXT_226 = ")) ";
245
  protected final String TEXT_227 = "__VALUES, ";
245
  protected final String TEXT_227 = "return true;" + NL + "\t\t\t}";
246
  protected final String TEXT_228 = ", ";
246
  protected final String TEXT_228 = NL + "\t\t}" + NL + "\t\treturn false;";
247
  protected final String TEXT_229 = ");";
247
  protected final String TEXT_229 = NL + "\t\treturn validatePattern(";
248
  protected final String TEXT_230 = NL + "\t\t";
248
  protected final String TEXT_230 = ", ";
249
  protected final String TEXT_231 = " ";
249
  protected final String TEXT_231 = "new ";
250
  protected final String TEXT_232 = " = new ";
250
  protected final String TEXT_232 = "(";
251
  protected final String TEXT_233 = "(";
251
  protected final String TEXT_233 = ")";
252
  protected final String TEXT_234 = ");";
252
  protected final String TEXT_234 = ", ";
253
  protected final String TEXT_235 = NL + "\t\tboolean ";
253
  protected final String TEXT_235 = "__VALUES, ";
254
  protected final String TEXT_236 = " = ";
254
  protected final String TEXT_236 = ", ";
255
  protected final String TEXT_237 = "__VALUES.contains(";
255
  protected final String TEXT_237 = ");";
256
  protected final String TEXT_238 = ");" + NL + "\t\tif (!";
256
  protected final String TEXT_238 = NL + "\t\t";
257
  protected final String TEXT_239 = " && ";
257
  protected final String TEXT_239 = " ";
258
  protected final String TEXT_240 = " != null)" + NL + "\t\t\treportEnumerationViolation(";
258
  protected final String TEXT_240 = " = new ";
259
  protected final String TEXT_241 = ", ";
259
  protected final String TEXT_241 = "(";
260
  protected final String TEXT_242 = ", ";
260
  protected final String TEXT_242 = ");";
261
  protected final String TEXT_243 = "__VALUES, ";
261
  protected final String TEXT_243 = NL + "\t\tboolean ";
262
  protected final String TEXT_244 = ", ";
262
  protected final String TEXT_244 = " = ";
263
  protected final String TEXT_245 = ");" + NL + "\t\treturn ";
263
  protected final String TEXT_245 = "__VALUES.contains(";
264
  protected final String TEXT_246 = ";";
264
  protected final String TEXT_246 = ");" + NL + "\t\tif (!";
265
  protected final String TEXT_247 = NL + "\t\tboolean ";
265
  protected final String TEXT_247 = " && ";
266
  protected final String TEXT_248 = " = ";
266
  protected final String TEXT_248 = " != null)" + NL + "\t\t\treportEnumerationViolation(";
267
  protected final String TEXT_249 = " ";
267
  protected final String TEXT_249 = ", ";
268
  protected final String TEXT_250 = " ";
268
  protected final String TEXT_250 = ", ";
269
  protected final String TEXT_251 = "__VALUE;" + NL + "\t\tif (!";
269
  protected final String TEXT_251 = "__VALUES, ";
270
  protected final String TEXT_252 = " && ";
270
  protected final String TEXT_252 = ", ";
271
  protected final String TEXT_253 = " != null)";
271
  protected final String TEXT_253 = ");" + NL + "\t\treturn ";
272
  protected final String TEXT_254 = NL + "\t\t\treportMinViolation(";
272
  protected final String TEXT_254 = ";";
273
  protected final String TEXT_255 = ", new ";
273
  protected final String TEXT_255 = NL + "\t\tboolean ";
274
  protected final String TEXT_256 = "(";
274
  protected final String TEXT_256 = " = ";
275
  protected final String TEXT_257 = "), new ";
275
  protected final String TEXT_257 = " ";
276
  protected final String TEXT_258 = "(";
276
  protected final String TEXT_258 = " ";
277
  protected final String TEXT_259 = "__VALUE), ";
277
  protected final String TEXT_259 = "__VALUE;" + NL + "\t\tif (!";
278
  protected final String TEXT_260 = ", ";
278
  protected final String TEXT_260 = " && ";
279
  protected final String TEXT_261 = ", ";
279
  protected final String TEXT_261 = " != null)";
280
  protected final String TEXT_262 = ");";
280
  protected final String TEXT_262 = NL + "\t\t\treportMinViolation(";
281
  protected final String TEXT_263 = NL + "\t\t\treportMinViolation(";
281
  protected final String TEXT_263 = ", new ";
282
  protected final String TEXT_264 = ", ";
282
  protected final String TEXT_264 = "(";
283
  protected final String TEXT_265 = ", ";
283
  protected final String TEXT_265 = "), new ";
284
  protected final String TEXT_266 = "__VALUE, ";
284
  protected final String TEXT_266 = "(";
285
  protected final String TEXT_267 = ", ";
285
  protected final String TEXT_267 = "__VALUE), ";
286
  protected final String TEXT_268 = ", ";
286
  protected final String TEXT_268 = ", ";
287
  protected final String TEXT_269 = ");";
287
  protected final String TEXT_269 = ", ";
288
  protected final String TEXT_270 = NL + "\t\treturn ";
288
  protected final String TEXT_270 = ");";
289
  protected final String TEXT_271 = ";";
289
  protected final String TEXT_271 = NL + "\t\t\treportMinViolation(";
290
  protected final String TEXT_272 = NL + "\t\tint ";
290
  protected final String TEXT_272 = ", ";
291
  protected final String TEXT_273 = " = ";
291
  protected final String TEXT_273 = ", ";
292
  protected final String TEXT_274 = ".compareCalendar(";
292
  protected final String TEXT_274 = "__VALUE, ";
293
  protected final String TEXT_275 = ", ";
293
  protected final String TEXT_275 = ", ";
294
  protected final String TEXT_276 = "__VALUE);" + NL + "\t\tboolean ";
294
  protected final String TEXT_276 = ", ";
295
  protected final String TEXT_277 = " = ";
295
  protected final String TEXT_277 = ");";
296
  protected final String TEXT_278 = " == 0 || ";
296
  protected final String TEXT_278 = NL + "\t\treturn ";
297
  protected final String TEXT_279 = " == 1;";
297
  protected final String TEXT_279 = ";";
298
  protected final String TEXT_280 = NL + "\t\tint ";
298
  protected final String TEXT_280 = NL + "\t\tint ";
299
  protected final String TEXT_281 = " = ";
299
  protected final String TEXT_281 = " = ";
300
  protected final String TEXT_282 = ".compareDuration(";
300
  protected final String TEXT_282 = ".compareCalendar(";
301
  protected final String TEXT_283 = ", ";
301
  protected final String TEXT_283 = ", ";
302
  protected final String TEXT_284 = "__VALUE);" + NL + "\t\tboolean ";
302
  protected final String TEXT_284 = "__VALUE);" + NL + "\t\tboolean ";
303
  protected final String TEXT_285 = " = ";
303
  protected final String TEXT_285 = " = ";
304
  protected final String TEXT_286 = " == 0 || ";
304
  protected final String TEXT_286 = " == 0 || ";
305
  protected final String TEXT_287 = " == 1;";
305
  protected final String TEXT_287 = " == 1;";
306
  protected final String TEXT_288 = NL + "\t\tboolean ";
306
  protected final String TEXT_288 = NL + "\t\tint ";
307
  protected final String TEXT_289 = " = ";
307
  protected final String TEXT_289 = " = ";
308
  protected final String TEXT_290 = ".compareTo(";
308
  protected final String TEXT_290 = ".compareDuration(";
309
  protected final String TEXT_291 = "__VALUE) ";
309
  protected final String TEXT_291 = ", ";
310
  protected final String TEXT_292 = " 0;";
310
  protected final String TEXT_292 = "__VALUE);" + NL + "\t\tboolean ";
311
  protected final String TEXT_293 = NL + "\t\tif (!";
311
  protected final String TEXT_293 = " = ";
312
  protected final String TEXT_294 = " && ";
312
  protected final String TEXT_294 = " == 0 || ";
313
  protected final String TEXT_295 = " != null)" + NL + "\t\t\treportMinViolation(";
313
  protected final String TEXT_295 = " == 1;";
314
  protected final String TEXT_296 = ", ";
314
  protected final String TEXT_296 = NL + "\t\tboolean ";
315
  protected final String TEXT_297 = ", ";
315
  protected final String TEXT_297 = " = ";
316
  protected final String TEXT_298 = "__VALUE, ";
316
  protected final String TEXT_298 = ".compareTo(";
317
  protected final String TEXT_299 = ", ";
317
  protected final String TEXT_299 = "__VALUE) ";
318
  protected final String TEXT_300 = ", ";
318
  protected final String TEXT_300 = " 0;";
319
  protected final String TEXT_301 = ");" + NL + "\t\treturn ";
319
  protected final String TEXT_301 = NL + "\t\tif (!";
320
  protected final String TEXT_302 = ";";
320
  protected final String TEXT_302 = " && ";
321
  protected final String TEXT_303 = NL + "\t\tboolean ";
321
  protected final String TEXT_303 = " != null)" + NL + "\t\t\treportMinViolation(";
322
  protected final String TEXT_304 = " = ";
322
  protected final String TEXT_304 = ", ";
323
  protected final String TEXT_305 = " ";
323
  protected final String TEXT_305 = ", ";
324
  protected final String TEXT_306 = " ";
324
  protected final String TEXT_306 = "__VALUE, ";
325
  protected final String TEXT_307 = "__VALUE;" + NL + "\t\tif (!";
325
  protected final String TEXT_307 = ", ";
326
  protected final String TEXT_308 = " && ";
326
  protected final String TEXT_308 = ", ";
327
  protected final String TEXT_309 = " != null)";
327
  protected final String TEXT_309 = ");" + NL + "\t\treturn ";
328
  protected final String TEXT_310 = NL + "\t\t\treportMaxViolation(";
328
  protected final String TEXT_310 = ";";
329
  protected final String TEXT_311 = ", new ";
329
  protected final String TEXT_311 = NL + "\t\tboolean ";
330
  protected final String TEXT_312 = "(";
330
  protected final String TEXT_312 = " = ";
331
  protected final String TEXT_313 = "), new ";
331
  protected final String TEXT_313 = " ";
332
  protected final String TEXT_314 = "(";
332
  protected final String TEXT_314 = " ";
333
  protected final String TEXT_315 = "__VALUE), ";
333
  protected final String TEXT_315 = "__VALUE;" + NL + "\t\tif (!";
334
  protected final String TEXT_316 = ", ";
334
  protected final String TEXT_316 = " && ";
335
  protected final String TEXT_317 = ", ";
335
  protected final String TEXT_317 = " != null)";
336
  protected final String TEXT_318 = ");";
336
  protected final String TEXT_318 = NL + "\t\t\treportMaxViolation(";
337
  protected final String TEXT_319 = NL + "\t\t\treportMaxViolation(";
337
  protected final String TEXT_319 = ", new ";
338
  protected final String TEXT_320 = ", ";
338
  protected final String TEXT_320 = "(";
339
  protected final String TEXT_321 = ", ";
339
  protected final String TEXT_321 = "), new ";
340
  protected final String TEXT_322 = "__VALUE, ";
340
  protected final String TEXT_322 = "(";
341
  protected final String TEXT_323 = ", ";
341
  protected final String TEXT_323 = "__VALUE), ";
342
  protected final String TEXT_324 = ", ";
342
  protected final String TEXT_324 = ", ";
343
  protected final String TEXT_325 = ");";
343
  protected final String TEXT_325 = ", ";
344
  protected final String TEXT_326 = NL + "\t\treturn ";
344
  protected final String TEXT_326 = ");";
345
  protected final String TEXT_327 = ";";
345
  protected final String TEXT_327 = NL + "\t\t\treportMaxViolation(";
346
  protected final String TEXT_328 = NL + "\t\tint ";
346
  protected final String TEXT_328 = ", ";
347
  protected final String TEXT_329 = " = ";
347
  protected final String TEXT_329 = ", ";
348
  protected final String TEXT_330 = ".compareCalendar(";
348
  protected final String TEXT_330 = "__VALUE, ";
349
  protected final String TEXT_331 = ", ";
349
  protected final String TEXT_331 = ", ";
350
  protected final String TEXT_332 = "__VALUE);" + NL + "\t\tboolean ";
350
  protected final String TEXT_332 = ", ";
351
  protected final String TEXT_333 = " = ";
351
  protected final String TEXT_333 = ");";
352
  protected final String TEXT_334 = " == 0 || ";
352
  protected final String TEXT_334 = NL + "\t\treturn ";
353
  protected final String TEXT_335 = " == -1;";
353
  protected final String TEXT_335 = ";";
354
  protected final String TEXT_336 = NL + "\t\tint ";
354
  protected final String TEXT_336 = NL + "\t\tint ";
355
  protected final String TEXT_337 = " = ";
355
  protected final String TEXT_337 = " = ";
356
  protected final String TEXT_338 = ".compareDuration(";
356
  protected final String TEXT_338 = ".compareCalendar(";
357
  protected final String TEXT_339 = ", ";
357
  protected final String TEXT_339 = ", ";
358
  protected final String TEXT_340 = "__VALUE);" + NL + "\t\tboolean ";
358
  protected final String TEXT_340 = "__VALUE);" + NL + "\t\tboolean ";
359
  protected final String TEXT_341 = " = ";
359
  protected final String TEXT_341 = " = ";
360
  protected final String TEXT_342 = " == 0 || ";
360
  protected final String TEXT_342 = " == 0 || ";
361
  protected final String TEXT_343 = " == -1;";
361
  protected final String TEXT_343 = " == -1;";
362
  protected final String TEXT_344 = NL + "\t\tboolean ";
362
  protected final String TEXT_344 = NL + "\t\tint ";
363
  protected final String TEXT_345 = " = ";
363
  protected final String TEXT_345 = " = ";
364
  protected final String TEXT_346 = ".compareTo(";
364
  protected final String TEXT_346 = ".compareDuration(";
365
  protected final String TEXT_347 = "__VALUE) ";
365
  protected final String TEXT_347 = ", ";
366
  protected final String TEXT_348 = " 0;";
366
  protected final String TEXT_348 = "__VALUE);" + NL + "\t\tboolean ";
367
  protected final String TEXT_349 = NL + "\t\tif (!";
367
  protected final String TEXT_349 = " = ";
368
  protected final String TEXT_350 = " && ";
368
  protected final String TEXT_350 = " == 0 || ";
369
  protected final String TEXT_351 = " != null)" + NL + "\t\t\treportMaxViolation(";
369
  protected final String TEXT_351 = " == -1;";
370
  protected final String TEXT_352 = ", ";
370
  protected final String TEXT_352 = NL + "\t\tboolean ";
371
  protected final String TEXT_353 = ", ";
371
  protected final String TEXT_353 = " = ";
372
  protected final String TEXT_354 = "__VALUE, ";
372
  protected final String TEXT_354 = ".compareTo(";
373
  protected final String TEXT_355 = ", ";
373
  protected final String TEXT_355 = "__VALUE) ";
374
  protected final String TEXT_356 = ", ";
374
  protected final String TEXT_356 = " 0;";
375
  protected final String TEXT_357 = ");" + NL + "\t\treturn ";
375
  protected final String TEXT_357 = NL + "\t\tif (!";
376
  protected final String TEXT_358 = ";";
376
  protected final String TEXT_358 = " && ";
377
  protected final String TEXT_359 = NL + "\t\tint length = ";
377
  protected final String TEXT_359 = " != null)" + NL + "\t\t\treportMaxViolation(";
378
  protected final String TEXT_360 = ".";
378
  protected final String TEXT_360 = ", ";
379
  protected final String TEXT_361 = ";" + NL + "\t\tboolean ";
379
  protected final String TEXT_361 = ", ";
380
  protected final String TEXT_362 = " = length >= ";
380
  protected final String TEXT_362 = "__VALUE, ";
381
  protected final String TEXT_363 = ";" + NL + "\t\tif (!";
381
  protected final String TEXT_363 = ", ";
382
  protected final String TEXT_364 = " && ";
382
  protected final String TEXT_364 = ", ";
383
  protected final String TEXT_365 = " != null)" + NL + "\t\t\treportMinLengthViolation(";
383
  protected final String TEXT_365 = ");" + NL + "\t\treturn ";
384
  protected final String TEXT_366 = ", ";
384
  protected final String TEXT_366 = ";";
385
  protected final String TEXT_367 = ", length, ";
385
  protected final String TEXT_367 = NL + "\t\tint length = ";
386
  protected final String TEXT_368 = ", ";
386
  protected final String TEXT_368 = ".";
387
  protected final String TEXT_369 = ", ";
387
  protected final String TEXT_369 = ";" + NL + "\t\tboolean ";
388
  protected final String TEXT_370 = ");" + NL + "\t\treturn ";
388
  protected final String TEXT_370 = " = length >= ";
389
  protected final String TEXT_371 = ";";
389
  protected final String TEXT_371 = ";" + NL + "\t\tif (!";
390
  protected final String TEXT_372 = NL + "\t\tint length = ";
390
  protected final String TEXT_372 = " && ";
391
  protected final String TEXT_373 = ".";
391
  protected final String TEXT_373 = " != null)" + NL + "\t\t\treportMinLengthViolation(";
392
  protected final String TEXT_374 = ";" + NL + "\t\tboolean ";
392
  protected final String TEXT_374 = ", ";
393
  protected final String TEXT_375 = " = length <= ";
393
  protected final String TEXT_375 = ", length, ";
394
  protected final String TEXT_376 = ";" + NL + "\t\tif (!";
394
  protected final String TEXT_376 = ", ";
395
  protected final String TEXT_377 = " && ";
395
  protected final String TEXT_377 = ", ";
396
  protected final String TEXT_378 = " != null)" + NL + "\t\t\treportMaxLengthViolation(";
396
  protected final String TEXT_378 = ");" + NL + "\t\treturn ";
397
  protected final String TEXT_379 = ", ";
397
  protected final String TEXT_379 = ";";
398
  protected final String TEXT_380 = ", length, ";
398
  protected final String TEXT_380 = NL + "\t\tint length = ";
399
  protected final String TEXT_381 = ", ";
399
  protected final String TEXT_381 = ".";
400
  protected final String TEXT_382 = ", ";
400
  protected final String TEXT_382 = ";" + NL + "\t\tboolean ";
401
  protected final String TEXT_383 = ");" + NL + "\t\treturn ";
401
  protected final String TEXT_383 = " = length <= ";
402
  protected final String TEXT_384 = ";";
402
  protected final String TEXT_384 = ";" + NL + "\t\tif (!";
403
  protected final String TEXT_385 = NL + "\t\tboolean ";
403
  protected final String TEXT_385 = " && ";
404
  protected final String TEXT_386 = " = ";
404
  protected final String TEXT_386 = " != null)" + NL + "\t\t\treportMaxLengthViolation(";
405
  protected final String TEXT_387 = " > ";
405
  protected final String TEXT_387 = ", ";
406
  protected final String TEXT_388 = "__LOWER_BOUND && ";
406
  protected final String TEXT_388 = ", length, ";
407
  protected final String TEXT_389 = " < ";
407
  protected final String TEXT_389 = ", ";
408
  protected final String TEXT_390 = "__UPPER_BOUND;" + NL + "\t\tif (!";
408
  protected final String TEXT_390 = ", ";
409
  protected final String TEXT_391 = " && ";
409
  protected final String TEXT_391 = ");" + NL + "\t\treturn ";
410
  protected final String TEXT_392 = " != null)";
410
  protected final String TEXT_392 = ";";
411
  protected final String TEXT_393 = NL + "\t\t\treportTotalDigitsViolation(";
411
  protected final String TEXT_393 = NL + "\t\tboolean ";
412
  protected final String TEXT_394 = ", new ";
412
  protected final String TEXT_394 = " = ";
413
  protected final String TEXT_395 = "(";
413
  protected final String TEXT_395 = " > ";
414
  protected final String TEXT_396 = "), ";
414
  protected final String TEXT_396 = "__LOWER_BOUND && ";
415
  protected final String TEXT_397 = ", ";
415
  protected final String TEXT_397 = " < ";
416
  protected final String TEXT_398 = ", ";
416
  protected final String TEXT_398 = "__UPPER_BOUND;" + NL + "\t\tif (!";
417
  protected final String TEXT_399 = ");";
417
  protected final String TEXT_399 = " && ";
418
  protected final String TEXT_400 = NL + "\t\t\treportTotalDigitsViolation(";
418
  protected final String TEXT_400 = " != null)";
419
  protected final String TEXT_401 = ", ";
419
  protected final String TEXT_401 = NL + "\t\t\treportTotalDigitsViolation(";
420
  protected final String TEXT_402 = ", ";
420
  protected final String TEXT_402 = ", new ";
421
  protected final String TEXT_403 = ", ";
421
  protected final String TEXT_403 = "(";
422
  protected final String TEXT_404 = ", ";
422
  protected final String TEXT_404 = "), ";
423
  protected final String TEXT_405 = ");";
423
  protected final String TEXT_405 = ", ";
424
  protected final String TEXT_406 = NL + "\t\tboolean ";
424
  protected final String TEXT_406 = ", ";
425
  protected final String TEXT_407 = " = ";
425
  protected final String TEXT_407 = ");";
426
  protected final String TEXT_408 = ".unscaledValue().abs().toString().length() <= ";
426
  protected final String TEXT_408 = NL + "\t\t\treportTotalDigitsViolation(";
427
  protected final String TEXT_409 = ";" + NL + "\t\tif (!";
427
  protected final String TEXT_409 = ", ";
428
  protected final String TEXT_410 = " && ";
428
  protected final String TEXT_410 = ", ";
429
  protected final String TEXT_411 = " != null)" + NL + "\t\t\treportTotalDigitsViolation(";
429
  protected final String TEXT_411 = ", ";
430
  protected final String TEXT_412 = ", ";
430
  protected final String TEXT_412 = ", ";
431
  protected final String TEXT_413 = ", ";
431
  protected final String TEXT_413 = ");";
432
  protected final String TEXT_414 = ", ";
432
  protected final String TEXT_414 = NL + "\t\tboolean ";
433
  protected final String TEXT_415 = ", ";
433
  protected final String TEXT_415 = " = ";
434
  protected final String TEXT_416 = ");";
434
  protected final String TEXT_416 = ".unscaledValue().abs().toString().length() <= ";
435
  protected final String TEXT_417 = NL + "\t\tboolean ";
435
  protected final String TEXT_417 = ";" + NL + "\t\tif (!";
436
  protected final String TEXT_418 = " = ";
436
  protected final String TEXT_418 = " && ";
437
  protected final String TEXT_419 = ".compareTo(";
437
  protected final String TEXT_419 = " != null)" + NL + "\t\t\treportTotalDigitsViolation(";
438
  protected final String TEXT_420 = "__LOWER_BOUND) > 0 && ";
438
  protected final String TEXT_420 = ", ";
439
  protected final String TEXT_421 = ".compareTo(";
439
  protected final String TEXT_421 = ", ";
440
  protected final String TEXT_422 = "__UPPER_BOUND) < 0;" + NL + "\t\tif (!";
440
  protected final String TEXT_422 = ", ";
441
  protected final String TEXT_423 = " && ";
441
  protected final String TEXT_423 = ", ";
442
  protected final String TEXT_424 = " != null)" + NL + "\t\t\treportTotalDigitsViolation(";
442
  protected final String TEXT_424 = ");";
443
  protected final String TEXT_425 = ", ";
443
  protected final String TEXT_425 = NL + "\t\tboolean ";
444
  protected final String TEXT_426 = ", ";
444
  protected final String TEXT_426 = " = ";
445
  protected final String TEXT_427 = ", ";
445
  protected final String TEXT_427 = ".compareTo(";
446
  protected final String TEXT_428 = ", ";
446
  protected final String TEXT_428 = "__LOWER_BOUND) > 0 && ";
447
  protected final String TEXT_429 = ");";
447
  protected final String TEXT_429 = ".compareTo(";
448
  protected final String TEXT_430 = NL + "\t\treturn ";
448
  protected final String TEXT_430 = "__UPPER_BOUND) < 0;" + NL + "\t\tif (!";
449
  protected final String TEXT_431 = ";";
449
  protected final String TEXT_431 = " && ";
450
  protected final String TEXT_432 = NL + "\t\tboolean ";
450
  protected final String TEXT_432 = " != null)" + NL + "\t\t\treportTotalDigitsViolation(";
451
  protected final String TEXT_433 = " = ";
451
  protected final String TEXT_433 = ", ";
452
  protected final String TEXT_434 = ".scale() <= ";
452
  protected final String TEXT_434 = ", ";
453
  protected final String TEXT_435 = ";" + NL + "\t\tif (!";
453
  protected final String TEXT_435 = ", ";
454
  protected final String TEXT_436 = " && ";
454
  protected final String TEXT_436 = ", ";
455
  protected final String TEXT_437 = " != null)" + NL + "\t\t\treportFractionDigitsViolation(";
455
  protected final String TEXT_437 = ");";
456
  protected final String TEXT_438 = ", ";
456
  protected final String TEXT_438 = NL + "\t\treturn ";
457
  protected final String TEXT_439 = ", ";
457
  protected final String TEXT_439 = ";";
458
  protected final String TEXT_440 = ", ";
458
  protected final String TEXT_440 = NL + "\t\tboolean ";
459
  protected final String TEXT_441 = ", ";
459
  protected final String TEXT_441 = " = ";
460
  protected final String TEXT_442 = ");" + NL + "\t\treturn ";
460
  protected final String TEXT_442 = ".scale() <= ";
461
  protected final String TEXT_443 = ";";
461
  protected final String TEXT_443 = ";" + NL + "\t\tif (!";
462
  protected final String TEXT_444 = NL + "\t\t// TODO override the constraint, if desired" + NL + "\t\t// -> uncomment the scaffolding" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
462
  protected final String TEXT_444 = " && ";
463
  protected final String TEXT_445 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
463
  protected final String TEXT_445 = " != null)" + NL + "\t\t\treportFractionDigitsViolation(";
464
  protected final String TEXT_446 = ".add";
464
  protected final String TEXT_446 = ", ";
465
  protected final String TEXT_447 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
465
  protected final String TEXT_447 = ", ";
466
  protected final String TEXT_448 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
466
  protected final String TEXT_448 = ", ";
467
  protected final String TEXT_449 = NL + "\t\t\t\t\t\t new Object[] { \"";
467
  protected final String TEXT_449 = ", ";
468
  protected final String TEXT_450 = "\", getValueLabel(";
468
  protected final String TEXT_450 = ");" + NL + "\t\treturn ";
469
  protected final String TEXT_451 = ", ";
469
  protected final String TEXT_451 = ";";
470
  protected final String TEXT_452 = ", ";
470
  protected final String TEXT_452 = NL + "\t\t// TODO override the constraint, if desired" + NL + "\t\t// -> uncomment the scaffolding" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
471
  protected final String TEXT_453 = ") },";
471
  protected final String TEXT_453 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
472
  protected final String TEXT_454 = NL + "\t\t\t\t\t\t new Object[] { ";
472
  protected final String TEXT_454 = ".add";
473
  protected final String TEXT_455 = " }," + NL + "\t\t\t\t\t\t context));";
473
  protected final String TEXT_455 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
474
  protected final String TEXT_456 = NL + "\t\t\t\t\t(new ";
474
  protected final String TEXT_456 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
475
  protected final String TEXT_457 = NL + "\t\t\t\t\t\t(";
475
  protected final String TEXT_457 = NL + "\t\t\t\t\t\t new Object[] { \"";
476
  protected final String TEXT_458 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
476
  protected final String TEXT_458 = "\", getValueLabel(";
477
  protected final String TEXT_459 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
477
  protected final String TEXT_459 = ", ";
478
  protected final String TEXT_460 = "\", getValueLabel(";
478
  protected final String TEXT_460 = ", ";
479
  protected final String TEXT_461 = ", ";
479
  protected final String TEXT_461 = ") },";
480
  protected final String TEXT_462 = ", ";
480
  protected final String TEXT_462 = NL + "\t\t\t\t\t\t new Object[] { ";
481
  protected final String TEXT_463 = ") }),";
481
  protected final String TEXT_463 = " }," + NL + "\t\t\t\t\t\t context));";
482
  protected final String TEXT_464 = NL + "\t\t\t\t\t\t new Object[] { ";
482
  protected final String TEXT_464 = NL + "\t\t\t\t\t(new ";
483
  protected final String TEXT_465 = " }));";
483
  protected final String TEXT_465 = NL + "\t\t\t\t\t\t(";
484
  protected final String TEXT_466 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn ";
484
  protected final String TEXT_466 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
485
  protected final String TEXT_467 = "validate";
485
  protected final String TEXT_467 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
486
  protected final String TEXT_468 = "_";
486
  protected final String TEXT_468 = "\", getValueLabel(";
487
  protected final String TEXT_469 = "(";
487
  protected final String TEXT_469 = ", ";
488
  protected final String TEXT_470 = ", ";
488
  protected final String TEXT_470 = ", ";
489
  protected final String TEXT_471 = ", ";
489
  protected final String TEXT_471 = ") }),";
490
  protected final String TEXT_472 = ");";
490
  protected final String TEXT_472 = NL + "\t\t\t\t\t\t new Object[] { ";
491
  protected final String TEXT_473 = NL + "\t\t// TODO implement the constraint" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
491
  protected final String TEXT_473 = " }));";
492
  protected final String TEXT_474 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
492
  protected final String TEXT_474 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn ";
493
  protected final String TEXT_475 = ".add";
493
  protected final String TEXT_475 = "validate";
494
  protected final String TEXT_476 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
494
  protected final String TEXT_476 = "_";
495
  protected final String TEXT_477 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
495
  protected final String TEXT_477 = "(";
496
  protected final String TEXT_478 = NL + "\t\t\t\t\t\t new Object[] { \"";
496
  protected final String TEXT_478 = ", ";
497
  protected final String TEXT_479 = "\", getValueLabel(";
497
  protected final String TEXT_479 = ", ";
498
  protected final String TEXT_480 = ", ";
498
  protected final String TEXT_480 = ");";
499
  protected final String TEXT_481 = ", ";
499
  protected final String TEXT_481 = NL + "\t\t";
500
  protected final String TEXT_482 = ") },";
500
  protected final String TEXT_482 = " delegate = getValidationDelegateRegistry(";
501
  protected final String TEXT_483 = NL + "\t\t\t\t\t\t new Object[] { ";
501
  protected final String TEXT_483 = ").getValidationDelegate(";
502
  protected final String TEXT_484 = " }," + NL + "\t\t\t\t\t\t context));";
502
  protected final String TEXT_484 = ".createURI(\"";
503
  protected final String TEXT_485 = NL + "\t\t\t\t\t(new ";
503
  protected final String TEXT_485 = "\"));";
504
  protected final String TEXT_486 = NL + "\t\t\t\t\t\t(";
504
  protected final String TEXT_486 = NL + "\t\tif (delegate != null) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tif (!delegate.validate(";
505
  protected final String TEXT_487 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
505
  protected final String TEXT_487 = "__";
506
  protected final String TEXT_488 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
506
  protected final String TEXT_488 = "__EXP, \"";
507
  protected final String TEXT_489 = "\", getValueLabel(";
507
  protected final String TEXT_489 = "\", ";
508
  protected final String TEXT_490 = ", ";
508
  protected final String TEXT_490 = ", ";
509
  protected final String TEXT_491 = ", ";
509
  protected final String TEXT_491 = ", ";
510
  protected final String TEXT_492 = ") }),";
510
  protected final String TEXT_492 = ")) {";
511
  protected final String TEXT_493 = NL + "\t\t\t\t\t\t new Object[] { ";
511
  protected final String TEXT_493 = NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
512
  protected final String TEXT_494 = " }));";
512
  protected final String TEXT_494 = ".add" + NL + "\t\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t\t(";
513
  protected final String TEXT_495 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
513
  protected final String TEXT_495 = ".ERROR," + NL + "\t\t\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
514
  protected final String TEXT_496 = NL + "\t\t// TODO override the constraint, if desired" + NL + "\t\t// -> uncomment the scaffolding" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
514
  protected final String TEXT_496 = NL + "\t\t\t\t\t\t\t\t new Object[] { \"";
515
  protected final String TEXT_497 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
515
  protected final String TEXT_497 = "\", getValueLabel(";
516
  protected final String TEXT_498 = ".add";
516
  protected final String TEXT_498 = ", ";
517
  protected final String TEXT_499 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
517
  protected final String TEXT_499 = ", ";
518
  protected final String TEXT_500 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
518
  protected final String TEXT_500 = ") },";
519
  protected final String TEXT_501 = NL + "\t\t\t\t\t\t new Object[] { \"";
519
  protected final String TEXT_501 = NL + "\t\t\t\t\t\t\t\t new Object[] { ";
520
  protected final String TEXT_502 = "\", getObjectLabel(";
520
  protected final String TEXT_502 = " }," + NL + "\t\t\t\t\t\t\t\t context));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn false;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t} catch (";
521
  protected final String TEXT_503 = ", ";
521
  protected final String TEXT_503 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
522
  protected final String TEXT_504 = ") },";
522
  protected final String TEXT_504 = ".add" + NL + "\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t(";
523
  protected final String TEXT_505 = NL + "\t\t\t\t\t\t new Object[] { ";
523
  protected final String TEXT_505 = ".ERROR," + NL + "\t\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t\t \"_UI_ConstraintDelegateException_diagnostic\",";
524
  protected final String TEXT_506 = " }," + NL + "\t\t\t\t\t\t context));";
524
  protected final String TEXT_506 = NL + "\t\t\t\t\t\t\t new Object[] { \"";
525
  protected final String TEXT_507 = NL + "\t\t\t\t\t(new ";
525
  protected final String TEXT_507 = "\", getValueLabel(";
526
  protected final String TEXT_508 = NL + "\t\t\t\t\t\t(";
526
  protected final String TEXT_508 = ", ";
527
  protected final String TEXT_509 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
527
  protected final String TEXT_509 = ", ";
528
  protected final String TEXT_510 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
528
  protected final String TEXT_510 = "), throwable.getLocalizedMessage() },";
529
  protected final String TEXT_511 = "\", getObjectLabel(";
529
  protected final String TEXT_511 = NL + "\t\t\t\t\t\t\t new Object[] { ";
530
  protected final String TEXT_512 = ", ";
530
  protected final String TEXT_512 = " }," + NL + "\t\t\t\t\t\t\t context));" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t";
531
  protected final String TEXT_513 = ") }),";
531
  protected final String TEXT_513 = ".add" + NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
532
  protected final String TEXT_514 = NL + "\t\t\t\t\t\t new Object[] { ";
532
  protected final String TEXT_514 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_ConstraintDelegateNotFound_diagnostic\",";
533
  protected final String TEXT_515 = " }));";
533
  protected final String TEXT_515 = NL + "\t\t\t\t\t\t new Object[] { \"";
534
  protected final String TEXT_516 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn ";
534
  protected final String TEXT_516 = "\", getValueLabel(";
535
  protected final String TEXT_517 = "validate";
535
  protected final String TEXT_517 = ", ";
536
  protected final String TEXT_518 = "_";
536
  protected final String TEXT_518 = ", ";
537
  protected final String TEXT_519 = "(";
537
  protected final String TEXT_519 = "), \"";
538
  protected final String TEXT_520 = ", ";
538
  protected final String TEXT_520 = "\" },";
539
  protected final String TEXT_521 = ", ";
539
  protected final String TEXT_521 = NL + "\t\t\t\t\t\t new Object[] { ";
540
  protected final String TEXT_522 = ");";
540
  protected final String TEXT_522 = " }," + NL + "\t\t\t\t\t\t context));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
541
  protected final String TEXT_523 = NL + "\t\treturn ";
541
  protected final String TEXT_523 = NL + "\t\t// TODO implement the constraint" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
542
  protected final String TEXT_524 = ".";
542
  protected final String TEXT_524 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
543
  protected final String TEXT_525 = "(";
543
  protected final String TEXT_525 = ".add";
544
  protected final String TEXT_526 = ", ";
544
  protected final String TEXT_526 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
545
  protected final String TEXT_527 = ");";
545
  protected final String TEXT_527 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
546
  protected final String TEXT_528 = NL + "\t\t// TODO implement the constraint" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
546
  protected final String TEXT_528 = NL + "\t\t\t\t\t\t new Object[] { \"";
547
  protected final String TEXT_529 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
547
  protected final String TEXT_529 = "\", getValueLabel(";
548
  protected final String TEXT_530 = ".add";
548
  protected final String TEXT_530 = ", ";
549
  protected final String TEXT_531 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
549
  protected final String TEXT_531 = ", ";
550
  protected final String TEXT_532 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
550
  protected final String TEXT_532 = ") },";
551
  protected final String TEXT_533 = NL + "\t\t\t\t\t\t new Object[] { \"";
551
  protected final String TEXT_533 = NL + "\t\t\t\t\t\t new Object[] { ";
552
  protected final String TEXT_534 = "\", getObjectLabel(";
552
  protected final String TEXT_534 = " }," + NL + "\t\t\t\t\t\t context));";
553
  protected final String TEXT_535 = ", ";
553
  protected final String TEXT_535 = NL + "\t\t\t\t\t(new ";
554
  protected final String TEXT_536 = ") },";
554
  protected final String TEXT_536 = NL + "\t\t\t\t\t\t(";
555
  protected final String TEXT_537 = NL + "\t\t\t\t\t\t new Object[] { ";
555
  protected final String TEXT_537 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
556
  protected final String TEXT_538 = " }," + NL + "\t\t\t\t\t\t context));";
556
  protected final String TEXT_538 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
557
  protected final String TEXT_539 = NL + "\t\t\t\t\t(new ";
557
  protected final String TEXT_539 = "\", getValueLabel(";
558
  protected final String TEXT_540 = NL + "\t\t\t\t\t\t(";
558
  protected final String TEXT_540 = ", ";
559
  protected final String TEXT_541 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
559
  protected final String TEXT_541 = ", ";
560
  protected final String TEXT_542 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
560
  protected final String TEXT_542 = ") }),";
561
  protected final String TEXT_543 = "\", getObjectLabel(";
561
  protected final String TEXT_543 = NL + "\t\t\t\t\t\t new Object[] { ";
562
  protected final String TEXT_544 = ", ";
562
  protected final String TEXT_544 = " }));";
563
  protected final String TEXT_545 = ") }),";
563
  protected final String TEXT_545 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
564
  protected final String TEXT_546 = NL + "\t\t\t\t\t\t new Object[] { ";
564
  protected final String TEXT_546 = NL + "\t\t// TODO override the constraint, if desired" + NL + "\t\t// -> uncomment the scaffolding" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
565
  protected final String TEXT_547 = " }));";
565
  protected final String TEXT_547 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
566
  protected final String TEXT_548 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
566
  protected final String TEXT_548 = ".add";
567
  protected final String TEXT_549 = NL + "\t}" + NL;
567
  protected final String TEXT_549 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
568
  protected final String TEXT_550 = NL + "\t/**" + NL + "\t * Returns the resource locator that will be used to fetch messages for this validator's diagnostics." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
568
  protected final String TEXT_550 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
569
  protected final String TEXT_551 = NL + "\t@Override";
569
  protected final String TEXT_551 = NL + "\t\t\t\t\t\t new Object[] { \"";
570
  protected final String TEXT_552 = NL + "\tpublic ";
570
  protected final String TEXT_552 = "\", getObjectLabel(";
571
  protected final String TEXT_553 = " getResourceLocator()" + NL + "\t{";
571
  protected final String TEXT_553 = ", ";
572
  protected final String TEXT_554 = NL + "\t\treturn ";
572
  protected final String TEXT_554 = ") },";
573
  protected final String TEXT_555 = ".INSTANCE;";
573
  protected final String TEXT_555 = NL + "\t\t\t\t\t\t new Object[] { ";
574
  protected final String TEXT_556 = NL + "\t\t// TODO" + NL + "\t\t// Specialize this to return a resource locator for messages specific to this validator." + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\treturn super.getResourceLocator();";
574
  protected final String TEXT_556 = " }," + NL + "\t\t\t\t\t\t context));";
575
  protected final String TEXT_557 = NL + "\t}" + NL;
575
  protected final String TEXT_557 = NL + "\t\t\t\t\t(new ";
576
  protected final String TEXT_558 = NL + "} //";
576
  protected final String TEXT_558 = NL + "\t\t\t\t\t\t(";
577
  protected final String TEXT_559 = NL;
577
  protected final String TEXT_559 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
578
  protected final String TEXT_560 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
579
  protected final String TEXT_561 = "\", getObjectLabel(";
580
  protected final String TEXT_562 = ", ";
581
  protected final String TEXT_563 = ") }),";
582
  protected final String TEXT_564 = NL + "\t\t\t\t\t\t new Object[] { ";
583
  protected final String TEXT_565 = " }));";
584
  protected final String TEXT_566 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn ";
585
  protected final String TEXT_567 = "validate";
586
  protected final String TEXT_568 = "_";
587
  protected final String TEXT_569 = "(";
588
  protected final String TEXT_570 = ", ";
589
  protected final String TEXT_571 = ", ";
590
  protected final String TEXT_572 = ");";
591
  protected final String TEXT_573 = NL + "\t\treturn ";
592
  protected final String TEXT_574 = ".";
593
  protected final String TEXT_575 = "(";
594
  protected final String TEXT_576 = ", ";
595
  protected final String TEXT_577 = ");";
596
  protected final String TEXT_578 = NL + "\t\t";
597
  protected final String TEXT_579 = " delegate = getValidationDelegateRegistry(";
598
  protected final String TEXT_580 = ").getValidationDelegate(";
599
  protected final String TEXT_581 = ".createURI(\"";
600
  protected final String TEXT_582 = "\"));";
601
  protected final String TEXT_583 = NL + "\t\tif (delegate != null) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tif (!delegate.validate(";
602
  protected final String TEXT_584 = "__";
603
  protected final String TEXT_585 = "__EXP, \"";
604
  protected final String TEXT_586 = "\", ";
605
  protected final String TEXT_587 = ", ";
606
  protected final String TEXT_588 = ", ";
607
  protected final String TEXT_589 = ")) {";
608
  protected final String TEXT_590 = NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
609
  protected final String TEXT_591 = ".add" + NL + "\t\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t\t(";
610
  protected final String TEXT_592 = ".ERROR," + NL + "\t\t\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
611
  protected final String TEXT_593 = NL + "\t\t\t\t\t\t\t\t new Object[] { \"";
612
  protected final String TEXT_594 = "\", getObjectLabel(";
613
  protected final String TEXT_595 = ", ";
614
  protected final String TEXT_596 = ") },";
615
  protected final String TEXT_597 = NL + "\t\t\t\t\t\t\t\t new Object[] { ";
616
  protected final String TEXT_598 = " }," + NL + "\t\t\t\t\t\t\t\t context));" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn false;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t} catch (";
617
  protected final String TEXT_599 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
618
  protected final String TEXT_600 = ".add" + NL + "\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t(";
619
  protected final String TEXT_601 = ".ERROR," + NL + "\t\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t\t \"_UI_ConstraintDelegateException_diagnostic\",";
620
  protected final String TEXT_602 = NL + "\t\t\t\t\t\t\t new Object[] { \"";
621
  protected final String TEXT_603 = "\", getObjectLabel(";
622
  protected final String TEXT_604 = ", ";
623
  protected final String TEXT_605 = "), throwable.getLocalizedMessage() },";
624
  protected final String TEXT_606 = NL + "\t\t\t\t\t\t\t new Object[] { ";
625
  protected final String TEXT_607 = " }," + NL + "\t\t\t\t\t\t\t context));" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t";
626
  protected final String TEXT_608 = ".add" + NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
627
  protected final String TEXT_609 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_ConstraintDelegateNotFound_diagnostic\",";
628
  protected final String TEXT_610 = NL + "\t\t\t\t\t\t new Object[] { \"";
629
  protected final String TEXT_611 = "\", getObjectLabel(";
630
  protected final String TEXT_612 = ", ";
631
  protected final String TEXT_613 = "), \"";
632
  protected final String TEXT_614 = "\" },";
633
  protected final String TEXT_615 = NL + "\t\t\t\t\t\t new Object[] { ";
634
  protected final String TEXT_616 = " }," + NL + "\t\t\t\t\t\t context));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
635
  protected final String TEXT_617 = NL + "\t\t// TODO implement the constraint" + NL + "\t\t// -> specify the condition that violates the constraint" + NL + "\t\t// -> verify the diagnostic details, including severity, code, and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
636
  protected final String TEXT_618 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
637
  protected final String TEXT_619 = ".add";
638
  protected final String TEXT_620 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
639
  protected final String TEXT_621 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t \"_UI_GenericConstraint_diagnostic\",";
640
  protected final String TEXT_622 = NL + "\t\t\t\t\t\t new Object[] { \"";
641
  protected final String TEXT_623 = "\", getObjectLabel(";
642
  protected final String TEXT_624 = ", ";
643
  protected final String TEXT_625 = ") },";
644
  protected final String TEXT_626 = NL + "\t\t\t\t\t\t new Object[] { ";
645
  protected final String TEXT_627 = " }," + NL + "\t\t\t\t\t\t context));";
646
  protected final String TEXT_628 = NL + "\t\t\t\t\t(new ";
647
  protected final String TEXT_629 = NL + "\t\t\t\t\t\t(";
648
  protected final String TEXT_630 = ".ERROR," + NL + "\t\t\t\t\t\t DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t 0," + NL + "\t\t\t\t\t\t ";
649
  protected final String TEXT_631 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
650
  protected final String TEXT_632 = "\", getObjectLabel(";
651
  protected final String TEXT_633 = ", ";
652
  protected final String TEXT_634 = ") }),";
653
  protected final String TEXT_635 = NL + "\t\t\t\t\t\t new Object[] { ";
654
  protected final String TEXT_636 = " }));";
655
  protected final String TEXT_637 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
656
  protected final String TEXT_638 = NL + "\t}" + NL;
657
  protected final String TEXT_639 = NL + "\t/**" + NL + "\t * Returns the resource locator that will be used to fetch messages for this validator's diagnostics." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
658
  protected final String TEXT_640 = NL + "\t@Override";
659
  protected final String TEXT_641 = NL + "\tpublic ";
660
  protected final String TEXT_642 = " getResourceLocator()" + NL + "\t{";
661
  protected final String TEXT_643 = NL + "\t\treturn ";
662
  protected final String TEXT_644 = ".INSTANCE;";
663
  protected final String TEXT_645 = NL + "\t\t// TODO" + NL + "\t\t// Specialize this to return a resource locator for messages specific to this validator." + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\treturn super.getResourceLocator();";
664
  protected final String TEXT_646 = NL + "\t}" + NL;
665
  protected final String TEXT_647 = NL + "} //";
666
  protected final String TEXT_648 = NL;
578
667
579
  public String generate(Object argument)
668
  public String generate(Object argument)
580
  {
669
  {
Lines 583-589 Link Here
583
/**
672
/**
584
 * <copyright>
673
 * <copyright>
585
 *
674
 *
586
 * Copyright (c) 2002-2006 IBM Corporation and others.
675
 * Copyright (c) 2002-2009 IBM Corporation and others.
587
 * All rights reserved.   This program and the accompanying materials
676
 * All rights reserved.   This program and the accompanying materials
588
 * are made available under the terms of the Eclipse Public License v1.0
677
 * are made available under the terms of the Eclipse Public License v1.0
589
 * which accompanies this distribution, and is available at
678
 * which accompanies this distribution, and is available at
Lines 623-628 Link Here
623
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");
712
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");
624
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");
713
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");
625
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");
714
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");
715
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.ValidationDelegate");
626
    stringBuffer.append(TEXT_8);
716
    stringBuffer.append(TEXT_8);
627
    stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
717
    stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
628
    stringBuffer.append(TEXT_9);
718
    stringBuffer.append(TEXT_9);
Lines 926-1230 Link Here
926
    stringBuffer.append(TEXT_141);
1016
    stringBuffer.append(TEXT_141);
927
    }
1017
    }
928
    }
1018
    }
1019
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
929
    stringBuffer.append(TEXT_142);
1020
    stringBuffer.append(TEXT_142);
930
    stringBuffer.append(constraint);
1021
    stringBuffer.append(constraint);
931
    stringBuffer.append(TEXT_143);
1022
    stringBuffer.append(TEXT_143);
932
    stringBuffer.append(genClassifier.getFormattedName());
1023
    stringBuffer.append(genClassifier.getFormattedName());
933
    stringBuffer.append(TEXT_144);
1024
    stringBuffer.append(TEXT_144);
934
    stringBuffer.append(genClassifier.getName());
1025
    stringBuffer.append(genModel.getImportedName("java.lang.String"));
935
    stringBuffer.append(TEXT_145);
1026
    stringBuffer.append(TEXT_145);
936
    stringBuffer.append(constraint);
1027
    stringBuffer.append(genClassifier.getClassifierID());
937
    stringBuffer.append(TEXT_146);
1028
    stringBuffer.append(TEXT_146);
938
    stringBuffer.append(genClassifier.getImportedWildcardInstanceClassName());
1029
    stringBuffer.append(CodeGenUtil.upperName(constraint));
939
    stringBuffer.append(TEXT_147);
1030
    stringBuffer.append(TEXT_147);
940
    stringBuffer.append(genClassifier.getSafeUncapName());
1031
    stringBuffer.append(genClassifier.getValidationExpression(constraint, genModel.getIndentation(stringBuffer)));
941
    stringBuffer.append(TEXT_148);
1032
    stringBuffer.append(TEXT_148);
942
    stringBuffer.append(diagnostics);
1033
    stringBuffer.append(genModel.getNonNLS());
943
    stringBuffer.append(TEXT_149);
1034
    stringBuffer.append(TEXT_149);
944
    stringBuffer.append(_Map);
1035
    }
945
    stringBuffer.append(TEXT_150);
1036
    stringBuffer.append(TEXT_150);
946
    stringBuffer.append(context);
1037
    stringBuffer.append(constraint);
947
    stringBuffer.append(TEXT_151);
1038
    stringBuffer.append(TEXT_151);
1039
    stringBuffer.append(genClassifier.getFormattedName());
1040
    stringBuffer.append(TEXT_152);
1041
    stringBuffer.append(genClassifier.getName());
1042
    stringBuffer.append(TEXT_153);
1043
    stringBuffer.append(constraint);
1044
    stringBuffer.append(TEXT_154);
1045
    stringBuffer.append(genClassifier.getImportedWildcardInstanceClassName());
1046
    stringBuffer.append(TEXT_155);
1047
    stringBuffer.append(genClassifier.getSafeUncapName());
1048
    stringBuffer.append(TEXT_156);
1049
    stringBuffer.append(diagnostics);
1050
    stringBuffer.append(TEXT_157);
1051
    stringBuffer.append(_Map);
1052
    stringBuffer.append(TEXT_158);
1053
    stringBuffer.append(context);
1054
    stringBuffer.append(TEXT_159);
948
    if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;
1055
    if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;
949
    if (constraint.equals("ItemType") && genDataType.getItemType() != null) { GenDataType itemType = genDataType.getItemType(); String itemDelegate = itemType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(itemType.getGenPackage()) + "Validator.";
1056
    if (constraint.equals("ItemType") && genDataType.getItemType() != null) { GenDataType itemType = genDataType.getItemType(); String itemDelegate = itemType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(itemType.getGenPackage()) + "Validator.";
950
    stringBuffer.append(TEXT_152);
1057
    stringBuffer.append(TEXT_160);
951
    stringBuffer.append(result);
1058
    stringBuffer.append(result);
952
    stringBuffer.append(TEXT_153);
1059
    stringBuffer.append(TEXT_161);
953
    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
1060
    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
954
    stringBuffer.append(singleWildcard);
1061
    stringBuffer.append(singleWildcard);
955
    stringBuffer.append(TEXT_154);
1062
    stringBuffer.append(TEXT_162);
956
    stringBuffer.append(genClassifier.getSafeUncapName());
1063
    stringBuffer.append(genClassifier.getSafeUncapName());
957
    stringBuffer.append(TEXT_155);
1064
    stringBuffer.append(TEXT_163);
958
    if (itemType.getGenPackage().hasConstraints()) {
1065
    if (itemType.getGenPackage().hasConstraints()) {
959
    stringBuffer.append(TEXT_156);
1066
    stringBuffer.append(TEXT_164);
960
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1067
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
961
    stringBuffer.append(TEXT_157);
1068
    stringBuffer.append(TEXT_165);
962
    stringBuffer.append(itemDelegate);
1069
    stringBuffer.append(itemDelegate);
963
    stringBuffer.append(TEXT_158);
1070
    stringBuffer.append(TEXT_166);
964
    stringBuffer.append(itemType.getName());
1071
    stringBuffer.append(itemType.getName());
965
    stringBuffer.append(TEXT_159);
1072
    stringBuffer.append(TEXT_167);
966
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1073
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
967
    stringBuffer.append(TEXT_160);
1074
    stringBuffer.append(TEXT_168);
968
    }
1075
    }
969
    if (!itemType.isObjectType()) {
1076
    if (!itemType.isObjectType()) {
970
    stringBuffer.append(TEXT_161);
1077
    stringBuffer.append(TEXT_169);
971
    stringBuffer.append(itemType.getObjectInstanceClassName());
1078
    stringBuffer.append(itemType.getObjectInstanceClassName());
972
    stringBuffer.append(TEXT_162);
1079
    stringBuffer.append(TEXT_170);
973
    }
1080
    }
974
    stringBuffer.append(item);
1081
    stringBuffer.append(item);
975
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1082
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
976
    stringBuffer.append(TEXT_163);
1083
    stringBuffer.append(TEXT_171);
977
    stringBuffer.append(itemType.getPrimitiveValueFunction());
1084
    stringBuffer.append(itemType.getPrimitiveValueFunction());
978
    stringBuffer.append(TEXT_164);
1085
    stringBuffer.append(TEXT_172);
979
    }
1086
    }
980
    stringBuffer.append(TEXT_165);
1087
    stringBuffer.append(TEXT_173);
981
    stringBuffer.append(diagnostics);
1088
    stringBuffer.append(diagnostics);
982
    stringBuffer.append(TEXT_166);
1089
    stringBuffer.append(TEXT_174);
983
    stringBuffer.append(context);
1090
    stringBuffer.append(context);
984
    stringBuffer.append(TEXT_167);
1091
    stringBuffer.append(TEXT_175);
985
    } else {
1092
    } else {
986
    stringBuffer.append(TEXT_168);
1093
    stringBuffer.append(TEXT_176);
987
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1094
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
988
    stringBuffer.append(TEXT_169);
1095
    stringBuffer.append(TEXT_177);
989
    }
1096
    }
990
    stringBuffer.append(TEXT_170);
1097
    stringBuffer.append(TEXT_178);
991
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1098
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
992
    stringBuffer.append(TEXT_171);
1099
    stringBuffer.append(TEXT_179);
993
    stringBuffer.append(diagnostics);
1100
    stringBuffer.append(diagnostics);
994
    stringBuffer.append(TEXT_172);
1101
    stringBuffer.append(TEXT_180);
995
    stringBuffer.append(context);
1102
    stringBuffer.append(context);
996
    stringBuffer.append(TEXT_173);
1103
    stringBuffer.append(TEXT_181);
997
    } else if (constraint.equals("MemberTypes") && !genDataType.getMemberTypes().isEmpty()) {
1104
    } else if (constraint.equals("MemberTypes") && !genDataType.getMemberTypes().isEmpty()) {
998
    stringBuffer.append(TEXT_174);
1105
    stringBuffer.append(TEXT_182);
999
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1106
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1000
    stringBuffer.append(TEXT_175);
1107
    stringBuffer.append(TEXT_183);
1001
    for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";
1108
    for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";
1002
    if (genDataType.isPrimitiveType()) {
1109
    if (genDataType.isPrimitiveType()) {
1003
    stringBuffer.append(TEXT_176);
1110
    stringBuffer.append(TEXT_184);
1004
    stringBuffer.append(memberDelegate);
1111
    stringBuffer.append(memberDelegate);
1005
    stringBuffer.append(TEXT_177);
1112
    stringBuffer.append(TEXT_185);
1006
    stringBuffer.append(memberType.getName());
1113
    stringBuffer.append(memberType.getName());
1007
    stringBuffer.append(TEXT_178);
1114
    stringBuffer.append(TEXT_186);
1008
    stringBuffer.append(genClassifier.getSafeUncapName());
1115
    stringBuffer.append(genClassifier.getSafeUncapName());
1009
    stringBuffer.append(TEXT_179);
1116
    stringBuffer.append(TEXT_187);
1010
    stringBuffer.append(context);
1117
    stringBuffer.append(context);
1011
    stringBuffer.append(TEXT_180);
1118
    stringBuffer.append(TEXT_188);
1012
    } else {
1119
    } else {
1013
    stringBuffer.append(TEXT_181);
1120
    stringBuffer.append(TEXT_189);
1014
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1121
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1015
    stringBuffer.append(TEXT_182);
1122
    stringBuffer.append(TEXT_190);
1016
    stringBuffer.append(genClassifier.getSafeUncapName());
1123
    stringBuffer.append(genClassifier.getSafeUncapName());
1017
    stringBuffer.append(TEXT_183);
1124
    stringBuffer.append(TEXT_191);
1018
    if (memberType.getGenPackage().hasConstraints()) {
1125
    if (memberType.getGenPackage().hasConstraints()) {
1019
    stringBuffer.append(TEXT_184);
1126
    stringBuffer.append(TEXT_192);
1020
    stringBuffer.append(memberDelegate);
1127
    stringBuffer.append(memberDelegate);
1021
    stringBuffer.append(TEXT_185);
1128
    stringBuffer.append(TEXT_193);
1022
    stringBuffer.append(memberType.getName());
1129
    stringBuffer.append(memberType.getName());
1023
    stringBuffer.append(TEXT_186);
1130
    stringBuffer.append(TEXT_194);
1024
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1131
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1025
    stringBuffer.append(TEXT_187);
1132
    stringBuffer.append(TEXT_195);
1026
    }
1133
    }
1027
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1134
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1028
    stringBuffer.append(TEXT_188);
1135
    stringBuffer.append(TEXT_196);
1029
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1136
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1030
    stringBuffer.append(TEXT_189);
1137
    stringBuffer.append(TEXT_197);
1031
    }
1138
    }
1032
    stringBuffer.append(genClassifier.getSafeUncapName());
1139
    stringBuffer.append(genClassifier.getSafeUncapName());
1033
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1140
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1034
    stringBuffer.append(TEXT_190);
1141
    stringBuffer.append(TEXT_198);
1035
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1142
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1036
    stringBuffer.append(TEXT_191);
1143
    stringBuffer.append(TEXT_199);
1037
    }
1144
    }
1038
    stringBuffer.append(TEXT_192);
1145
    stringBuffer.append(TEXT_200);
1039
    stringBuffer.append(context);
1146
    stringBuffer.append(context);
1040
    stringBuffer.append(TEXT_193);
1147
    stringBuffer.append(TEXT_201);
1041
    }
1148
    }
1042
    stringBuffer.append(TEXT_194);
1149
    stringBuffer.append(TEXT_202);
1043
    }
1150
    }
1044
    }
1151
    }
1045
    if (genModel.useGenerics()) {
1152
    if (genModel.useGenerics()) {
1046
    stringBuffer.append(TEXT_195);
1153
    stringBuffer.append(TEXT_203);
1047
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1154
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1048
    stringBuffer.append(TEXT_196);
1155
    stringBuffer.append(TEXT_204);
1049
    } else {
1156
    } else {
1050
    stringBuffer.append(TEXT_197);
1157
    stringBuffer.append(TEXT_205);
1051
    stringBuffer.append(genModel.getImportedName("java.util.List"));
1158
    stringBuffer.append(genModel.getImportedName("java.util.List"));
1052
    stringBuffer.append(TEXT_198);
1159
    stringBuffer.append(TEXT_206);
1053
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1160
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1054
    stringBuffer.append(TEXT_199);
1161
    stringBuffer.append(TEXT_207);
1055
    }
1162
    }
1056
    stringBuffer.append(TEXT_200);
1163
    stringBuffer.append(TEXT_208);
1057
    for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";
1164
    for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";
1058
    if (genDataType.isPrimitiveType()) {
1165
    if (genDataType.isPrimitiveType()) {
1059
    stringBuffer.append(TEXT_201);
1166
    stringBuffer.append(TEXT_209);
1060
    stringBuffer.append(memberDelegate);
1167
    stringBuffer.append(memberDelegate);
1061
    stringBuffer.append(TEXT_202);
1168
    stringBuffer.append(TEXT_210);
1062
    stringBuffer.append(memberType.getName());
1169
    stringBuffer.append(memberType.getName());
1063
    stringBuffer.append(TEXT_203);
1170
    stringBuffer.append(TEXT_211);
1064
    stringBuffer.append(genClassifier.getSafeUncapName());
1171
    stringBuffer.append(genClassifier.getSafeUncapName());
1065
    stringBuffer.append(TEXT_204);
1172
    stringBuffer.append(TEXT_212);
1066
    stringBuffer.append(context);
1173
    stringBuffer.append(context);
1067
    stringBuffer.append(TEXT_205);
1174
    stringBuffer.append(TEXT_213);
1068
    } else {
1175
    } else {
1069
    stringBuffer.append(TEXT_206);
1176
    stringBuffer.append(TEXT_214);
1070
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1177
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1071
    stringBuffer.append(TEXT_207);
1178
    stringBuffer.append(TEXT_215);
1072
    stringBuffer.append(genClassifier.getSafeUncapName());
1179
    stringBuffer.append(genClassifier.getSafeUncapName());
1073
    stringBuffer.append(TEXT_208);
1180
    stringBuffer.append(TEXT_216);
1074
    if (memberType.getGenPackage().hasConstraints()) {
1181
    if (memberType.getGenPackage().hasConstraints()) {
1075
    stringBuffer.append(TEXT_209);
1182
    stringBuffer.append(TEXT_217);
1076
    stringBuffer.append(memberDelegate);
1183
    stringBuffer.append(memberDelegate);
1077
    stringBuffer.append(TEXT_210);
1184
    stringBuffer.append(TEXT_218);
1078
    stringBuffer.append(memberType.getName());
1185
    stringBuffer.append(memberType.getName());
1079
    stringBuffer.append(TEXT_211);
1186
    stringBuffer.append(TEXT_219);
1080
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1187
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1081
    stringBuffer.append(TEXT_212);
1188
    stringBuffer.append(TEXT_220);
1082
    }
1189
    }
1083
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1190
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1084
    stringBuffer.append(TEXT_213);
1191
    stringBuffer.append(TEXT_221);
1085
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1192
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1086
    stringBuffer.append(TEXT_214);
1193
    stringBuffer.append(TEXT_222);
1087
    }
1194
    }
1088
    stringBuffer.append(genClassifier.getSafeUncapName());
1195
    stringBuffer.append(genClassifier.getSafeUncapName());
1089
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1196
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1090
    stringBuffer.append(TEXT_215);
1197
    stringBuffer.append(TEXT_223);
1091
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1198
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1092
    stringBuffer.append(TEXT_216);
1199
    stringBuffer.append(TEXT_224);
1093
    }
1200
    }
1094
    stringBuffer.append(TEXT_217);
1201
    stringBuffer.append(TEXT_225);
1095
    stringBuffer.append(context);
1202
    stringBuffer.append(context);
1096
    stringBuffer.append(TEXT_218);
1203
    stringBuffer.append(TEXT_226);
1097
    }
1204
    }
1098
    stringBuffer.append(TEXT_219);
1205
    stringBuffer.append(TEXT_227);
1099
    }
1206
    }
1100
    }
1207
    }
1101
    stringBuffer.append(TEXT_220);
1208
    stringBuffer.append(TEXT_228);
1102
    } else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {
1209
    } else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {
1103
    stringBuffer.append(TEXT_221);
1210
    stringBuffer.append(TEXT_229);
1104
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1211
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1105
    stringBuffer.append(TEXT_222);
1212
    stringBuffer.append(TEXT_230);
1106
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1213
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1107
    stringBuffer.append(TEXT_223);
1214
    stringBuffer.append(TEXT_231);
1108
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1215
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1109
    stringBuffer.append(TEXT_224);
1216
    stringBuffer.append(TEXT_232);
1110
    }
1217
    }
1111
    stringBuffer.append(genDataType.getSafeUncapName());
1218
    stringBuffer.append(genDataType.getSafeUncapName());
1112
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1219
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1113
    stringBuffer.append(TEXT_225);
1220
    stringBuffer.append(TEXT_233);
1114
    }
1221
    }
1115
    stringBuffer.append(TEXT_226);
1222
    stringBuffer.append(TEXT_234);
1116
    stringBuffer.append(constant);
1223
    stringBuffer.append(constant);
1117
    stringBuffer.append(TEXT_227);
1224
    stringBuffer.append(TEXT_235);
1118
    stringBuffer.append(diagnostics);
1225
    stringBuffer.append(diagnostics);
1119
    stringBuffer.append(TEXT_228);
1226
    stringBuffer.append(TEXT_236);
1120
    stringBuffer.append(context);
1227
    stringBuffer.append(context);
1121
    stringBuffer.append(TEXT_229);
1228
    stringBuffer.append(TEXT_237);
1122
    } else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) { String variable = genDataType.getSafeUncapName();
1229
    } else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) { String variable = genDataType.getSafeUncapName();
1123
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) { variable = variable + "Object";
1230
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) { variable = variable + "Object";
1124
    stringBuffer.append(TEXT_230);
1125
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1126
    stringBuffer.append(TEXT_231);
1127
    stringBuffer.append(variable);
1128
    stringBuffer.append(TEXT_232);
1129
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1130
    stringBuffer.append(TEXT_233);
1131
    stringBuffer.append(genDataType.getSafeUncapName());
1132
    stringBuffer.append(TEXT_234);
1133
    }
1134
    stringBuffer.append(TEXT_235);
1135
    stringBuffer.append(result);
1136
    stringBuffer.append(TEXT_236);
1137
    stringBuffer.append(constant);
1138
    stringBuffer.append(TEXT_237);
1139
    stringBuffer.append(variable);
1140
    stringBuffer.append(TEXT_238);
1231
    stringBuffer.append(TEXT_238);
1141
    stringBuffer.append(result);
1232
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1142
    stringBuffer.append(TEXT_239);
1233
    stringBuffer.append(TEXT_239);
1143
    stringBuffer.append(diagnostics);
1234
    stringBuffer.append(variable);
1144
    stringBuffer.append(TEXT_240);
1235
    stringBuffer.append(TEXT_240);
1145
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1236
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1146
    stringBuffer.append(TEXT_241);
1237
    stringBuffer.append(TEXT_241);
1147
    stringBuffer.append(variable);
1238
    stringBuffer.append(genDataType.getSafeUncapName());
1148
    stringBuffer.append(TEXT_242);
1239
    stringBuffer.append(TEXT_242);
1149
    stringBuffer.append(constant);
1240
    }
1150
    stringBuffer.append(TEXT_243);
1241
    stringBuffer.append(TEXT_243);
1151
    stringBuffer.append(diagnostics);
1242
    stringBuffer.append(result);
1152
    stringBuffer.append(TEXT_244);
1243
    stringBuffer.append(TEXT_244);
1153
    stringBuffer.append(context);
1244
    stringBuffer.append(constant);
1154
    stringBuffer.append(TEXT_245);
1245
    stringBuffer.append(TEXT_245);
1155
    stringBuffer.append(result);
1246
    stringBuffer.append(variable);
1156
    stringBuffer.append(TEXT_246);
1247
    stringBuffer.append(TEXT_246);
1157
    } else if (constraint.equals("Min") && genDataType.getMinLiteral() != null) {
1158
    if (genDataType.isPrimitiveType()) {
1159
    stringBuffer.append(TEXT_247);
1160
    stringBuffer.append(result);
1248
    stringBuffer.append(result);
1249
    stringBuffer.append(TEXT_247);
1250
    stringBuffer.append(diagnostics);
1161
    stringBuffer.append(TEXT_248);
1251
    stringBuffer.append(TEXT_248);
1162
    stringBuffer.append(genDataType.getSafeUncapName());
1252
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1163
    stringBuffer.append(TEXT_249);
1253
    stringBuffer.append(TEXT_249);
1164
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1254
    stringBuffer.append(variable);
1165
    stringBuffer.append(TEXT_250);
1255
    stringBuffer.append(TEXT_250);
1166
    stringBuffer.append(constant);
1256
    stringBuffer.append(constant);
1167
    stringBuffer.append(TEXT_251);
1257
    stringBuffer.append(TEXT_251);
1168
    stringBuffer.append(result);
1169
    stringBuffer.append(TEXT_252);
1170
    stringBuffer.append(diagnostics);
1258
    stringBuffer.append(diagnostics);
1259
    stringBuffer.append(TEXT_252);
1260
    stringBuffer.append(context);
1171
    stringBuffer.append(TEXT_253);
1261
    stringBuffer.append(TEXT_253);
1172
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1262
    stringBuffer.append(result);
1173
    stringBuffer.append(TEXT_254);
1263
    stringBuffer.append(TEXT_254);
1174
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1264
    } else if (constraint.equals("Min") && genDataType.getMinLiteral() != null) {
1265
    if (genDataType.isPrimitiveType()) {
1175
    stringBuffer.append(TEXT_255);
1266
    stringBuffer.append(TEXT_255);
1176
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1267
    stringBuffer.append(result);
1177
    stringBuffer.append(TEXT_256);
1268
    stringBuffer.append(TEXT_256);
1178
    stringBuffer.append(genDataType.getSafeUncapName());
1269
    stringBuffer.append(genDataType.getSafeUncapName());
1179
    stringBuffer.append(TEXT_257);
1270
    stringBuffer.append(TEXT_257);
1180
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1271
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1181
    stringBuffer.append(TEXT_258);
1272
    stringBuffer.append(TEXT_258);
1182
    stringBuffer.append(constant);
1273
    stringBuffer.append(constant);
1183
    stringBuffer.append(TEXT_259);
1274
    stringBuffer.append(TEXT_259);
1184
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1275
    stringBuffer.append(result);
1185
    stringBuffer.append(TEXT_260);
1276
    stringBuffer.append(TEXT_260);
1186
    stringBuffer.append(diagnostics);
1277
    stringBuffer.append(diagnostics);
1187
    stringBuffer.append(TEXT_261);
1278
    stringBuffer.append(TEXT_261);
1188
    stringBuffer.append(context);
1279
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1189
    stringBuffer.append(TEXT_262);
1280
    stringBuffer.append(TEXT_262);
1190
    } else {
1191
    stringBuffer.append(TEXT_263);
1192
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1281
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1282
    stringBuffer.append(TEXT_263);
1283
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1193
    stringBuffer.append(TEXT_264);
1284
    stringBuffer.append(TEXT_264);
1194
    stringBuffer.append(genDataType.getSafeUncapName());
1285
    stringBuffer.append(genDataType.getSafeUncapName());
1195
    stringBuffer.append(TEXT_265);
1286
    stringBuffer.append(TEXT_265);
1196
    stringBuffer.append(constant);
1287
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1197
    stringBuffer.append(TEXT_266);
1288
    stringBuffer.append(TEXT_266);
1198
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1289
    stringBuffer.append(constant);
1199
    stringBuffer.append(TEXT_267);
1290
    stringBuffer.append(TEXT_267);
1200
    stringBuffer.append(diagnostics);
1291
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1201
    stringBuffer.append(TEXT_268);
1292
    stringBuffer.append(TEXT_268);
1202
    stringBuffer.append(context);
1293
    stringBuffer.append(diagnostics);
1203
    stringBuffer.append(TEXT_269);
1294
    stringBuffer.append(TEXT_269);
1204
    }
1295
    stringBuffer.append(context);
1205
    stringBuffer.append(TEXT_270);
1296
    stringBuffer.append(TEXT_270);
1206
    stringBuffer.append(result);
1297
    } else {
1207
    stringBuffer.append(TEXT_271);
1298
    stringBuffer.append(TEXT_271);
1208
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1299
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1209
    if (genDataType.isXMLCalendar()) {
1210
    stringBuffer.append(TEXT_272);
1300
    stringBuffer.append(TEXT_272);
1211
    stringBuffer.append(comparison);
1301
    stringBuffer.append(genDataType.getSafeUncapName());
1212
    stringBuffer.append(TEXT_273);
1302
    stringBuffer.append(TEXT_273);
1213
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1303
    stringBuffer.append(constant);
1214
    stringBuffer.append(TEXT_274);
1304
    stringBuffer.append(TEXT_274);
1215
    stringBuffer.append(genDataType.getSafeUncapName());
1305
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1216
    stringBuffer.append(TEXT_275);
1306
    stringBuffer.append(TEXT_275);
1217
    stringBuffer.append(constant);
1307
    stringBuffer.append(diagnostics);
1218
    stringBuffer.append(TEXT_276);
1308
    stringBuffer.append(TEXT_276);
1219
    stringBuffer.append(result);
1309
    stringBuffer.append(context);
1220
    stringBuffer.append(TEXT_277);
1310
    stringBuffer.append(TEXT_277);
1221
    if (genDataType.isMinInclusive()) {
1222
    stringBuffer.append(comparison);
1223
    stringBuffer.append(TEXT_278);
1224
    }
1311
    }
1225
    stringBuffer.append(comparison);
1312
    stringBuffer.append(TEXT_278);
1313
    stringBuffer.append(result);
1226
    stringBuffer.append(TEXT_279);
1314
    stringBuffer.append(TEXT_279);
1227
    } else if (genDataType.isXMLDuration()) {
1315
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1316
    if (genDataType.isXMLCalendar()) {
1228
    stringBuffer.append(TEXT_280);
1317
    stringBuffer.append(TEXT_280);
1229
    stringBuffer.append(comparison);
1318
    stringBuffer.append(comparison);
1230
    stringBuffer.append(TEXT_281);
1319
    stringBuffer.append(TEXT_281);
Lines 1242-1349 Link Here
1242
    }
1331
    }
1243
    stringBuffer.append(comparison);
1332
    stringBuffer.append(comparison);
1244
    stringBuffer.append(TEXT_287);
1333
    stringBuffer.append(TEXT_287);
1245
    } else {
1334
    } else if (genDataType.isXMLDuration()) {
1246
    stringBuffer.append(TEXT_288);
1335
    stringBuffer.append(TEXT_288);
1247
    stringBuffer.append(result);
1336
    stringBuffer.append(comparison);
1248
    stringBuffer.append(TEXT_289);
1337
    stringBuffer.append(TEXT_289);
1249
    stringBuffer.append(genDataType.getSafeUncapName());
1338
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1250
    stringBuffer.append(TEXT_290);
1339
    stringBuffer.append(TEXT_290);
1251
    stringBuffer.append(constant);
1340
    stringBuffer.append(genDataType.getSafeUncapName());
1252
    stringBuffer.append(TEXT_291);
1341
    stringBuffer.append(TEXT_291);
1253
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1342
    stringBuffer.append(constant);
1254
    stringBuffer.append(TEXT_292);
1343
    stringBuffer.append(TEXT_292);
1255
    }
1256
    stringBuffer.append(TEXT_293);
1257
    stringBuffer.append(result);
1344
    stringBuffer.append(result);
1345
    stringBuffer.append(TEXT_293);
1346
    if (genDataType.isMinInclusive()) {
1347
    stringBuffer.append(comparison);
1258
    stringBuffer.append(TEXT_294);
1348
    stringBuffer.append(TEXT_294);
1259
    stringBuffer.append(diagnostics);
1349
    }
1350
    stringBuffer.append(comparison);
1260
    stringBuffer.append(TEXT_295);
1351
    stringBuffer.append(TEXT_295);
1261
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1352
    } else {
1262
    stringBuffer.append(TEXT_296);
1353
    stringBuffer.append(TEXT_296);
1263
    stringBuffer.append(genDataType.getSafeUncapName());
1354
    stringBuffer.append(result);
1264
    stringBuffer.append(TEXT_297);
1355
    stringBuffer.append(TEXT_297);
1265
    stringBuffer.append(constant);
1356
    stringBuffer.append(genDataType.getSafeUncapName());
1266
    stringBuffer.append(TEXT_298);
1357
    stringBuffer.append(TEXT_298);
1267
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1358
    stringBuffer.append(constant);
1268
    stringBuffer.append(TEXT_299);
1359
    stringBuffer.append(TEXT_299);
1269
    stringBuffer.append(diagnostics);
1360
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1270
    stringBuffer.append(TEXT_300);
1361
    stringBuffer.append(TEXT_300);
1271
    stringBuffer.append(context);
1362
    }
1272
    stringBuffer.append(TEXT_301);
1363
    stringBuffer.append(TEXT_301);
1273
    stringBuffer.append(result);
1364
    stringBuffer.append(result);
1274
    stringBuffer.append(TEXT_302);
1365
    stringBuffer.append(TEXT_302);
1275
    }
1366
    stringBuffer.append(diagnostics);
1276
    } else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {
1277
    if (genDataType.isPrimitiveType()) {
1278
    stringBuffer.append(TEXT_303);
1367
    stringBuffer.append(TEXT_303);
1279
    stringBuffer.append(result);
1368
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1280
    stringBuffer.append(TEXT_304);
1369
    stringBuffer.append(TEXT_304);
1281
    stringBuffer.append(genDataType.getSafeUncapName());
1370
    stringBuffer.append(genDataType.getSafeUncapName());
1282
    stringBuffer.append(TEXT_305);
1371
    stringBuffer.append(TEXT_305);
1283
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1284
    stringBuffer.append(TEXT_306);
1285
    stringBuffer.append(constant);
1372
    stringBuffer.append(constant);
1373
    stringBuffer.append(TEXT_306);
1374
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1286
    stringBuffer.append(TEXT_307);
1375
    stringBuffer.append(TEXT_307);
1287
    stringBuffer.append(result);
1288
    stringBuffer.append(TEXT_308);
1289
    stringBuffer.append(diagnostics);
1376
    stringBuffer.append(diagnostics);
1377
    stringBuffer.append(TEXT_308);
1378
    stringBuffer.append(context);
1290
    stringBuffer.append(TEXT_309);
1379
    stringBuffer.append(TEXT_309);
1291
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1380
    stringBuffer.append(result);
1292
    stringBuffer.append(TEXT_310);
1381
    stringBuffer.append(TEXT_310);
1293
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1382
    }
1383
    } else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {
1384
    if (genDataType.isPrimitiveType()) {
1294
    stringBuffer.append(TEXT_311);
1385
    stringBuffer.append(TEXT_311);
1295
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1386
    stringBuffer.append(result);
1296
    stringBuffer.append(TEXT_312);
1387
    stringBuffer.append(TEXT_312);
1297
    stringBuffer.append(genDataType.getSafeUncapName());
1388
    stringBuffer.append(genDataType.getSafeUncapName());
1298
    stringBuffer.append(TEXT_313);
1389
    stringBuffer.append(TEXT_313);
1299
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1390
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1300
    stringBuffer.append(TEXT_314);
1391
    stringBuffer.append(TEXT_314);
1301
    stringBuffer.append(constant);
1392
    stringBuffer.append(constant);
1302
    stringBuffer.append(TEXT_315);
1393
    stringBuffer.append(TEXT_315);
1303
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1394
    stringBuffer.append(result);
1304
    stringBuffer.append(TEXT_316);
1395
    stringBuffer.append(TEXT_316);
1305
    stringBuffer.append(diagnostics);
1396
    stringBuffer.append(diagnostics);
1306
    stringBuffer.append(TEXT_317);
1397
    stringBuffer.append(TEXT_317);
1307
    stringBuffer.append(context);
1398
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1308
    stringBuffer.append(TEXT_318);
1399
    stringBuffer.append(TEXT_318);
1309
    } else {
1310
    stringBuffer.append(TEXT_319);
1311
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1400
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1401
    stringBuffer.append(TEXT_319);
1402
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1312
    stringBuffer.append(TEXT_320);
1403
    stringBuffer.append(TEXT_320);
1313
    stringBuffer.append(genDataType.getSafeUncapName());
1404
    stringBuffer.append(genDataType.getSafeUncapName());
1314
    stringBuffer.append(TEXT_321);
1405
    stringBuffer.append(TEXT_321);
1315
    stringBuffer.append(constant);
1406
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1316
    stringBuffer.append(TEXT_322);
1407
    stringBuffer.append(TEXT_322);
1317
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1408
    stringBuffer.append(constant);
1318
    stringBuffer.append(TEXT_323);
1409
    stringBuffer.append(TEXT_323);
1319
    stringBuffer.append(diagnostics);
1410
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1320
    stringBuffer.append(TEXT_324);
1411
    stringBuffer.append(TEXT_324);
1321
    stringBuffer.append(context);
1412
    stringBuffer.append(diagnostics);
1322
    stringBuffer.append(TEXT_325);
1413
    stringBuffer.append(TEXT_325);
1323
    }
1414
    stringBuffer.append(context);
1324
    stringBuffer.append(TEXT_326);
1415
    stringBuffer.append(TEXT_326);
1325
    stringBuffer.append(result);
1416
    } else {
1326
    stringBuffer.append(TEXT_327);
1417
    stringBuffer.append(TEXT_327);
1327
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1418
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1328
    if (genDataType.isXMLCalendar()) {
1329
    stringBuffer.append(TEXT_328);
1419
    stringBuffer.append(TEXT_328);
1330
    stringBuffer.append(comparison);
1420
    stringBuffer.append(genDataType.getSafeUncapName());
1331
    stringBuffer.append(TEXT_329);
1421
    stringBuffer.append(TEXT_329);
1332
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1422
    stringBuffer.append(constant);
1333
    stringBuffer.append(TEXT_330);
1423
    stringBuffer.append(TEXT_330);
1334
    stringBuffer.append(genDataType.getSafeUncapName());
1424
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1335
    stringBuffer.append(TEXT_331);
1425
    stringBuffer.append(TEXT_331);
1336
    stringBuffer.append(constant);
1426
    stringBuffer.append(diagnostics);
1337
    stringBuffer.append(TEXT_332);
1427
    stringBuffer.append(TEXT_332);
1338
    stringBuffer.append(result);
1428
    stringBuffer.append(context);
1339
    stringBuffer.append(TEXT_333);
1429
    stringBuffer.append(TEXT_333);
1340
    if (genDataType.isMaxInclusive()) {
1341
    stringBuffer.append(comparison);
1342
    stringBuffer.append(TEXT_334);
1343
    }
1430
    }
1344
    stringBuffer.append(comparison);
1431
    stringBuffer.append(TEXT_334);
1432
    stringBuffer.append(result);
1345
    stringBuffer.append(TEXT_335);
1433
    stringBuffer.append(TEXT_335);
1346
    } else if (genDataType.isXMLDuration()) {
1434
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1435
    if (genDataType.isXMLCalendar()) {
1347
    stringBuffer.append(TEXT_336);
1436
    stringBuffer.append(TEXT_336);
1348
    stringBuffer.append(comparison);
1437
    stringBuffer.append(comparison);
1349
    stringBuffer.append(TEXT_337);
1438
    stringBuffer.append(TEXT_337);
Lines 1361-1811 Link Here
1361
    }
1450
    }
1362
    stringBuffer.append(comparison);
1451
    stringBuffer.append(comparison);
1363
    stringBuffer.append(TEXT_343);
1452
    stringBuffer.append(TEXT_343);
1364
    } else {
1453
    } else if (genDataType.isXMLDuration()) {
1365
    stringBuffer.append(TEXT_344);
1454
    stringBuffer.append(TEXT_344);
1366
    stringBuffer.append(result);
1455
    stringBuffer.append(comparison);
1367
    stringBuffer.append(TEXT_345);
1456
    stringBuffer.append(TEXT_345);
1368
    stringBuffer.append(genDataType.getSafeUncapName());
1457
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1369
    stringBuffer.append(TEXT_346);
1458
    stringBuffer.append(TEXT_346);
1370
    stringBuffer.append(constant);
1459
    stringBuffer.append(genDataType.getSafeUncapName());
1371
    stringBuffer.append(TEXT_347);
1460
    stringBuffer.append(TEXT_347);
1372
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1461
    stringBuffer.append(constant);
1373
    stringBuffer.append(TEXT_348);
1462
    stringBuffer.append(TEXT_348);
1374
    }
1375
    stringBuffer.append(TEXT_349);
1376
    stringBuffer.append(result);
1463
    stringBuffer.append(result);
1464
    stringBuffer.append(TEXT_349);
1465
    if (genDataType.isMaxInclusive()) {
1466
    stringBuffer.append(comparison);
1377
    stringBuffer.append(TEXT_350);
1467
    stringBuffer.append(TEXT_350);
1378
    stringBuffer.append(diagnostics);
1468
    }
1469
    stringBuffer.append(comparison);
1379
    stringBuffer.append(TEXT_351);
1470
    stringBuffer.append(TEXT_351);
1380
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1471
    } else {
1381
    stringBuffer.append(TEXT_352);
1472
    stringBuffer.append(TEXT_352);
1382
    stringBuffer.append(genDataType.getSafeUncapName());
1473
    stringBuffer.append(result);
1383
    stringBuffer.append(TEXT_353);
1474
    stringBuffer.append(TEXT_353);
1384
    stringBuffer.append(constant);
1475
    stringBuffer.append(genDataType.getSafeUncapName());
1385
    stringBuffer.append(TEXT_354);
1476
    stringBuffer.append(TEXT_354);
1386
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1477
    stringBuffer.append(constant);
1387
    stringBuffer.append(TEXT_355);
1478
    stringBuffer.append(TEXT_355);
1388
    stringBuffer.append(diagnostics);
1479
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1389
    stringBuffer.append(TEXT_356);
1480
    stringBuffer.append(TEXT_356);
1390
    stringBuffer.append(context);
1481
    }
1391
    stringBuffer.append(TEXT_357);
1482
    stringBuffer.append(TEXT_357);
1392
    stringBuffer.append(result);
1483
    stringBuffer.append(result);
1393
    stringBuffer.append(TEXT_358);
1484
    stringBuffer.append(TEXT_358);
1394
    }
1485
    stringBuffer.append(diagnostics);
1395
    } else if (constraint.equals("MinLength") && genDataType.getMinLength() != -1) {
1396
    stringBuffer.append(TEXT_359);
1486
    stringBuffer.append(TEXT_359);
1397
    stringBuffer.append(genDataType.getSafeUncapName());
1487
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1398
    stringBuffer.append(TEXT_360);
1488
    stringBuffer.append(TEXT_360);
1399
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1489
    stringBuffer.append(genDataType.getSafeUncapName());
1400
    stringBuffer.append(TEXT_361);
1490
    stringBuffer.append(TEXT_361);
1401
    stringBuffer.append(result);
1491
    stringBuffer.append(constant);
1402
    stringBuffer.append(TEXT_362);
1492
    stringBuffer.append(TEXT_362);
1403
    stringBuffer.append(genDataType.getMinLength());
1493
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1404
    stringBuffer.append(TEXT_363);
1494
    stringBuffer.append(TEXT_363);
1405
    stringBuffer.append(result);
1406
    stringBuffer.append(TEXT_364);
1407
    stringBuffer.append(diagnostics);
1495
    stringBuffer.append(diagnostics);
1496
    stringBuffer.append(TEXT_364);
1497
    stringBuffer.append(context);
1408
    stringBuffer.append(TEXT_365);
1498
    stringBuffer.append(TEXT_365);
1409
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1499
    stringBuffer.append(result);
1410
    stringBuffer.append(TEXT_366);
1500
    stringBuffer.append(TEXT_366);
1411
    stringBuffer.append(genDataType.getSafeUncapName());
1501
    }
1502
    } else if (constraint.equals("MinLength") && genDataType.getMinLength() != -1) {
1412
    stringBuffer.append(TEXT_367);
1503
    stringBuffer.append(TEXT_367);
1413
    stringBuffer.append(genDataType.getMinLength());
1504
    stringBuffer.append(genDataType.getSafeUncapName());
1414
    stringBuffer.append(TEXT_368);
1505
    stringBuffer.append(TEXT_368);
1415
    stringBuffer.append(diagnostics);
1506
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1416
    stringBuffer.append(TEXT_369);
1507
    stringBuffer.append(TEXT_369);
1417
    stringBuffer.append(context);
1418
    stringBuffer.append(TEXT_370);
1419
    stringBuffer.append(result);
1508
    stringBuffer.append(result);
1509
    stringBuffer.append(TEXT_370);
1510
    stringBuffer.append(genDataType.getMinLength());
1420
    stringBuffer.append(TEXT_371);
1511
    stringBuffer.append(TEXT_371);
1421
    } else if (constraint.equals("MaxLength") && genDataType.getMaxLength() != -1) {
1512
    stringBuffer.append(result);
1422
    stringBuffer.append(TEXT_372);
1513
    stringBuffer.append(TEXT_372);
1423
    stringBuffer.append(genDataType.getSafeUncapName());
1514
    stringBuffer.append(diagnostics);
1424
    stringBuffer.append(TEXT_373);
1515
    stringBuffer.append(TEXT_373);
1425
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1516
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1426
    stringBuffer.append(TEXT_374);
1517
    stringBuffer.append(TEXT_374);
1427
    stringBuffer.append(result);
1518
    stringBuffer.append(genDataType.getSafeUncapName());
1428
    stringBuffer.append(TEXT_375);
1519
    stringBuffer.append(TEXT_375);
1429
    stringBuffer.append(genDataType.getMaxLength());
1520
    stringBuffer.append(genDataType.getMinLength());
1430
    stringBuffer.append(TEXT_376);
1521
    stringBuffer.append(TEXT_376);
1431
    stringBuffer.append(result);
1432
    stringBuffer.append(TEXT_377);
1433
    stringBuffer.append(diagnostics);
1522
    stringBuffer.append(diagnostics);
1523
    stringBuffer.append(TEXT_377);
1524
    stringBuffer.append(context);
1434
    stringBuffer.append(TEXT_378);
1525
    stringBuffer.append(TEXT_378);
1435
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1526
    stringBuffer.append(result);
1436
    stringBuffer.append(TEXT_379);
1527
    stringBuffer.append(TEXT_379);
1437
    stringBuffer.append(genDataType.getSafeUncapName());
1528
    } else if (constraint.equals("MaxLength") && genDataType.getMaxLength() != -1) {
1438
    stringBuffer.append(TEXT_380);
1529
    stringBuffer.append(TEXT_380);
1439
    stringBuffer.append(genDataType.getMaxLength());
1530
    stringBuffer.append(genDataType.getSafeUncapName());
1440
    stringBuffer.append(TEXT_381);
1531
    stringBuffer.append(TEXT_381);
1441
    stringBuffer.append(diagnostics);
1532
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1442
    stringBuffer.append(TEXT_382);
1533
    stringBuffer.append(TEXT_382);
1443
    stringBuffer.append(context);
1444
    stringBuffer.append(TEXT_383);
1445
    stringBuffer.append(result);
1534
    stringBuffer.append(result);
1535
    stringBuffer.append(TEXT_383);
1536
    stringBuffer.append(genDataType.getMaxLength());
1446
    stringBuffer.append(TEXT_384);
1537
    stringBuffer.append(TEXT_384);
1447
    } else if (constraint.equals("TotalDigits") && genDataType.getTotalDigits() != -1) {
1448
    if (genDataType.isPrimitiveType()) {
1449
    stringBuffer.append(TEXT_385);
1450
    stringBuffer.append(result);
1538
    stringBuffer.append(result);
1539
    stringBuffer.append(TEXT_385);
1540
    stringBuffer.append(diagnostics);
1451
    stringBuffer.append(TEXT_386);
1541
    stringBuffer.append(TEXT_386);
1452
    stringBuffer.append(genDataType.getSafeUncapName());
1542
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1453
    stringBuffer.append(TEXT_387);
1543
    stringBuffer.append(TEXT_387);
1454
    stringBuffer.append(constant);
1455
    stringBuffer.append(TEXT_388);
1456
    stringBuffer.append(genDataType.getSafeUncapName());
1544
    stringBuffer.append(genDataType.getSafeUncapName());
1545
    stringBuffer.append(TEXT_388);
1546
    stringBuffer.append(genDataType.getMaxLength());
1457
    stringBuffer.append(TEXT_389);
1547
    stringBuffer.append(TEXT_389);
1458
    stringBuffer.append(constant);
1548
    stringBuffer.append(diagnostics);
1459
    stringBuffer.append(TEXT_390);
1549
    stringBuffer.append(TEXT_390);
1460
    stringBuffer.append(result);
1550
    stringBuffer.append(context);
1461
    stringBuffer.append(TEXT_391);
1551
    stringBuffer.append(TEXT_391);
1462
    stringBuffer.append(diagnostics);
1552
    stringBuffer.append(result);
1463
    stringBuffer.append(TEXT_392);
1553
    stringBuffer.append(TEXT_392);
1464
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1554
    } else if (constraint.equals("TotalDigits") && genDataType.getTotalDigits() != -1) {
1555
    if (genDataType.isPrimitiveType()) {
1465
    stringBuffer.append(TEXT_393);
1556
    stringBuffer.append(TEXT_393);
1466
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1557
    stringBuffer.append(result);
1467
    stringBuffer.append(TEXT_394);
1558
    stringBuffer.append(TEXT_394);
1468
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1469
    stringBuffer.append(TEXT_395);
1470
    stringBuffer.append(genDataType.getSafeUncapName());
1559
    stringBuffer.append(genDataType.getSafeUncapName());
1560
    stringBuffer.append(TEXT_395);
1561
    stringBuffer.append(constant);
1471
    stringBuffer.append(TEXT_396);
1562
    stringBuffer.append(TEXT_396);
1472
    stringBuffer.append(genDataType.getTotalDigits());
1563
    stringBuffer.append(genDataType.getSafeUncapName());
1473
    stringBuffer.append(TEXT_397);
1564
    stringBuffer.append(TEXT_397);
1474
    stringBuffer.append(diagnostics);
1565
    stringBuffer.append(constant);
1475
    stringBuffer.append(TEXT_398);
1566
    stringBuffer.append(TEXT_398);
1476
    stringBuffer.append(context);
1567
    stringBuffer.append(result);
1477
    stringBuffer.append(TEXT_399);
1568
    stringBuffer.append(TEXT_399);
1478
    } else {
1569
    stringBuffer.append(diagnostics);
1479
    stringBuffer.append(TEXT_400);
1570
    stringBuffer.append(TEXT_400);
1480
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1571
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1481
    stringBuffer.append(TEXT_401);
1572
    stringBuffer.append(TEXT_401);
1482
    stringBuffer.append(genDataType.getSafeUncapName());
1573
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1483
    stringBuffer.append(TEXT_402);
1574
    stringBuffer.append(TEXT_402);
1484
    stringBuffer.append(genDataType.getTotalDigits());
1575
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1485
    stringBuffer.append(TEXT_403);
1576
    stringBuffer.append(TEXT_403);
1486
    stringBuffer.append(diagnostics);
1577
    stringBuffer.append(genDataType.getSafeUncapName());
1487
    stringBuffer.append(TEXT_404);
1578
    stringBuffer.append(TEXT_404);
1488
    stringBuffer.append(context);
1579
    stringBuffer.append(genDataType.getTotalDigits());
1489
    stringBuffer.append(TEXT_405);
1580
    stringBuffer.append(TEXT_405);
1490
    }
1581
    stringBuffer.append(diagnostics);
1491
    } else if ("java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1492
    stringBuffer.append(TEXT_406);
1582
    stringBuffer.append(TEXT_406);
1493
    stringBuffer.append(result);
1583
    stringBuffer.append(context);
1494
    stringBuffer.append(TEXT_407);
1584
    stringBuffer.append(TEXT_407);
1495
    stringBuffer.append(genDataType.getSafeUncapName());
1585
    } else {
1496
    stringBuffer.append(TEXT_408);
1586
    stringBuffer.append(TEXT_408);
1497
    stringBuffer.append(genDataType.getTotalDigits());
1587
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1498
    stringBuffer.append(TEXT_409);
1588
    stringBuffer.append(TEXT_409);
1499
    stringBuffer.append(result);
1589
    stringBuffer.append(genDataType.getSafeUncapName());
1500
    stringBuffer.append(TEXT_410);
1590
    stringBuffer.append(TEXT_410);
1501
    stringBuffer.append(diagnostics);
1591
    stringBuffer.append(genDataType.getTotalDigits());
1502
    stringBuffer.append(TEXT_411);
1592
    stringBuffer.append(TEXT_411);
1503
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1593
    stringBuffer.append(diagnostics);
1504
    stringBuffer.append(TEXT_412);
1594
    stringBuffer.append(TEXT_412);
1505
    stringBuffer.append(genDataType.getSafeUncapName());
1595
    stringBuffer.append(context);
1506
    stringBuffer.append(TEXT_413);
1596
    stringBuffer.append(TEXT_413);
1507
    stringBuffer.append(genDataType.getTotalDigits());
1597
    }
1598
    } else if ("java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1508
    stringBuffer.append(TEXT_414);
1599
    stringBuffer.append(TEXT_414);
1509
    stringBuffer.append(diagnostics);
1600
    stringBuffer.append(result);
1510
    stringBuffer.append(TEXT_415);
1601
    stringBuffer.append(TEXT_415);
1511
    stringBuffer.append(context);
1602
    stringBuffer.append(genDataType.getSafeUncapName());
1512
    stringBuffer.append(TEXT_416);
1603
    stringBuffer.append(TEXT_416);
1513
    } else {
1604
    stringBuffer.append(genDataType.getTotalDigits());
1514
    stringBuffer.append(TEXT_417);
1605
    stringBuffer.append(TEXT_417);
1515
    stringBuffer.append(result);
1606
    stringBuffer.append(result);
1516
    stringBuffer.append(TEXT_418);
1607
    stringBuffer.append(TEXT_418);
1517
    stringBuffer.append(genDataType.getSafeUncapName());
1608
    stringBuffer.append(diagnostics);
1518
    stringBuffer.append(TEXT_419);
1609
    stringBuffer.append(TEXT_419);
1519
    stringBuffer.append(constant);
1610
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1520
    stringBuffer.append(TEXT_420);
1611
    stringBuffer.append(TEXT_420);
1521
    stringBuffer.append(genDataType.getSafeUncapName());
1612
    stringBuffer.append(genDataType.getSafeUncapName());
1522
    stringBuffer.append(TEXT_421);
1613
    stringBuffer.append(TEXT_421);
1523
    stringBuffer.append(constant);
1614
    stringBuffer.append(genDataType.getTotalDigits());
1524
    stringBuffer.append(TEXT_422);
1615
    stringBuffer.append(TEXT_422);
1525
    stringBuffer.append(result);
1526
    stringBuffer.append(TEXT_423);
1527
    stringBuffer.append(diagnostics);
1616
    stringBuffer.append(diagnostics);
1617
    stringBuffer.append(TEXT_423);
1618
    stringBuffer.append(context);
1528
    stringBuffer.append(TEXT_424);
1619
    stringBuffer.append(TEXT_424);
1529
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1620
    } else {
1530
    stringBuffer.append(TEXT_425);
1621
    stringBuffer.append(TEXT_425);
1531
    stringBuffer.append(genDataType.getSafeUncapName());
1622
    stringBuffer.append(result);
1532
    stringBuffer.append(TEXT_426);
1623
    stringBuffer.append(TEXT_426);
1533
    stringBuffer.append(genDataType.getTotalDigits());
1624
    stringBuffer.append(genDataType.getSafeUncapName());
1534
    stringBuffer.append(TEXT_427);
1625
    stringBuffer.append(TEXT_427);
1535
    stringBuffer.append(diagnostics);
1626
    stringBuffer.append(constant);
1536
    stringBuffer.append(TEXT_428);
1627
    stringBuffer.append(TEXT_428);
1537
    stringBuffer.append(context);
1628
    stringBuffer.append(genDataType.getSafeUncapName());
1538
    stringBuffer.append(TEXT_429);
1629
    stringBuffer.append(TEXT_429);
1539
    }
1630
    stringBuffer.append(constant);
1540
    stringBuffer.append(TEXT_430);
1631
    stringBuffer.append(TEXT_430);
1541
    stringBuffer.append(result);
1632
    stringBuffer.append(result);
1542
    stringBuffer.append(TEXT_431);
1633
    stringBuffer.append(TEXT_431);
1543
    } else if (constraint.equals("FractionDigits") && genDataType.getFractionDigits() != -1 && "java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1634
    stringBuffer.append(diagnostics);
1544
    stringBuffer.append(TEXT_432);
1635
    stringBuffer.append(TEXT_432);
1545
    stringBuffer.append(result);
1636
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1546
    stringBuffer.append(TEXT_433);
1637
    stringBuffer.append(TEXT_433);
1547
    stringBuffer.append(genDataType.getSafeUncapName());
1638
    stringBuffer.append(genDataType.getSafeUncapName());
1548
    stringBuffer.append(TEXT_434);
1639
    stringBuffer.append(TEXT_434);
1549
    stringBuffer.append(genDataType.getFractionDigits());
1640
    stringBuffer.append(genDataType.getTotalDigits());
1550
    stringBuffer.append(TEXT_435);
1641
    stringBuffer.append(TEXT_435);
1551
    stringBuffer.append(result);
1552
    stringBuffer.append(TEXT_436);
1553
    stringBuffer.append(diagnostics);
1642
    stringBuffer.append(diagnostics);
1643
    stringBuffer.append(TEXT_436);
1644
    stringBuffer.append(context);
1554
    stringBuffer.append(TEXT_437);
1645
    stringBuffer.append(TEXT_437);
1555
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1646
    }
1556
    stringBuffer.append(TEXT_438);
1647
    stringBuffer.append(TEXT_438);
1557
    stringBuffer.append(genDataType.getSafeUncapName());
1648
    stringBuffer.append(result);
1558
    stringBuffer.append(TEXT_439);
1649
    stringBuffer.append(TEXT_439);
1559
    stringBuffer.append(genDataType.getFractionDigits());
1650
    } else if (constraint.equals("FractionDigits") && genDataType.getFractionDigits() != -1 && "java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1560
    stringBuffer.append(TEXT_440);
1651
    stringBuffer.append(TEXT_440);
1561
    stringBuffer.append(diagnostics);
1652
    stringBuffer.append(result);
1562
    stringBuffer.append(TEXT_441);
1653
    stringBuffer.append(TEXT_441);
1563
    stringBuffer.append(context);
1654
    stringBuffer.append(genDataType.getSafeUncapName());
1564
    stringBuffer.append(TEXT_442);
1655
    stringBuffer.append(TEXT_442);
1565
    stringBuffer.append(result);
1656
    stringBuffer.append(genDataType.getFractionDigits());
1566
    stringBuffer.append(TEXT_443);
1657
    stringBuffer.append(TEXT_443);
1567
    } else if (constraintDelegate != null) {
1658
    stringBuffer.append(result);
1568
    stringBuffer.append(TEXT_444);
1659
    stringBuffer.append(TEXT_444);
1569
    stringBuffer.append(diagnostics);
1660
    stringBuffer.append(diagnostics);
1570
    stringBuffer.append(TEXT_445);
1661
    stringBuffer.append(TEXT_445);
1571
    stringBuffer.append(diagnostics);
1662
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1572
    stringBuffer.append(TEXT_446);
1663
    stringBuffer.append(TEXT_446);
1573
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1664
    stringBuffer.append(genDataType.getSafeUncapName());
1574
    stringBuffer.append(TEXT_447);
1665
    stringBuffer.append(TEXT_447);
1575
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1666
    stringBuffer.append(genDataType.getFractionDigits());
1576
    stringBuffer.append(TEXT_448);
1667
    stringBuffer.append(TEXT_448);
1577
    stringBuffer.append(genModel.getNonNLS());
1668
    stringBuffer.append(diagnostics);
1578
    stringBuffer.append(TEXT_449);
1669
    stringBuffer.append(TEXT_449);
1579
    stringBuffer.append(constraint);
1670
    stringBuffer.append(context);
1580
    stringBuffer.append(TEXT_450);
1671
    stringBuffer.append(TEXT_450);
1581
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1672
    stringBuffer.append(result);
1582
    stringBuffer.append(TEXT_451);
1673
    stringBuffer.append(TEXT_451);
1583
    stringBuffer.append(genClassifier.getSafeUncapName());
1674
    } else if (constraintDelegate != null) {
1584
    stringBuffer.append(TEXT_452);
1675
    stringBuffer.append(TEXT_452);
1585
    stringBuffer.append(context);
1676
    stringBuffer.append(diagnostics);
1586
    stringBuffer.append(TEXT_453);
1677
    stringBuffer.append(TEXT_453);
1587
    stringBuffer.append(genModel.getNonNLS());
1678
    stringBuffer.append(diagnostics);
1588
    stringBuffer.append(TEXT_454);
1679
    stringBuffer.append(TEXT_454);
1589
    stringBuffer.append(genClassifier.getSafeUncapName());
1680
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1590
    stringBuffer.append(TEXT_455);
1681
    stringBuffer.append(TEXT_455);
1591
    } else {
1682
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1592
    stringBuffer.append(TEXT_456);
1683
    stringBuffer.append(TEXT_456);
1593
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1684
    stringBuffer.append(genModel.getNonNLS());
1594
    stringBuffer.append(TEXT_457);
1685
    stringBuffer.append(TEXT_457);
1595
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1686
    stringBuffer.append(constraint);
1596
    stringBuffer.append(TEXT_458);
1687
    stringBuffer.append(TEXT_458);
1597
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1688
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1598
    stringBuffer.append(TEXT_459);
1689
    stringBuffer.append(TEXT_459);
1599
    stringBuffer.append(constraint);
1690
    stringBuffer.append(genClassifier.getSafeUncapName());
1600
    stringBuffer.append(TEXT_460);
1691
    stringBuffer.append(TEXT_460);
1601
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1692
    stringBuffer.append(context);
1602
    stringBuffer.append(TEXT_461);
1693
    stringBuffer.append(TEXT_461);
1603
    stringBuffer.append(genClassifier.getSafeUncapName());
1694
    stringBuffer.append(genModel.getNonNLS());
1604
    stringBuffer.append(TEXT_462);
1695
    stringBuffer.append(TEXT_462);
1605
    stringBuffer.append(context);
1696
    stringBuffer.append(genClassifier.getSafeUncapName());
1606
    stringBuffer.append(TEXT_463);
1697
    stringBuffer.append(TEXT_463);
1607
    stringBuffer.append(genModel.getNonNLS());
1698
    } else {
1608
    stringBuffer.append(genModel.getNonNLS(2));
1609
    stringBuffer.append(TEXT_464);
1699
    stringBuffer.append(TEXT_464);
1610
    stringBuffer.append(genClassifier.getSafeUncapName());
1700
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1611
    stringBuffer.append(TEXT_465);
1701
    stringBuffer.append(TEXT_465);
1612
    }
1702
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1613
    stringBuffer.append(TEXT_466);
1703
    stringBuffer.append(TEXT_466);
1614
    stringBuffer.append(delegate);
1704
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1615
    stringBuffer.append(TEXT_467);
1705
    stringBuffer.append(TEXT_467);
1616
    stringBuffer.append(constraintDelegate.getName());
1617
    stringBuffer.append(TEXT_468);
1618
    stringBuffer.append(constraint);
1706
    stringBuffer.append(constraint);
1707
    stringBuffer.append(TEXT_468);
1708
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1619
    stringBuffer.append(TEXT_469);
1709
    stringBuffer.append(TEXT_469);
1620
    stringBuffer.append(genClassifier.getSafeUncapName());
1710
    stringBuffer.append(genClassifier.getSafeUncapName());
1621
    stringBuffer.append(accessor);
1622
    stringBuffer.append(TEXT_470);
1711
    stringBuffer.append(TEXT_470);
1623
    stringBuffer.append(diagnostics);
1624
    stringBuffer.append(TEXT_471);
1625
    stringBuffer.append(context);
1712
    stringBuffer.append(context);
1713
    stringBuffer.append(TEXT_471);
1714
    stringBuffer.append(genModel.getNonNLS());
1715
    stringBuffer.append(genModel.getNonNLS(2));
1626
    stringBuffer.append(TEXT_472);
1716
    stringBuffer.append(TEXT_472);
1627
    } else {
1717
    stringBuffer.append(genClassifier.getSafeUncapName());
1628
    stringBuffer.append(TEXT_473);
1718
    stringBuffer.append(TEXT_473);
1629
    stringBuffer.append(diagnostics);
1719
    }
1630
    stringBuffer.append(TEXT_474);
1720
    stringBuffer.append(TEXT_474);
1631
    stringBuffer.append(diagnostics);
1721
    stringBuffer.append(delegate);
1632
    stringBuffer.append(TEXT_475);
1722
    stringBuffer.append(TEXT_475);
1633
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1723
    stringBuffer.append(constraintDelegate.getName());
1634
    stringBuffer.append(TEXT_476);
1724
    stringBuffer.append(TEXT_476);
1635
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1725
    stringBuffer.append(constraint);
1636
    stringBuffer.append(TEXT_477);
1726
    stringBuffer.append(TEXT_477);
1637
    stringBuffer.append(genModel.getNonNLS());
1727
    stringBuffer.append(genClassifier.getSafeUncapName());
1728
    stringBuffer.append(accessor);
1638
    stringBuffer.append(TEXT_478);
1729
    stringBuffer.append(TEXT_478);
1639
    stringBuffer.append(constraint);
1730
    stringBuffer.append(diagnostics);
1640
    stringBuffer.append(TEXT_479);
1731
    stringBuffer.append(TEXT_479);
1641
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1732
    stringBuffer.append(context);
1642
    stringBuffer.append(TEXT_480);
1733
    stringBuffer.append(TEXT_480);
1643
    stringBuffer.append(genClassifier.getSafeUncapName());
1734
    } else {
1735
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
1644
    stringBuffer.append(TEXT_481);
1736
    stringBuffer.append(TEXT_481);
1645
    stringBuffer.append(context);
1737
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1646
    stringBuffer.append(TEXT_482);
1738
    stringBuffer.append(TEXT_482);
1647
    stringBuffer.append(genModel.getNonNLS());
1739
    stringBuffer.append(context);
1648
    stringBuffer.append(TEXT_483);
1740
    stringBuffer.append(TEXT_483);
1649
    stringBuffer.append(genClassifier.getSafeUncapName());
1741
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
1650
    stringBuffer.append(TEXT_484);
1742
    stringBuffer.append(TEXT_484);
1651
    } else {
1743
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1652
    stringBuffer.append(TEXT_485);
1744
    stringBuffer.append(TEXT_485);
1653
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1745
    stringBuffer.append(genModel.getNonNLS());
1654
    stringBuffer.append(TEXT_486);
1746
    stringBuffer.append(TEXT_486);
1655
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1747
    stringBuffer.append(genClassifier.getClassifierID());
1656
    stringBuffer.append(TEXT_487);
1748
    stringBuffer.append(TEXT_487);
1657
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1749
    stringBuffer.append(CodeGenUtil.upperName(constraint));
1658
    stringBuffer.append(TEXT_488);
1750
    stringBuffer.append(TEXT_488);
1659
    stringBuffer.append(constraint);
1751
    stringBuffer.append(constraint);
1660
    stringBuffer.append(TEXT_489);
1752
    stringBuffer.append(TEXT_489);
1661
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1753
    stringBuffer.append(genClassifier.getQualifiedClassifierAccessor());
1662
    stringBuffer.append(TEXT_490);
1754
    stringBuffer.append(TEXT_490);
1663
    stringBuffer.append(genClassifier.getSafeUncapName());
1755
    stringBuffer.append(genClassifier.getSafeUncapName());
1664
    stringBuffer.append(TEXT_491);
1756
    stringBuffer.append(TEXT_491);
1665
    stringBuffer.append(context);
1757
    stringBuffer.append(context);
1666
    stringBuffer.append(TEXT_492);
1758
    stringBuffer.append(TEXT_492);
1667
    stringBuffer.append(genModel.getNonNLS());
1759
    stringBuffer.append(genModel.getNonNLS());
1668
    stringBuffer.append(genModel.getNonNLS(2));
1669
    stringBuffer.append(TEXT_493);
1760
    stringBuffer.append(TEXT_493);
1670
    stringBuffer.append(genClassifier.getSafeUncapName());
1761
    stringBuffer.append(diagnostics);
1671
    stringBuffer.append(TEXT_494);
1762
    stringBuffer.append(TEXT_494);
1672
    }
1763
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1673
    stringBuffer.append(TEXT_495);
1764
    stringBuffer.append(TEXT_495);
1674
    }
1765
    stringBuffer.append(genModel.getNonNLS());
1675
    } else if (constraintDelegate != null) {
1676
    stringBuffer.append(TEXT_496);
1766
    stringBuffer.append(TEXT_496);
1677
    stringBuffer.append(diagnostics);
1767
    stringBuffer.append(constraint);
1678
    stringBuffer.append(TEXT_497);
1768
    stringBuffer.append(TEXT_497);
1679
    stringBuffer.append(diagnostics);
1769
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1680
    stringBuffer.append(TEXT_498);
1770
    stringBuffer.append(TEXT_498);
1681
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1771
    stringBuffer.append(genClassifier.getSafeUncapName());
1682
    stringBuffer.append(TEXT_499);
1772
    stringBuffer.append(TEXT_499);
1683
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1773
    stringBuffer.append(context);
1684
    stringBuffer.append(TEXT_500);
1774
    stringBuffer.append(TEXT_500);
1685
    stringBuffer.append(genModel.getNonNLS());
1775
    stringBuffer.append(genModel.getNonNLS());
1686
    stringBuffer.append(TEXT_501);
1776
    stringBuffer.append(TEXT_501);
1687
    stringBuffer.append(constraint);
1688
    stringBuffer.append(TEXT_502);
1689
    stringBuffer.append(genClassifier.getSafeUncapName());
1777
    stringBuffer.append(genClassifier.getSafeUncapName());
1778
    stringBuffer.append(TEXT_502);
1779
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
1690
    stringBuffer.append(TEXT_503);
1780
    stringBuffer.append(TEXT_503);
1691
    stringBuffer.append(context);
1781
    stringBuffer.append(diagnostics);
1692
    stringBuffer.append(TEXT_504);
1782
    stringBuffer.append(TEXT_504);
1693
    stringBuffer.append(genModel.getNonNLS());
1783
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1694
    stringBuffer.append(TEXT_505);
1784
    stringBuffer.append(TEXT_505);
1695
    stringBuffer.append(genClassifier.getSafeUncapName());
1785
    stringBuffer.append(genModel.getNonNLS());
1696
    stringBuffer.append(TEXT_506);
1786
    stringBuffer.append(TEXT_506);
1697
    } else {
1787
    stringBuffer.append(constraint);
1698
    stringBuffer.append(TEXT_507);
1788
    stringBuffer.append(TEXT_507);
1699
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1789
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1700
    stringBuffer.append(TEXT_508);
1790
    stringBuffer.append(TEXT_508);
1701
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1791
    stringBuffer.append(genClassifier.getSafeUncapName());
1702
    stringBuffer.append(TEXT_509);
1792
    stringBuffer.append(TEXT_509);
1703
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1793
    stringBuffer.append(context);
1704
    stringBuffer.append(TEXT_510);
1794
    stringBuffer.append(TEXT_510);
1705
    stringBuffer.append(constraint);
1795
    stringBuffer.append(genModel.getNonNLS());
1706
    stringBuffer.append(TEXT_511);
1796
    stringBuffer.append(TEXT_511);
1707
    stringBuffer.append(genClassifier.getSafeUncapName());
1797
    stringBuffer.append(genClassifier.getSafeUncapName());
1708
    stringBuffer.append(TEXT_512);
1798
    stringBuffer.append(TEXT_512);
1709
    stringBuffer.append(context);
1799
    stringBuffer.append(diagnostics);
1710
    stringBuffer.append(TEXT_513);
1800
    stringBuffer.append(TEXT_513);
1711
    stringBuffer.append(genModel.getNonNLS());
1801
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1712
    stringBuffer.append(genModel.getNonNLS(2));
1713
    stringBuffer.append(TEXT_514);
1802
    stringBuffer.append(TEXT_514);
1714
    stringBuffer.append(genClassifier.getSafeUncapName());
1803
    stringBuffer.append(genModel.getNonNLS());
1715
    stringBuffer.append(TEXT_515);
1804
    stringBuffer.append(TEXT_515);
1716
    }
1805
    stringBuffer.append(constraint);
1717
    stringBuffer.append(TEXT_516);
1806
    stringBuffer.append(TEXT_516);
1718
    stringBuffer.append(delegate);
1807
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1719
    stringBuffer.append(TEXT_517);
1808
    stringBuffer.append(TEXT_517);
1720
    stringBuffer.append(constraintDelegate.getName());
1809
    stringBuffer.append(genClassifier.getSafeUncapName());
1721
    stringBuffer.append(TEXT_518);
1810
    stringBuffer.append(TEXT_518);
1722
    stringBuffer.append(constraint);
1811
    stringBuffer.append(context);
1723
    stringBuffer.append(TEXT_519);
1812
    stringBuffer.append(TEXT_519);
1724
    stringBuffer.append(cast);
1813
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1725
    stringBuffer.append(genClassifier.getSafeUncapName());
1726
    stringBuffer.append(TEXT_520);
1814
    stringBuffer.append(TEXT_520);
1727
    stringBuffer.append(diagnostics);
1815
    stringBuffer.append(genModel.getNonNLS());
1816
    stringBuffer.append(genModel.getNonNLS(2));
1728
    stringBuffer.append(TEXT_521);
1817
    stringBuffer.append(TEXT_521);
1729
    stringBuffer.append(context);
1818
    stringBuffer.append(genClassifier.getSafeUncapName());
1730
    stringBuffer.append(TEXT_522);
1819
    stringBuffer.append(TEXT_522);
1731
    } else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {
1820
    } else {
1732
    stringBuffer.append(TEXT_523);
1821
    stringBuffer.append(TEXT_523);
1733
    stringBuffer.append(genClassifier.getSafeUncapName());
1822
    stringBuffer.append(diagnostics);
1734
    stringBuffer.append(TEXT_524);
1823
    stringBuffer.append(TEXT_524);
1735
    stringBuffer.append(constraint);
1736
    stringBuffer.append(TEXT_525);
1737
    stringBuffer.append(diagnostics);
1824
    stringBuffer.append(diagnostics);
1825
    stringBuffer.append(TEXT_525);
1826
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1738
    stringBuffer.append(TEXT_526);
1827
    stringBuffer.append(TEXT_526);
1739
    stringBuffer.append(context);
1828
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1740
    stringBuffer.append(TEXT_527);
1829
    stringBuffer.append(TEXT_527);
1741
    } else {
1830
    stringBuffer.append(genModel.getNonNLS());
1742
    stringBuffer.append(TEXT_528);
1831
    stringBuffer.append(TEXT_528);
1743
    stringBuffer.append(diagnostics);
1832
    stringBuffer.append(constraint);
1744
    stringBuffer.append(TEXT_529);
1833
    stringBuffer.append(TEXT_529);
1745
    stringBuffer.append(diagnostics);
1834
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1746
    stringBuffer.append(TEXT_530);
1835
    stringBuffer.append(TEXT_530);
1747
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1836
    stringBuffer.append(genClassifier.getSafeUncapName());
1748
    stringBuffer.append(TEXT_531);
1837
    stringBuffer.append(TEXT_531);
1749
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1838
    stringBuffer.append(context);
1750
    stringBuffer.append(TEXT_532);
1839
    stringBuffer.append(TEXT_532);
1751
    stringBuffer.append(genModel.getNonNLS());
1840
    stringBuffer.append(genModel.getNonNLS());
1752
    stringBuffer.append(TEXT_533);
1841
    stringBuffer.append(TEXT_533);
1753
    stringBuffer.append(constraint);
1754
    stringBuffer.append(TEXT_534);
1755
    stringBuffer.append(genClassifier.getSafeUncapName());
1842
    stringBuffer.append(genClassifier.getSafeUncapName());
1843
    stringBuffer.append(TEXT_534);
1844
    } else {
1756
    stringBuffer.append(TEXT_535);
1845
    stringBuffer.append(TEXT_535);
1757
    stringBuffer.append(context);
1846
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1758
    stringBuffer.append(TEXT_536);
1847
    stringBuffer.append(TEXT_536);
1759
    stringBuffer.append(genModel.getNonNLS());
1848
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1760
    stringBuffer.append(TEXT_537);
1849
    stringBuffer.append(TEXT_537);
1761
    stringBuffer.append(genClassifier.getSafeUncapName());
1850
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1762
    stringBuffer.append(TEXT_538);
1851
    stringBuffer.append(TEXT_538);
1763
    } else {
1852
    stringBuffer.append(constraint);
1764
    stringBuffer.append(TEXT_539);
1853
    stringBuffer.append(TEXT_539);
1765
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1854
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1766
    stringBuffer.append(TEXT_540);
1855
    stringBuffer.append(TEXT_540);
1767
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1856
    stringBuffer.append(genClassifier.getSafeUncapName());
1768
    stringBuffer.append(TEXT_541);
1857
    stringBuffer.append(TEXT_541);
1769
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1858
    stringBuffer.append(context);
1770
    stringBuffer.append(TEXT_542);
1859
    stringBuffer.append(TEXT_542);
1771
    stringBuffer.append(constraint);
1860
    stringBuffer.append(genModel.getNonNLS());
1861
    stringBuffer.append(genModel.getNonNLS(2));
1772
    stringBuffer.append(TEXT_543);
1862
    stringBuffer.append(TEXT_543);
1773
    stringBuffer.append(genClassifier.getSafeUncapName());
1863
    stringBuffer.append(genClassifier.getSafeUncapName());
1774
    stringBuffer.append(TEXT_544);
1864
    stringBuffer.append(TEXT_544);
1775
    stringBuffer.append(context);
1865
    }
1776
    stringBuffer.append(TEXT_545);
1866
    stringBuffer.append(TEXT_545);
1867
    }
1868
    }
1869
    } else if (constraintDelegate != null) {
1870
    stringBuffer.append(TEXT_546);
1871
    stringBuffer.append(diagnostics);
1872
    stringBuffer.append(TEXT_547);
1873
    stringBuffer.append(diagnostics);
1874
    stringBuffer.append(TEXT_548);
1875
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1876
    stringBuffer.append(TEXT_549);
1877
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1878
    stringBuffer.append(TEXT_550);
1879
    stringBuffer.append(genModel.getNonNLS());
1880
    stringBuffer.append(TEXT_551);
1881
    stringBuffer.append(constraint);
1882
    stringBuffer.append(TEXT_552);
1883
    stringBuffer.append(genClassifier.getSafeUncapName());
1884
    stringBuffer.append(TEXT_553);
1885
    stringBuffer.append(context);
1886
    stringBuffer.append(TEXT_554);
1887
    stringBuffer.append(genModel.getNonNLS());
1888
    stringBuffer.append(TEXT_555);
1889
    stringBuffer.append(genClassifier.getSafeUncapName());
1890
    stringBuffer.append(TEXT_556);
1891
    } else {
1892
    stringBuffer.append(TEXT_557);
1893
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1894
    stringBuffer.append(TEXT_558);
1895
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1896
    stringBuffer.append(TEXT_559);
1897
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1898
    stringBuffer.append(TEXT_560);
1899
    stringBuffer.append(constraint);
1900
    stringBuffer.append(TEXT_561);
1901
    stringBuffer.append(genClassifier.getSafeUncapName());
1902
    stringBuffer.append(TEXT_562);
1903
    stringBuffer.append(context);
1904
    stringBuffer.append(TEXT_563);
1777
    stringBuffer.append(genModel.getNonNLS());
1905
    stringBuffer.append(genModel.getNonNLS());
1778
    stringBuffer.append(genModel.getNonNLS(2));
1906
    stringBuffer.append(genModel.getNonNLS(2));
1779
    stringBuffer.append(TEXT_546);
1907
    stringBuffer.append(TEXT_564);
1780
    stringBuffer.append(genClassifier.getSafeUncapName());
1908
    stringBuffer.append(genClassifier.getSafeUncapName());
1781
    stringBuffer.append(TEXT_547);
1909
    stringBuffer.append(TEXT_565);
1910
    }
1911
    stringBuffer.append(TEXT_566);
1912
    stringBuffer.append(delegate);
1913
    stringBuffer.append(TEXT_567);
1914
    stringBuffer.append(constraintDelegate.getName());
1915
    stringBuffer.append(TEXT_568);
1916
    stringBuffer.append(constraint);
1917
    stringBuffer.append(TEXT_569);
1918
    stringBuffer.append(cast);
1919
    stringBuffer.append(genClassifier.getSafeUncapName());
1920
    stringBuffer.append(TEXT_570);
1921
    stringBuffer.append(diagnostics);
1922
    stringBuffer.append(TEXT_571);
1923
    stringBuffer.append(context);
1924
    stringBuffer.append(TEXT_572);
1925
    } else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {
1926
    stringBuffer.append(TEXT_573);
1927
    stringBuffer.append(genClassifier.getSafeUncapName());
1928
    stringBuffer.append(TEXT_574);
1929
    stringBuffer.append(constraint);
1930
    stringBuffer.append(TEXT_575);
1931
    stringBuffer.append(diagnostics);
1932
    stringBuffer.append(TEXT_576);
1933
    stringBuffer.append(context);
1934
    stringBuffer.append(TEXT_577);
1935
    } else {
1936
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
1937
    stringBuffer.append(TEXT_578);
1938
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1939
    stringBuffer.append(TEXT_579);
1940
    stringBuffer.append(context);
1941
    stringBuffer.append(TEXT_580);
1942
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
1943
    stringBuffer.append(TEXT_581);
1944
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1945
    stringBuffer.append(TEXT_582);
1946
    stringBuffer.append(genModel.getNonNLS());
1947
    stringBuffer.append(TEXT_583);
1948
    stringBuffer.append(genClassifier.getClassifierID());
1949
    stringBuffer.append(TEXT_584);
1950
    stringBuffer.append(CodeGenUtil.upperName(constraint));
1951
    stringBuffer.append(TEXT_585);
1952
    stringBuffer.append(constraint);
1953
    stringBuffer.append(TEXT_586);
1954
    stringBuffer.append(genClassifier.getQualifiedClassifierAccessor());
1955
    stringBuffer.append(TEXT_587);
1956
    stringBuffer.append(genClassifier.getSafeUncapName());
1957
    stringBuffer.append(TEXT_588);
1958
    stringBuffer.append(context);
1959
    stringBuffer.append(TEXT_589);
1960
    stringBuffer.append(genModel.getNonNLS());
1961
    stringBuffer.append(TEXT_590);
1962
    stringBuffer.append(diagnostics);
1963
    stringBuffer.append(TEXT_591);
1964
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1965
    stringBuffer.append(TEXT_592);
1966
    stringBuffer.append(genModel.getNonNLS());
1967
    stringBuffer.append(TEXT_593);
1968
    stringBuffer.append(constraint);
1969
    stringBuffer.append(TEXT_594);
1970
    stringBuffer.append(genClassifier.getSafeUncapName());
1971
    stringBuffer.append(TEXT_595);
1972
    stringBuffer.append(context);
1973
    stringBuffer.append(TEXT_596);
1974
    stringBuffer.append(genModel.getNonNLS());
1975
    stringBuffer.append(TEXT_597);
1976
    stringBuffer.append(genClassifier.getSafeUncapName());
1977
    stringBuffer.append(TEXT_598);
1978
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
1979
    stringBuffer.append(TEXT_599);
1980
    stringBuffer.append(diagnostics);
1981
    stringBuffer.append(TEXT_600);
1982
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1983
    stringBuffer.append(TEXT_601);
1984
    stringBuffer.append(genModel.getNonNLS());
1985
    stringBuffer.append(TEXT_602);
1986
    stringBuffer.append(constraint);
1987
    stringBuffer.append(TEXT_603);
1988
    stringBuffer.append(genClassifier.getSafeUncapName());
1989
    stringBuffer.append(TEXT_604);
1990
    stringBuffer.append(context);
1991
    stringBuffer.append(TEXT_605);
1992
    stringBuffer.append(genModel.getNonNLS());
1993
    stringBuffer.append(TEXT_606);
1994
    stringBuffer.append(genClassifier.getSafeUncapName());
1995
    stringBuffer.append(TEXT_607);
1996
    stringBuffer.append(diagnostics);
1997
    stringBuffer.append(TEXT_608);
1998
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1999
    stringBuffer.append(TEXT_609);
2000
    stringBuffer.append(genModel.getNonNLS());
2001
    stringBuffer.append(TEXT_610);
2002
    stringBuffer.append(constraint);
2003
    stringBuffer.append(TEXT_611);
2004
    stringBuffer.append(genClassifier.getSafeUncapName());
2005
    stringBuffer.append(TEXT_612);
2006
    stringBuffer.append(context);
2007
    stringBuffer.append(TEXT_613);
2008
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
2009
    stringBuffer.append(TEXT_614);
2010
    stringBuffer.append(genModel.getNonNLS());
2011
    stringBuffer.append(genModel.getNonNLS(2));
2012
    stringBuffer.append(TEXT_615);
2013
    stringBuffer.append(genClassifier.getSafeUncapName());
2014
    stringBuffer.append(TEXT_616);
2015
    } else {
2016
    stringBuffer.append(TEXT_617);
2017
    stringBuffer.append(diagnostics);
2018
    stringBuffer.append(TEXT_618);
2019
    stringBuffer.append(diagnostics);
2020
    stringBuffer.append(TEXT_619);
2021
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
2022
    stringBuffer.append(TEXT_620);
2023
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
2024
    stringBuffer.append(TEXT_621);
2025
    stringBuffer.append(genModel.getNonNLS());
2026
    stringBuffer.append(TEXT_622);
2027
    stringBuffer.append(constraint);
2028
    stringBuffer.append(TEXT_623);
2029
    stringBuffer.append(genClassifier.getSafeUncapName());
2030
    stringBuffer.append(TEXT_624);
2031
    stringBuffer.append(context);
2032
    stringBuffer.append(TEXT_625);
2033
    stringBuffer.append(genModel.getNonNLS());
2034
    stringBuffer.append(TEXT_626);
2035
    stringBuffer.append(genClassifier.getSafeUncapName());
2036
    stringBuffer.append(TEXT_627);
2037
    } else {
2038
    stringBuffer.append(TEXT_628);
2039
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
2040
    stringBuffer.append(TEXT_629);
2041
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
2042
    stringBuffer.append(TEXT_630);
2043
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
2044
    stringBuffer.append(TEXT_631);
2045
    stringBuffer.append(constraint);
2046
    stringBuffer.append(TEXT_632);
2047
    stringBuffer.append(genClassifier.getSafeUncapName());
2048
    stringBuffer.append(TEXT_633);
2049
    stringBuffer.append(context);
2050
    stringBuffer.append(TEXT_634);
2051
    stringBuffer.append(genModel.getNonNLS());
2052
    stringBuffer.append(genModel.getNonNLS(2));
2053
    stringBuffer.append(TEXT_635);
2054
    stringBuffer.append(genClassifier.getSafeUncapName());
2055
    stringBuffer.append(TEXT_636);
2056
    }
2057
    stringBuffer.append(TEXT_637);
1782
    }
2058
    }
1783
    stringBuffer.append(TEXT_548);
1784
    }}
2059
    }}
1785
    stringBuffer.append(TEXT_549);
2060
    stringBuffer.append(TEXT_638);
1786
    }
2061
    }
1787
    }
2062
    }
1788
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
2063
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1789
    stringBuffer.append(TEXT_550);
2064
    stringBuffer.append(TEXT_639);
1790
    if (genModel.useClassOverrideAnnotation()) {
2065
    if (genModel.useClassOverrideAnnotation()) {
1791
    stringBuffer.append(TEXT_551);
2066
    stringBuffer.append(TEXT_640);
1792
    }
2067
    }
1793
    stringBuffer.append(TEXT_552);
2068
    stringBuffer.append(TEXT_641);
1794
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator"));
2069
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator"));
1795
    stringBuffer.append(TEXT_553);
2070
    stringBuffer.append(TEXT_642);
1796
    if (genModel.hasModelPluginClass()) {
2071
    if (genModel.hasModelPluginClass()) {
1797
    stringBuffer.append(TEXT_554);
2072
    stringBuffer.append(TEXT_643);
1798
    stringBuffer.append(genModel.getImportedName(genModel.getQualifiedModelPluginClassName()));
2073
    stringBuffer.append(genModel.getImportedName(genModel.getQualifiedModelPluginClassName()));
1799
    stringBuffer.append(TEXT_555);
2074
    stringBuffer.append(TEXT_644);
1800
    } else {
2075
    } else {
1801
    stringBuffer.append(TEXT_556);
2076
    stringBuffer.append(TEXT_645);
1802
    }
2077
    }
1803
    stringBuffer.append(TEXT_557);
2078
    stringBuffer.append(TEXT_646);
1804
    }
2079
    }
1805
    stringBuffer.append(TEXT_558);
2080
    stringBuffer.append(TEXT_647);
1806
    stringBuffer.append(genPackage.getValidatorClassName());
2081
    stringBuffer.append(genPackage.getValidatorClassName());
1807
    genModel.emitSortedImports();
2082
    genModel.emitSortedImports();
1808
    stringBuffer.append(TEXT_559);
2083
    stringBuffer.append(TEXT_648);
1809
    return stringBuffer.toString();
2084
    return stringBuffer.toString();
1810
  }
2085
  }
1811
}
2086
}
(-)plugin.properties (-2 / +2 lines)
Lines 1-7 Link Here
1
# /**
1
# /**
2
#  * <copyright>
2
#  * <copyright>
3
#  *
3
#  *
4
#  * Copyright (c) 2002-2008 IBM Corporation and others.
4
#  * Copyright (c) 2002-2009 IBM Corporation and others.
5
#  * All rights reserved.   This program and the accompanying materials
5
#  * All rights reserved.   This program and the accompanying materials
6
#  * are made available under the terms of the Eclipse Public License v1.0
6
#  * are made available under the terms of the Eclipse Public License v1.0
7
#  * which accompanies this distribution, and is available at
7
#  * which accompanies this distribution, and is available at
Lines 320-326 Link Here
320
_UI_GenPackage_multipleEditorPages_feature = Multiple Editor Pages
320
_UI_GenPackage_multipleEditorPages_feature = Multiple Editor Pages
321
_UI_GenPackage_multipleEditorPages_description = Whether the generated editor should have multiple pages
321
_UI_GenPackage_multipleEditorPages_description = Whether the generated editor should have multiple pages
322
_UI_CreateModelError_message = Problems encountered in file "{0}"
322
_UI_CreateModelError_message = Problems encountered in file "{0}"
323
_UI_SelectionPage_label = Generator
323
_UI_SelectionPage_label = Generator
324
_UI_GenFeature_propertyMultiLine_feature = Property Multi-line
324
_UI_GenFeature_propertyMultiLine_feature = Property Multi-line
325
_UI_GenFeature_propertyMultiLine_description = Whether this feature should be edited as a multi-line property
325
_UI_GenFeature_propertyMultiLine_description = Whether this feature should be edited as a multi-line property
326
_UI_GenFeature_propertySortChoices_feature = Property Sort Choices
326
_UI_GenFeature_propertySortChoices_feature = Property Sort Choices
(-)src/org/eclipse/emf/ecore/util/Diagnostician.java (-3 / +2 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2004-2006 IBM Corporation and others.
4
 * Copyright (c) 2004-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 160-167 Link Here
160
      }
160
      }
161
    }
161
    }
162
    boolean circular = context.get(EObjectValidator.ROOT_OBJECT) == eObject;
162
    boolean circular = context.get(EObjectValidator.ROOT_OBJECT) == eObject;
163
    @SuppressWarnings("null")
163
    boolean result = ((EValidator)eValidator).validate(eObject.eClass(), eObject, diagnostics, context);
164
    boolean result = ((EValidator)eValidator).validate(eClass, eObject, diagnostics, context);
165
    if ((result || diagnostics != null) && !circular)
164
    if ((result || diagnostics != null) && !circular)
166
    {
165
    {
167
      result &= doValidateContents(eObject, diagnostics, context);
166
      result &= doValidateContents(eObject, diagnostics, context);
(-)src/org/eclipse/emf/ecore/util/EcoreUtil.java (+28 lines)
Lines 4087-4092 Link Here
4087
    }
4087
    }
4088
  }
4088
  }
4089
4089
4090
  public static boolean isInvariant(EOperation eOperation)
4091
  {
4092
    return eOperation.getEType() == EcorePackage.Literals.EBOOLEAN &&
4093
      eOperation.getEParameters().size() == 2 &&
4094
      eOperation.getEParameters().get(0).getEType() == EcorePackage.Literals.EDIAGNOSTIC_CHAIN &&
4095
      eOperation.getEParameters().get(1).getEType() == EcorePackage.Literals.EMAP;
4096
  }
4097
4098
  public static List<String> getValidationDelegates(EPackage ePackage)
4099
  {
4100
    EAnnotation eAnnotation = ePackage.getEAnnotation(EcorePackage.eNS_URI);
4101
    if (eAnnotation != null)
4102
    {
4103
      String validationDelegates = eAnnotation.getDetails().get("validationDelegates");
4104
      if (validationDelegates != null)
4105
      {
4106
        List<String> result = new ArrayList<String>();
4107
        for (StringTokenizer stringTokenizer = new StringTokenizer(validationDelegates); stringTokenizer.hasMoreTokens();)
4108
        {
4109
          String validationDelegate = stringTokenizer.nextToken();
4110
          result.add(validationDelegate);
4111
        }
4112
        return result;
4113
      }
4114
    }
4115
    return Collections.emptyList();
4116
  }
4117
4090
  /*
4118
  /*
4091
   static 
4119
   static 
4092
   {
4120
   {
(-)src/org/eclipse/emf/ecore/util/EObjectValidator.java (-39 / +390 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2004-2007 IBM Corporation and others.
4
 * Copyright (c) 2004-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 34-50 Link Here
34
import org.eclipse.emf.common.util.DiagnosticChain;
34
import org.eclipse.emf.common.util.DiagnosticChain;
35
import org.eclipse.emf.common.util.EMap;
35
import org.eclipse.emf.common.util.EMap;
36
import org.eclipse.emf.common.util.ResourceLocator;
36
import org.eclipse.emf.common.util.ResourceLocator;
37
37
import org.eclipse.emf.common.util.URI;
38
import org.eclipse.emf.ecore.EValidator;
39
38
40
import org.eclipse.emf.ecore.EAttribute;
39
import org.eclipse.emf.ecore.EAttribute;
41
import org.eclipse.emf.ecore.EObject;
42
import org.eclipse.emf.ecore.EClass;
40
import org.eclipse.emf.ecore.EClass;
43
import org.eclipse.emf.ecore.EReference;
44
import org.eclipse.emf.ecore.EcorePackage;
45
import org.eclipse.emf.ecore.EDataType;
41
import org.eclipse.emf.ecore.EDataType;
42
import org.eclipse.emf.ecore.EObject;
43
import org.eclipse.emf.ecore.EOperation;
46
import org.eclipse.emf.ecore.EPackage;
44
import org.eclipse.emf.ecore.EPackage;
45
import org.eclipse.emf.ecore.EReference;
47
import org.eclipse.emf.ecore.EStructuralFeature;
46
import org.eclipse.emf.ecore.EStructuralFeature;
47
import org.eclipse.emf.ecore.EValidator;
48
import org.eclipse.emf.ecore.EcorePackage;
48
import org.eclipse.emf.ecore.InternalEObject;
49
import org.eclipse.emf.ecore.InternalEObject;
49
50
50
import org.eclipse.emf.ecore.plugin.EcorePlugin;
51
import org.eclipse.emf.ecore.plugin.EcorePlugin;
Lines 165-170 Link Here
165
    return Diagnostician.INSTANCE;
166
    return Diagnostician.INSTANCE;
166
  }
167
  }
167
168
169
  protected EValidator.ValidationDelegate.Registry getValidationDelegateRegistry(Map<Object, Object> context)
170
  {
171
    if (context != null)
172
    {
173
      EValidator.ValidationDelegate.Registry result = (EValidator.ValidationDelegate.Registry)context.get(EValidator.ValidationDelegate.Registry.class);
174
      if (result != null)
175
      {
176
        return result;
177
      }
178
    }
179
180
    return EValidator.ValidationDelegate.Registry.INSTANCE;
181
  }
182
168
  /**
183
  /**
169
   * Validates the object in the given context, optionally producing diagnostics.
184
   * Validates the object in the given context, optionally producing diagnostics.
170
   * @param diagnostics a place to accumulate diagnostics; if it's <code>null</code>, no diagnostics should be produced.
185
   * @param diagnostics a place to accumulate diagnostics; if it's <code>null</code>, no diagnostics should be produced.
Lines 184-194 Link Here
184
    }
199
    }
185
    else
200
    else
186
    {
201
    {
187
      List<EClass> eSuperTypes = eClass.getESuperTypes();
202
      return new DynamicEClassValidator()
188
      return
203
        {
189
        eSuperTypes.isEmpty() ?
204
          // Ensure that the class loader for this class will be used downstream.
190
          validate_EveryDefaultConstraint(eObject, diagnostics, context) :
205
          //
191
          validate(eSuperTypes.get(0), eObject, diagnostics, context);
206
        }.validate(eClass, eObject, diagnostics, context);
192
    }
207
    }
193
  }
208
  }
194
209
Lines 836-849 Link Here
836
      }
851
      }
837
    }
852
    }
838
853
839
    public boolean validate(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
854
    protected boolean validateDelegatedConstraints(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
840
    {
855
    {
841
      boolean result = true;
856
      boolean result = true;
857
858
      EValidator.ValidationDelegate.Registry registry = getValidationDelegateRegistry(context);
859
      List<String> validationDelegates = EcoreUtil.getValidationDelegates(eDataType.getEPackage());
860
861
      if (!validationDelegates.isEmpty())
862
      {
863
        CONSTRAINTS: for (String constraint : EcoreUtil.getConstraints(eDataType))
864
        {
865
          for (String uri : validationDelegates)
866
          {
867
            String expression = EcoreUtil.getAnnotation(eDataType, uri, constraint);
868
            if (expression != null)
869
            {
870
              EValidator.ValidationDelegate delegate = registry.getValidationDelegate(URI.createURI(uri));
871
              if (delegate != null)
872
              {
873
                try
874
                {
875
                  if (!delegate.validate(expression, constraint, eDataType, value, context))
876
                  {
877
                    result &= false;
878
                    if (diagnostics != null)
879
                    {
880
                      reportConstraintDelegateViolation(eDataType, value, diagnostics, context, constraint);
881
                    }
882
                    else
883
                    {
884
                      break CONSTRAINTS;
885
                    }
886
                  }
887
                }
888
                catch (Throwable throwable)
889
                {
890
                  result &= false;
891
                  if (diagnostics != null)
892
                  {
893
                    reportConstraintDelegateException(eDataType, value, diagnostics, context, constraint, throwable);
894
                  }
895
                  else
896
                  {
897
                    break CONSTRAINTS;
898
                  }
899
                }
900
              }
901
              break;
902
            }
903
          }
904
        }
905
      }
906
907
      return result;
908
    }
909
910
    protected boolean validateSchemaConstraints(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
911
    {
912
      boolean result = true;
913
842
      if (effectiveEnumeration != null)
914
      if (effectiveEnumeration != null)
843
      {
915
      {
844
        if (!effectiveEnumeration.contains(value))
916
        if (!effectiveEnumeration.contains(value))
845
        {
917
        {
846
          if (diagnostics != null) reportEnumerationViolation(eDataType, value, effectiveEnumeration, diagnostics, context);
918
          if (diagnostics != null)
919
            reportEnumerationViolation(eDataType, value, effectiveEnumeration, diagnostics, context);
847
          result = false;
920
          result = false;
848
        }
921
        }
849
      }
922
      }
Lines 855-864 Link Here
855
928
856
      if (effectiveMin != null)
929
      if (effectiveMin != null)
857
      {
930
      {
858
        @SuppressWarnings("unchecked") Comparable<Object> comparableObject = (Comparable<Object>)effectiveMin;
931
        @SuppressWarnings("unchecked")
859
        if (effectiveMinIsInclusive ?
932
        Comparable<Object> comparableObject = (Comparable<Object>)effectiveMin;
860
              comparableObject.compareTo(value) > 0:
933
        if (effectiveMinIsInclusive ? comparableObject.compareTo(value) > 0 : comparableObject.compareTo(value) >= 0)
861
              comparableObject.compareTo(value) >= 0)
862
        {
934
        {
863
          if (diagnostics != null)
935
          if (diagnostics != null)
864
          {
936
          {
Lines 877-886 Link Here
877
949
878
      if (effectiveMax != null)
950
      if (effectiveMax != null)
879
      {
951
      {
880
        @SuppressWarnings("unchecked") Comparable<Object> comparableObject = (Comparable<Object>)effectiveMax;
952
        @SuppressWarnings("unchecked")
881
        if (effectiveMaxIsInclusive ?
953
        Comparable<Object> comparableObject = (Comparable<Object>)effectiveMax;
882
              comparableObject.compareTo(value) < 0:
954
        if (effectiveMaxIsInclusive ? comparableObject.compareTo(value) < 0 : comparableObject.compareTo(value) <= 0)
883
              comparableObject.compareTo(value) <= 0)
884
        {
955
        {
885
          if (diagnostics != null)
956
          if (diagnostics != null)
886
          {
957
          {
Lines 944-983 Link Here
944
          result = false;
1015
          result = false;
945
        }
1016
        }
946
      }
1017
      }
1018
      
1019
      return result;
1020
    }
1021
1022
    public boolean validate(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
1023
    {
1024
      boolean result = validateDelegatedConstraints(eDataType, value, diagnostics, context);
947
1025
948
      if (itemType != null)
1026
      if (result || diagnostics != null)
949
      {
1027
      {
950
        EValidator rootValidator = getRootEValidator(context);
1028
        result &= validateSchemaConstraints(eDataType, value, diagnostics, context);
951
        for (Iterator<?> i = ((List<?>)value).iterator(); i.hasNext() && (result || diagnostics != null); )
1029
1030
        if (itemType != null)
952
        {
1031
        {
953
          result &= rootValidator.validate(itemType, i.next(), diagnostics, context);
1032
          EValidator rootValidator = getRootEValidator(context);
1033
          for (Iterator< ? > i = ((List< ? >)value).iterator(); i.hasNext() && (result || diagnostics != null);)
1034
          {
1035
            result &= rootValidator.validate(itemType, i.next(), diagnostics, context);
1036
          }
1037
          return result;
1038
        }
1039
        else if (!memberTypes.isEmpty())
1040
        {
1041
          EValidator rootValidator = getRootEValidator(context);
1042
1043
          for (EDataType memberType : memberTypes)
1044
          {
1045
            if (rootValidator.validate(memberType, value, null, context))
1046
            {
1047
              return true;
1048
            }
1049
          }
1050
          for (EDataType memberType : memberTypes)
1051
          {
1052
            if (memberType.isInstance(value))
1053
            {
1054
              return rootValidator.validate(memberType, value, diagnostics, context);
1055
            }
1056
          }
1057
          return false;
1058
        }
1059
        else
1060
        {
1061
          return result;
954
        }
1062
        }
955
        return result;
956
      }
1063
      }
957
      else if (!memberTypes.isEmpty())
1064
1065
      return result;
1066
    }
1067
  }
1068
1069
  public class DynamicEClassValidator
1070
  {
1071
    protected boolean validateDelegatedInvariants(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context)
1072
    {
1073
      boolean result = true;
1074
1075
      EValidator.ValidationDelegate.Registry registry = getValidationDelegateRegistry(context);
1076
      List<String> validationDelegates = EcoreUtil.getValidationDelegates(eClass.getEPackage());
1077
1078
      if (!validationDelegates.isEmpty())
958
      {
1079
      {
959
        EValidator rootValidator = getRootEValidator(context);
1080
        INVARIANTS: for (EOperation eOperation : eClass.getEOperations())
960
        
961
        for (EDataType memberType : memberTypes)
962
        {
1081
        {
963
          if (rootValidator.validate(memberType, value, null, context))
1082
          if (EcoreUtil.isInvariant(eOperation))
964
          {
1083
          {
965
            return true;
1084
            for (String uri : validationDelegates)
1085
            {
1086
              String expression = EcoreUtil.getAnnotation(eOperation, uri, "body");
1087
              if (expression != null)
1088
              {
1089
                EValidator.ValidationDelegate delegate = registry.getValidationDelegate(URI.createURI(uri));
1090
                if (delegate != null)
1091
                {
1092
                  try
1093
                  {
1094
                    if (!delegate.validate(expression, eOperation, eClass, eObject, context))
1095
                    {
1096
                      result &= false;
1097
                      if (diagnostics != null)
1098
                      {
1099
                        reportInvariantDelegateViolation(eClass, eObject, diagnostics, context, eOperation);
1100
                      }
1101
                      else
1102
                      {
1103
                        break INVARIANTS;
1104
                      }
1105
                    }
1106
                  }
1107
                  catch (Throwable throwable)
1108
                  {
1109
                    result &= false;
1110
                    if (diagnostics != null)
1111
                    {
1112
                      reportInvariantDelegateException(eClass, eObject, diagnostics, context, eOperation, throwable);
1113
                    }
1114
                    else
1115
                    {
1116
                      break INVARIANTS;
1117
                    }
1118
                  }
1119
                }
1120
                break;
1121
              }
1122
            }
966
          }
1123
          }
967
        }
1124
        }
968
        for (EDataType memberType : memberTypes)
1125
      }
1126
1127
      return result;
1128
    }
1129
    
1130
    protected boolean validateDelegatedConstraints(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context)
1131
    {
1132
      boolean result = true;
1133
1134
      EValidator.ValidationDelegate.Registry registry = getValidationDelegateRegistry(context);
1135
      List<String> validationDelegates = EcoreUtil.getValidationDelegates(eClass.getEPackage());
1136
1137
      if (!validationDelegates.isEmpty())
1138
      {
1139
        CONSTRAINTS: for (String constraint : EcoreUtil.getConstraints(eClass))
969
        {
1140
        {
970
          if (memberType.isInstance(value))
1141
          for (String uri : validationDelegates)
971
          {
1142
          {
972
            return rootValidator.validate(memberType, value, diagnostics, context);
1143
            String expression = EcoreUtil.getAnnotation(eClass, uri, constraint);
1144
            if (expression != null)
1145
            {
1146
              EValidator.ValidationDelegate delegate = registry.getValidationDelegate(URI.createURI(uri));
1147
              if (delegate != null)
1148
              {
1149
                try
1150
                {
1151
                  if (!delegate.validate(expression, constraint, eClass, eObject, context))
1152
                  {
1153
                    result &= false;
1154
                    if (diagnostics != null)
1155
                    {
1156
                      reportConstraintDelegateViolation(eClass, eObject, diagnostics, context, constraint);
1157
                    }
1158
                    else
1159
                    {
1160
                      break CONSTRAINTS;
1161
                    }
1162
                  }
1163
                }
1164
                catch (Throwable throwable)
1165
                {
1166
                  result &= false;
1167
                  if (diagnostics != null)
1168
                  {
1169
                    reportConstraintDelegateException(eClass, eObject, diagnostics, context, constraint, throwable);
1170
                  }
1171
                  else
1172
                  {
1173
                    break CONSTRAINTS;
1174
                  }
1175
                }
1176
              }
1177
              else
1178
              {
1179
                reportConstraintDelegateNotFound(eClass, eObject, diagnostics, context, constraint, uri);
1180
              }
1181
              break;
1182
            }
973
          }
1183
          }
974
        }
1184
        }
975
        return false;
976
      }
1185
      }
977
      else
1186
1187
      return result;
1188
    }
1189
    
1190
    public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context)
1191
    {
1192
      boolean result = validateDelegatedInvariants(eClass, eObject, diagnostics, context);
1193
1194
      if (result || diagnostics != null)
978
      {
1195
      {
979
        return result;
1196
        result &= validateDelegatedConstraints(eClass, eObject, diagnostics, context);
1197
        
1198
        if (result || diagnostics != null)
1199
        {
1200
          List<EClass> eSuperTypes = eClass.getESuperTypes();
1201
          result &= eSuperTypes.isEmpty() ?
1202
            validate_EveryDefaultConstraint(eObject, diagnostics, context) :
1203
            validate(eSuperTypes.get(0), eObject, diagnostics, context);
1204
        }
980
      }
1205
      }
1206
1207
      return result;
981
    }
1208
    }
982
  }
1209
  }
983
1210
Lines 1202-1207 Link Here
1202
         context));
1429
         context));
1203
  }
1430
  }
1204
1431
1432
  protected void reportConstraintDelegateViolation(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint)
1433
  {
1434
    diagnostics.add
1435
      (createDiagnostic
1436
        (Diagnostic.ERROR,
1437
         DIAGNOSTIC_SOURCE,
1438
         0,
1439
         "_UI_GenericConstraint_diagnostic",
1440
         new Object []{ constraint, getValueLabel(eDataType, value, context) },
1441
         new Object []{ value },
1442
         context));
1443
  }
1444
1445
  protected void reportConstraintDelegateException(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, Throwable throwable)
1446
  {
1447
    diagnostics.add
1448
      (createDiagnostic
1449
        (Diagnostic.ERROR,
1450
         DIAGNOSTIC_SOURCE,
1451
         0,
1452
         "_UI_ConstraintDelegateException_diagnostic",
1453
         new Object []{ constraint, getValueLabel(eDataType, value, context), throwable.getLocalizedMessage() },
1454
         new Object []{ value },
1455
         context));
1456
  }
1457
1458
  protected void reportConstraintDelegateNotFound(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, String uri)
1459
  {
1460
    diagnostics.add
1461
      (createDiagnostic
1462
        (Diagnostic.ERROR,
1463
         DIAGNOSTIC_SOURCE,
1464
         0,
1465
         "_UI_ConstraintDelegateNotFound_diagnostic",
1466
         new Object []{ constraint, getValueLabel(eDataType, value, context), uri },
1467
         new Object []{ value },
1468
         context));
1469
  }
1470
1471
  protected void reportConstraintDelegateViolation(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint)
1472
  {
1473
    diagnostics.add
1474
      (createDiagnostic
1475
        (Diagnostic.ERROR,
1476
         DIAGNOSTIC_SOURCE,
1477
         0,
1478
         "_UI_GenericConstraint_diagnostic",
1479
         new Object []{ constraint, getObjectLabel(eObject, context) },
1480
         new Object []{ eObject },
1481
         context));
1482
  }
1483
1484
  protected void reportConstraintDelegateException(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, Throwable throwable)
1485
  {
1486
    diagnostics.add
1487
      (createDiagnostic
1488
        (Diagnostic.ERROR,
1489
         DIAGNOSTIC_SOURCE,
1490
         0,
1491
         "_UI_ConstraintDelegateException_diagnostic",
1492
         new Object []{ constraint, getObjectLabel(eObject, context), throwable.getLocalizedMessage() },
1493
         new Object []{ eObject },
1494
         context));
1495
  }
1496
1497
  protected void reportConstraintDelegateNotFound(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, String uri)
1498
  {
1499
    diagnostics.add
1500
      (createDiagnostic
1501
        (Diagnostic.ERROR,
1502
         DIAGNOSTIC_SOURCE,
1503
         0,
1504
         "_UI_ConstraintDelegateNotFound_diagnostic",
1505
         new Object []{ constraint, getObjectLabel(eObject, context), uri },
1506
         new Object []{ eObject },
1507
         context));
1508
  }
1509
1510
  protected void reportInvariantDelegateViolation(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, EOperation invariant)
1511
  {
1512
    diagnostics.add
1513
      (createDiagnostic
1514
        (Diagnostic.ERROR,
1515
         DIAGNOSTIC_SOURCE,
1516
         0,
1517
         "_UI_GenericInvariant_diagnostic",
1518
         new Object []{ invariant.getName(), getObjectLabel(eObject, context) },
1519
         new Object []{ eObject },
1520
         context));
1521
  }
1522
1523
  protected void reportInvariantDelegateException(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, EOperation invariant, Throwable throwable)
1524
  {
1525
    diagnostics.add
1526
      (createDiagnostic
1527
        (Diagnostic.ERROR,
1528
         DIAGNOSTIC_SOURCE,
1529
         0,
1530
         "_UI_InvariantDelegateException_diagnostic",
1531
         new Object []{ invariant.getName(), getObjectLabel(eObject, context), throwable.getLocalizedMessage() },
1532
         new Object []{ eObject },
1533
         context));
1534
  }
1535
1536
  protected void reportInvariantDelegateNotFound(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, EOperation invariant, String uri)
1537
  {
1538
    diagnostics.add
1539
      (createDiagnostic
1540
        (Diagnostic.ERROR,
1541
         DIAGNOSTIC_SOURCE,
1542
         0,
1543
         "_UI_InvariantDelegateNotFound_diagnostic",
1544
         new Object []{ invariant.getName(), getObjectLabel(eObject, context), uri },
1545
         new Object []{ eObject },
1546
         context));
1547
  }
1548
1205
  protected static Collection<Object> wrapEnumerationValues(Object [] values)
1549
  protected static Collection<Object> wrapEnumerationValues(Object [] values)
1206
  {
1550
  {
1207
    return java.util.Arrays.asList(values);
1551
    return java.util.Arrays.asList(values);
Lines 1470-1475 Link Here
1470
    return EcorePlugin.INSTANCE;
1814
    return EcorePlugin.INSTANCE;
1471
  }
1815
  }
1472
1816
1817
  protected boolean isEcoreString(String key)
1818
  {
1819
    return "_UI_GenericConstraint_diagnostic".equals(key) || "_UI_GenericInvariant_diagnostic".equals(key)
1820
      || "_UI_ConstraintDelegateException_diagnostic".equals(key) || "_UI_InvariantDelegateException_diagnostic".equals(key)
1821
      || "_UI_ConstraintDelegateNotFound_diagnostic".equals(key) || "_UI_InvariantDelegateNotFound_diagnostic".equals(key);
1822
  }
1823
1473
  /**
1824
  /**
1474
   * Returns a translated message with the given substitutions.
1825
   * Returns a translated message with the given substitutions.
1475
   * The {@link #getResourceLocator() resource locator} is used.
1826
   * The {@link #getResourceLocator() resource locator} is used.
Lines 1480-1486 Link Here
1480
   */
1831
   */
1481
  protected String getString(String key, Object [] substitutions)
1832
  protected String getString(String key, Object [] substitutions)
1482
  {
1833
  {
1483
    return getString("_UI_GenericConstraint_diagnostic".equals(key) ? getEcoreResourceLocator() : getResourceLocator(), key, substitutions);
1834
    return getString(isEcoreString(key) ? getEcoreResourceLocator() : getResourceLocator(), key, substitutions);
1484
  }
1835
  }
1485
1836
1486
  /**
1837
  /**
(-)plugin.xml (+1 lines)
Lines 10-15 Link Here
10
   <extension-point id="content_handler" name="%_UI_ContentHandlerRegistry_extensionpoint" schema="schema/content_handler.exsd"/>
10
   <extension-point id="content_handler" name="%_UI_ContentHandlerRegistry_extensionpoint" schema="schema/content_handler.exsd"/>
11
   <extension-point id="uri_mapping" name="%_UI_URIMappingRegistry_extensionpoint" schema="schema/uri_mapping.exsd"/>
11
   <extension-point id="uri_mapping" name="%_UI_URIMappingRegistry_extensionpoint" schema="schema/uri_mapping.exsd"/>
12
   <extension-point id="package_registry_implementation" name="%_UI_PackageRegistryImplementation_extensionpoint" schema="schema/package_registry_implementation.exsd"/>
12
   <extension-point id="package_registry_implementation" name="%_UI_PackageRegistryImplementation_extensionpoint" schema="schema/package_registry_implementation.exsd"/>
13
   <extension-point id="validation_delegate" name="%_UI_ValidationDelegateRegistry_extensionpoint" schema="schema/validation_delegate.exsd"/>
13
14
14
   <extension point="org.eclipse.emf.ecore.generated_package">
15
   <extension point="org.eclipse.emf.ecore.generated_package">
15
      <package
16
      <package
(-)plugin.properties (-1 / +7 lines)
Lines 1-7 Link Here
1
# /**
1
# /**
2
#  * <copyright>
2
#  * <copyright>
3
#  *
3
#  *
4
#  * Copyright (c) 2002-2008 IBM Corporation and others.
4
#  * Copyright (c) 2002-2009 IBM Corporation and others.
5
#  * All rights reserved.   This program and the accompanying materials
5
#  * All rights reserved.   This program and the accompanying materials
6
#  * are made available under the terms of the Eclipse Public License v1.0
6
#  * are made available under the terms of the Eclipse Public License v1.0
7
#  * which accompanies this distribution, and is available at
7
#  * which accompanies this distribution, and is available at
Lines 194-198 Link Here
194
_UI_EClassifierInstanceTypeNameExpectedSpace_diagnostic = Expecting '' '' at index {0}
194
_UI_EClassifierInstanceTypeNameExpectedSpace_diagnostic = Expecting '' '' at index {0}
195
_UI_EClassifierInstanceTypeNameUnexpectedSpace_diagnostic = Unexpected '' '' at index {0}
195
_UI_EClassifierInstanceTypeNameUnexpectedSpace_diagnostic = Unexpected '' '' at index {0}
196
196
197
_UI_InvariantDelegateException_diagnostic = An exception occurred while delegating evaluation of the ''{0}'' invariant on ''{1}'': {2}
198
_UI_InvariantDelegateNotFound_diagnostic = Unable to find delegate to evaluate the ''{0}'' invariant on ''{1}'': {2}
199
200
_UI_ConstraintDelegateException_diagnostic = An exception occurred while delegating evaluation of the ''{0}'' constraint on ''{1}'': {2}
201
_UI_ConstraintDelegateNotFound_diagnostic = Unable to find delegate to evaluate the ''{0}'' constraint on ''{1}'': {2}
202
197
# This is in org.eclipse.emf.ecore.xmi
203
# This is in org.eclipse.emf.ecore.xmi
198
#_UI_Ecore_content_type = Ecore File
204
#_UI_Ecore_content_type = Ecore File
(-)src/org/eclipse/emf/ecore/plugin/EcorePlugin.java (-1 / +3 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2002-2006 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 575-580 Link Here
575
      new ContentParserRegistryReader().readRegistry();
575
      new ContentParserRegistryReader().readRegistry();
576
      new ContentHandlerRegistryReader().readRegistry();
576
      new ContentHandlerRegistryReader().readRegistry();
577
      new URIMappingRegistryReader().readRegistry();
577
      new URIMappingRegistryReader().readRegistry();
578
      new ValidationDelegateRegistryReader().readRegistry();
578
    }
579
    }
579
  }
580
  }
580
581
Lines 631-634 Link Here
631
  public static final String SCHEME_PARSER_PPID = "scheme_parser";
632
  public static final String SCHEME_PARSER_PPID = "scheme_parser";
632
  public static final String URI_MAPPING_PPID = "uri_mapping";
633
  public static final String URI_MAPPING_PPID = "uri_mapping";
633
  public static final String PACKAGE_REGISTRY_IMPLEMENTATION_PPID = "package_registry_implementation";
634
  public static final String PACKAGE_REGISTRY_IMPLEMENTATION_PPID = "package_registry_implementation";
635
  public static final String VALIDATION_DELEGATE_PPID = "validation_delegate";  
634
}
636
}
(-)src/org/eclipse/emf/ecore/EValidator.java (-1 / +58 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2004-2006 IBM Corporation and others.
4
 * Copyright (c) 2004-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 20-25 Link Here
20
import java.util.Map;
20
import java.util.Map;
21
21
22
import org.eclipse.emf.common.util.DiagnosticChain;
22
import org.eclipse.emf.common.util.DiagnosticChain;
23
import org.eclipse.emf.common.util.URI;
23
24
24
25
25
/**
26
/**
Lines 117-122 Link Here
117
  }
118
  }
118
119
119
  /**
120
  /**
121
   * An interface for delegating validation expression evaluation.
122
   * @since 2.6
123
   */
124
  interface ValidationDelegate
125
  {
126
    /**
127
     * A <code>ValidationDelegate</code> wrapper that is used by the {@link ValidationDelegate.Registry}.
128
     */
129
    public interface Descriptor
130
    {
131
      /**
132
       * Returns the validation delegate.
133
       * @return the validation delegate.
134
       */
135
      ValidationDelegate getValidationDelegate();
136
    }
137
138
    /**
139
     * A map from {@link org.eclipse.emf.common.util.URI URI} to {@link ValidationDelegate}.
140
     */
141
    interface Registry extends Map<URI, Object>
142
    {
143
      /**
144
       * Looks up the validation delegate in the map.
145
       */
146
      ValidationDelegate getValidationDelegate(URI uri);
147
148
      /**
149
       * The global instance of a validation delegate registry.
150
       */
151
      Registry INSTANCE = new org.eclipse.emf.ecore.impl.ValidationDelegateRegistryImpl();
152
    }
153
154
    /**
155
     * Evaluates the given validation expression for the invariant against the object in the given context.
156
     * @param context a place to cache information, if it's <code>null</code>, no cache is supported.
157
     * @return the result of the expression evaluation.
158
     */
159
    boolean validate(String expression, EOperation invariant, EClass eClass, EObject eObject, Map<Object, Object> context);
160
161
    /**
162
     * Evaluates the given validation expression for the constraint against the object in the given context.
163
     * @param context a place to cache information, if it's <code>null</code>, no cache is supported.
164
     * @return the result of the expression evaluation.
165
     */
166
    boolean validate(String expression, String constraint, EClass eClass, EObject eObject, Map<Object, Object> context);
167
168
    /**
169
     * Evaluates the given validation expression for the constraint against the value in the given context.
170
     * @param context a place to cache information, if it's <code>null</code>, no cache is supported.
171
     * @return the result of the expression evaluation.
172
     */
173
    boolean validate(String expression, String constraint, EDataType eDataType, Object value, Map<Object, Object> context);
174
  }
175
176
  /**
120
   * Validates the object in the given context, optionally producing diagnostics.
177
   * Validates the object in the given context, optionally producing diagnostics.
121
   * @param diagnostics a place to accumulate diagnostics; if it's <code>null</code>, no diagnostics should be produced.
178
   * @param diagnostics a place to accumulate diagnostics; if it's <code>null</code>, no diagnostics should be produced.
122
   * @param context a place to cache information, if it's <code>null</code>, no cache is supported.
179
   * @param context a place to cache information, if it's <code>null</code>, no cache is supported.
(-)src/org/eclipse/emf/ecore/plugin/ValidationDelegateRegistryReader.java (+94 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 *
4
 * Copyright (c) 2009 Kenn Hussey and others.
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
8
 * http://www.eclipse.org/legal/epl-v10.html
9
 * 
10
 * Contributors: 
11
 *   Kenn Hussey - Initial API and implementation
12
 *
13
 * </copyright>
14
 *
15
 * $Id$
16
 */
17
package org.eclipse.emf.ecore.plugin;
18
19
import org.eclipse.core.runtime.IConfigurationElement;
20
import org.eclipse.core.runtime.Platform;
21
22
import org.eclipse.emf.common.util.URI;
23
import org.eclipse.emf.ecore.EValidator;
24
25
26
/**
27
 * A plugin extension reader that populates the
28
 * {@link org.eclipse.emf.ecore.EValidator.ValidationDelegate.Registry#INSTANCE global} validation delegate registry.
29
 * Clients are not expected to use this class directly.
30
 */
31
class ValidationDelegateRegistryReader extends RegistryReader
32
{
33
  static class ValidationDelegateDescriptor extends PluginClassDescriptor implements EValidator.ValidationDelegate.Descriptor
34
  {
35
    protected EValidator.ValidationDelegate validationDelegate;
36
37
    public ValidationDelegateDescriptor(IConfigurationElement e, String attrName)
38
    {
39
      super(e, attrName);
40
    }
41
42
    public EValidator.ValidationDelegate getValidationDelegate()
43
    {
44
      if (validationDelegate == null)
45
      {
46
        validationDelegate = (EValidator.ValidationDelegate)createInstance();
47
      }
48
      return validationDelegate;
49
    }
50
  }
51
52
  static final String TAG_DELEGATE = "delegate";
53
  static final String ATT_URI = "uri";
54
  static final String ATT_CLASS = "class";
55
56
  public ValidationDelegateRegistryReader()
57
  {
58
    super(Platform.getExtensionRegistry(), EcorePlugin.getPlugin().getBundle().getSymbolicName(), EcorePlugin.VALIDATION_DELEGATE_PPID);
59
  }
60
61
  @Override
62
  protected boolean readElement(IConfigurationElement element, boolean add)
63
  {
64
    if (element.getName().equals(TAG_DELEGATE))
65
    {
66
      String uri = element.getAttribute(ATT_URI);
67
      if (uri == null)
68
      {
69
        logMissingAttribute(element, ATT_URI);
70
      }
71
      else if (element.getAttribute(ATT_CLASS) == null)
72
      {
73
        logMissingAttribute(element, ATT_CLASS);
74
      }
75
      else if (add)
76
      {
77
        Object previous = EValidator.ValidationDelegate.Registry.INSTANCE.put(URI.createURI(uri), new ValidationDelegateDescriptor(element, ATT_CLASS));
78
        if (previous instanceof ValidationDelegateDescriptor)
79
        {
80
          ValidationDelegateDescriptor descriptor = (ValidationDelegateDescriptor)previous;
81
          EcorePlugin.INSTANCE.log("Both '" + descriptor.element.getContributor().getName() + "' and '" + element.getContributor().getName() + "' register a validation delegate for '" + uri + "'");
82
        }
83
        return true;
84
      }
85
      else
86
      {
87
        EValidator.ValidationDelegate.Registry.INSTANCE.remove(uri);
88
        return true;
89
      }
90
    }
91
92
    return false;
93
  }
94
}
(-)src/org/eclipse/emf/ecore/impl/ValidationDelegateRegistryImpl.java (+85 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 *
4
 * Copyright (c) 2009 Kenn Hussey and others.
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
8
 * http://www.eclipse.org/legal/epl-v10.html
9
 * 
10
 * Contributors: 
11
 *   Kenn Hussey - Initial API and implementation
12
 *
13
 * </copyright>
14
 *
15
 * $Ids$
16
 */
17
package org.eclipse.emf.ecore.impl;
18
19
import java.util.HashMap;
20
21
import org.eclipse.emf.common.util.URI;
22
import org.eclipse.emf.ecore.EValidator;
23
24
25
/**
26
 * An implementation of a validation delegate registry.
27
 */
28
public class ValidationDelegateRegistryImpl extends HashMap<URI, Object> implements EValidator.ValidationDelegate.Registry
29
{
30
  private static final long serialVersionUID = 1L;
31
32
  protected EValidator.ValidationDelegate.Registry delegateRegistry;
33
34
  public ValidationDelegateRegistryImpl()
35
  {
36
    super();
37
  }
38
39
  public ValidationDelegateRegistryImpl(EValidator.ValidationDelegate.Registry delegateRegistry)
40
  {
41
    this.delegateRegistry = delegateRegistry;
42
  }
43
44
  @Override
45
  public Object get(Object key)
46
  {
47
    Object validationDelegate = super.get(key);
48
    if (validationDelegate instanceof EValidator.ValidationDelegate.Descriptor)
49
    {
50
      EValidator.ValidationDelegate.Descriptor validationDelegateDescriptor = (EValidator.ValidationDelegate.Descriptor)validationDelegate;
51
      validationDelegate = validationDelegateDescriptor.getValidationDelegate();
52
      put((URI)key, validationDelegate);
53
      return validationDelegate;
54
    }
55
    else if (validationDelegate != null)
56
    {
57
      return validationDelegate;
58
    }
59
    else
60
    {
61
      return delegatedGet(key);
62
    }
63
  }
64
65
  public EValidator.ValidationDelegate getValidationDelegate(URI uri)
66
  {
67
    return (EValidator.ValidationDelegate)get(uri);
68
  }
69
70
  protected Object delegatedGet(Object key)
71
  {
72
    if (delegateRegistry != null)
73
    {
74
      return delegateRegistry.get(key);
75
    }
76
77
    return null;
78
  }
79
80
  @Override
81
  public boolean containsKey(Object key)
82
  {
83
    return super.containsKey(key) || delegateRegistry != null && delegateRegistry.containsKey(key);
84
  }
85
}
(-)schema/validation_delegate.exsd (+124 lines)
Added Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.emf.ecore" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
5
      <appInfo>
6
         <meta.schema plugin="org.eclipse.emf.ecore" id="validation_delegate" name="Validation Delegate Registry"/>
7
      </appInfo>
8
      <documentation>
9
         This extension point is used to define a validation delegate that evaluates expressions whose type is identified by a URI. The global EMF validation delegate registry, &lt;samp&gt;EValidator.ValidationDelegate.Factory.Registry.INSTANCE&lt;/samp&gt;, is used to record the registration.
10
      </documentation>
11
   </annotation>
12
13
   <element name="extension">
14
      <annotation>
15
         <appInfo>
16
            <meta.element />
17
         </appInfo>
18
      </annotation>
19
      <complexType>
20
         <sequence>
21
            <element ref="delegate" minOccurs="1" maxOccurs="unbounded"/>
22
         </sequence>
23
         <attribute name="point" type="string" use="required">
24
            <annotation>
25
               <documentation>
26
                  A fully qualified identifier of the target extension point.
27
               </documentation>
28
            </annotation>
29
         </attribute>
30
         <attribute name="id" type="string">
31
            <annotation>
32
               <documentation>
33
                  An optional identifier of the extension instance.
34
               </documentation>
35
            </annotation>
36
         </attribute>
37
         <attribute name="name" type="string">
38
            <annotation>
39
               <documentation>
40
                  An optional name of the extension instance.
41
               </documentation>
42
            </annotation>
43
         </attribute>
44
      </complexType>
45
   </element>
46
47
   <element name="delegate">
48
      <annotation>
49
         <appInfo>
50
            <meta.element labelAttribute="uri"/>
51
         </appInfo>
52
      </annotation>
53
      <complexType>
54
         <attribute name="uri" type="string" use="required">
55
            <annotation>
56
               <documentation>
57
                  A URI identifying the type of expressions that can be evaluated by the validation delegate.
58
               </documentation>
59
            </annotation>
60
         </attribute>
61
         <attribute name="class" type="string" use="required">
62
            <annotation>
63
               <documentation>
64
                  The fully qualified name of a Java class implementing &lt;samp&gt;org.eclipse.emf.ecore.EValidator.ValidationDelegate&lt;/samp&gt;.
65
               </documentation>
66
               <appInfo>
67
                  <meta.attribute kind="java" basedOn="org.eclipse.emf.ecore.EValidator.ValidationDelegate"/>
68
               </appInfo>
69
            </annotation>
70
         </attribute>
71
      </complexType>
72
   </element>
73
74
   <annotation>
75
      <appInfo>
76
         <meta.section type="since"/>
77
      </appInfo>
78
      <documentation>
79
         2.6.0
80
      </documentation>
81
   </annotation>
82
83
   <annotation>
84
      <appInfo>
85
         <meta.section type="examples"/>
86
      </appInfo>
87
      <documentation>
88
         Following is an example of how a validation delegate can be registered: 
89
&lt;pre&gt;
90
  &lt;extension point=&quot;org.eclipse.emf.ecore.validation_delegate&quot; &gt;
91
    &lt;delegate uri=&quot;http://www.eclipse.org/ocl/3.0/OCL&quot; class=&quot;org.eclipse.ocl.OCLValidationDelegate&quot;/&gt; 
92
  &lt;/extension&gt;
93
&lt;/pre&gt;
94
      </documentation>
95
   </annotation>
96
97
   <annotation>
98
      <appInfo>
99
         <meta.section type="apiInfo"/>
100
      </appInfo>
101
      <documentation>
102
         The value of the class attribute must represent a class that implements &lt;samp&gt;org.eclipse.emf.ecore.EValidator.ValidationDelegate&lt;/samp&gt; and has a no argument contructor.
103
&lt;p&gt;
104
A validation delegate can be also registered from the source code with the &lt;samp&gt;EValidator.ValidationDelegate.Registry.INSTANCE&lt;/samp&gt; as follows:
105
&lt;/p&gt;
106
&lt;pre&gt;
107
  EValidator.ValidationDelegate.Registry.INSTANCE.put(URI.createURI(&quot;http://www.eclipse.org/ocl/3.0/OCL&quot;), new OCLValidationDelegate());
108
&lt;/pre&gt;
109
      </documentation>
110
   </annotation>
111
112
113
   <annotation>
114
      <appInfo>
115
         <meta.section type="copyright"/>
116
      </appInfo>
117
      <documentation>
118
         Copyright (c) 2009 Kenn Hussey and others.&lt;br&gt;
119
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 &lt;a 
120
href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
121
      </documentation>
122
   </annotation>
123
124
</schema>
(-)src/org/eclipse/emf/codegen/util/CodeGenUtil.java (-1 / +17 lines)
Lines 1-7 Link Here
1
/**
1
/**
2
 * <copyright>
2
 * <copyright>
3
 *
3
 *
4
 * Copyright (c) 2002-2007 IBM Corporation and others.
4
 * Copyright (c) 2002-2009 IBM Corporation and others.
5
 * All rights reserved.   This program and the accompanying materials
5
 * All rights reserved.   This program and the accompanying materials
6
 * are made available under the terms of the Eclipse Public License v1.0
6
 * are made available under the terms of the Eclipse Public License v1.0
7
 * which accompanies this distribution, and is available at
7
 * which accompanies this distribution, and is available at
Lines 477-482 Link Here
477
  }
477
  }
478
478
479
  /**
479
  /**
480
   * @since 2.6
481
   */
482
  public static String upperName(String name, Locale locale)
483
  {
484
    return format(name, '_', null, false, true).toUpperCase(locale);
485
  }
486
487
  /**
488
   * @since 2.6
489
   */
490
  public static String upperName(String name)
491
  {
492
    return upperName(name, Locale.getDefault());
493
  }
494
495
  /**
480
   * @deprecated In 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
496
   * @deprecated In 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
481
   */
497
   */
482
  @Deprecated
498
  @Deprecated

Return to bug 255786