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 / +121 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")%>.Registry registry = getValidationDelegateRegistry(<%=context%>);
497
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%> delegate = registry.getValidationDelegate(<%=genModel.getImportedName("org.eclipse.emf.common.util.URI")%>.createURI("<%=genClassifier.getValidationDelegate(constraint)%>"));<%=genModel.getNonNLS()%>
498
		if (delegate != null) {
499
			try {
500
				if (!delegate.validate(<%=genClassifier.getClassifierID()%>__<%=CodeGenUtil.upperName(constraint)%>__EXP, <%=genClassifier.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>)) {
501
					if (diagnostics != null) {
502
						<%=diagnostics%>.add
503
							(createDiagnostic
504
								(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
505
								 DIAGNOSTIC_SOURCE,
506
								 0,
507
								 "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
508
								 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
509
								 new Object[] { <%=genClassifier.getSafeUncapName()%> },
510
								 context));
511
					}
512
					return false;
513
				}
514
				return true;
515
			} catch (<%=genModel.getImportedName("java.lang.Throwable")%> throwable) {
516
				if (diagnostics != null) {
517
					<%=diagnostics%>.add
518
						(createDiagnostic
519
							(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
520
							 DIAGNOSTIC_SOURCE,
521
							 0,
522
							 "_UI_ConstraintDelegateException_diagnostic",<%=genModel.getNonNLS()%>
523
							 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>), throwable.getLocalizedMessage() },<%=genModel.getNonNLS()%>
524
							 new Object[] { <%=genClassifier.getSafeUncapName()%> },
525
							 context));
526
				}
527
				return false;
528
			}
529
		} else {
530
			if (diagnostics != null) {
531
				<%=diagnostics%>.add
532
					(createDiagnostic
533
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
534
						 DIAGNOSTIC_SOURCE,
535
						 0,
536
						 "_UI_ConstraintDelegateNotFound_diagnostic",<%=genModel.getNonNLS()%>
537
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>), "<%=genClassifier.getValidationDelegate(constraint)%>" },<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
538
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
539
						 context));
540
			}
541
			return false;
542
		}
543
  <%} else {%>
484
		// TODO implement the constraint
544
		// TODO implement the constraint
485
		// -> specify the condition that violates the constraint
545
		// -> specify the condition that violates the constraint
486
		// -> verify the diagnostic details, including severity, code, and message
546
		// -> verify the diagnostic details, including severity, code, and message
Lines 490-496 Link Here
490
			if (<%=diagnostics%> != null)
550
			if (<%=diagnostics%> != null)
491
			{
551
			{
492
				<%=diagnostics%>.add
552
				<%=diagnostics%>.add
493
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
553
    <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
494
					(createDiagnostic
554
					(createDiagnostic
495
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
555
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
496
						 DIAGNOSTIC_SOURCE,
556
						 DIAGNOSTIC_SOURCE,
Lines 499-516 Link Here
499
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
559
						 new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
500
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
560
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
501
						 context));
561
						 context));
502
<%} else {%>
562
    <%} else {%>
503
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
563
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
504
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
564
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
505
						 DIAGNOSTIC_SOURCE,
565
						 DIAGNOSTIC_SOURCE,
506
						 0,
566
						 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)%>
567
						 <%=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()%> }));
568
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
509
<%}%>
569
    <%}%>
510
			}
570
			}
511
			return false;
571
			return false;
512
		}
572
		}
513
		return true;
573
		return true;
574
  <%}%>
514
<%}%>
575
<%}%>
515
<%} else if (constraintDelegate != null) {%>
576
<%} else if (constraintDelegate != null) {%>
516
		// TODO override the constraint, if desired
577
		// TODO override the constraint, if desired
Lines 523-529 Link Here
523
			if (<%=diagnostics%> != null)
584
			if (<%=diagnostics%> != null)
524
			{
585
			{
525
				<%=diagnostics%>.add
586
				<%=diagnostics%>.add
526
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
587
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
527
					(createDiagnostic
588
					(createDiagnostic
528
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
589
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
529
						 DIAGNOSTIC_SOURCE,
590
						 DIAGNOSTIC_SOURCE,
Lines 532-545 Link Here
532
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
593
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
533
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
594
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
534
						 context));
595
						 context));
535
<%} else {%>
596
  <%} else {%>
536
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
597
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
537
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
598
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
538
						 DIAGNOSTIC_SOURCE,
599
						 DIAGNOSTIC_SOURCE,
539
						 0,
600
						 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)%>
601
						 <%=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()%> }));
602
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
542
<%}%>
603
  <%}%>
543
			}
604
			}
544
			return false;
605
			return false;
545
		}
606
		}
Lines 547-552 Link Here
547
<%} else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {%>
608
<%} else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {%>
548
		return <%=genClassifier.getSafeUncapName()%>.<%=constraint%>(<%=diagnostics%>, <%=context%>);
609
		return <%=genClassifier.getSafeUncapName()%>.<%=constraint%>(<%=diagnostics%>, <%=context%>);
549
<%} else {%>
610
<%} else {%>
611
  <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {%>
612
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%>.Registry registry = getValidationDelegateRegistry(<%=context%>);
613
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate")%> delegate = registry.getValidationDelegate(<%=genModel.getImportedName("org.eclipse.emf.common.util.URI")%>.createURI("<%=genClassifier.getValidationDelegate(constraint)%>"));<%=genModel.getNonNLS()%>
614
		if (delegate != null) {
615
			try {
616
				if (!delegate.validate(<%=genClassifier.getClassifierID()%>__<%=CodeGenUtil.upperName(constraint)%>__EXP, <%=genClassifier.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>)) {
617
					if (diagnostics != null) {
618
						<%=diagnostics%>.add
619
							(createDiagnostic
620
								(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
621
								 DIAGNOSTIC_SOURCE,
622
								 0,
623
								 "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
624
								 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
625
								 new Object[] { <%=genClassifier.getSafeUncapName()%> },
626
								 context));
627
					}
628
					return false;
629
				}
630
				return true;
631
			} catch (<%=genModel.getImportedName("java.lang.Throwable")%> throwable) {
632
				if (diagnostics != null) {
633
					<%=diagnostics%>.add
634
						(createDiagnostic
635
							(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
636
							 DIAGNOSTIC_SOURCE,
637
							 0,
638
							 "_UI_ConstraintDelegateException_diagnostic",<%=genModel.getNonNLS()%>
639
							 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>), throwable.getLocalizedMessage() },<%=genModel.getNonNLS()%>
640
							 new Object[] { <%=genClassifier.getSafeUncapName()%> },
641
							 context));
642
				}
643
				return false;
644
			}
645
		} else {
646
			if (diagnostics != null) {
647
				<%=diagnostics%>.add
648
					(createDiagnostic
649
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
650
						 DIAGNOSTIC_SOURCE,
651
						 0,
652
						 "_UI_ConstraintDelegateNotFound_diagnostic",<%=genModel.getNonNLS()%>
653
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>), "<%=genClassifier.getValidationDelegate(constraint)%>" },<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
654
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
655
						 context));
656
			}
657
			return false;
658
		}
659
  <%} else {%>
550
		// TODO implement the constraint
660
		// TODO implement the constraint
551
		// -> specify the condition that violates the constraint
661
		// -> specify the condition that violates the constraint
552
		// -> verify the diagnostic details, including severity, code, and message
662
		// -> verify the diagnostic details, including severity, code, and message
Lines 556-562 Link Here
556
			if (<%=diagnostics%> != null)
666
			if (<%=diagnostics%> != null)
557
			{
667
			{
558
				<%=diagnostics%>.add
668
				<%=diagnostics%>.add
559
<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
669
    <%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
560
					(createDiagnostic
670
					(createDiagnostic
561
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
671
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
562
						 DIAGNOSTIC_SOURCE,
672
						 DIAGNOSTIC_SOURCE,
Lines 565-582 Link Here
565
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
675
						 new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
566
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
676
						 new Object[] { <%=genClassifier.getSafeUncapName()%> },
567
						 context));
677
						 context));
568
<%} else {%>
678
    <%} else {%>
569
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
679
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
570
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
680
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
571
						 DIAGNOSTIC_SOURCE,
681
						 DIAGNOSTIC_SOURCE,
572
						 0,
682
						 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)%>
683
						 <%=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()%> }));
684
						 new Object[] { <%=genClassifier.getSafeUncapName()%> }));
575
<%}%>
685
    <%}%>
576
			}
686
			}
577
			return false;
687
			return false;
578
		}
688
		}
579
		return true;
689
		return true;
690
  <%}%>
580
<%}}%>
691
<%}}%>
581
	}
692
	}
582
693
(-)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, <%=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 / +1118 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 = ", this, ";
1172
  protected final String TEXT_1155 = ":";
1173
  protected final String TEXT_1155 = ")) {" + NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
1173
  protected final String TEXT_1156 = NL + "\t\t\t\treturn ((";
1174
  protected final String TEXT_1156 = ".add" + NL + "\t\t\t\t\t\t\t(new ";
1174
  protected final String TEXT_1157 = "(";
1175
  protected final String TEXT_1157 = NL + "\t\t\t\t\t\t\t\t(";
1175
  protected final String TEXT_1158 = ".InternalMapView";
1176
  protected final String TEXT_1158 = ".ERROR," + NL + "\t\t\t\t\t\t\t\t ";
1176
  protected final String TEXT_1159 = ")";
1177
  protected final String TEXT_1159 = ".DIAGNOSTIC_SOURCE," + 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 = ".";
1178
  protected final String TEXT_1161 = NL + "\t\t\t\treturn (";
1179
  protected final String TEXT_1161 = "," + NL + "\t\t\t\t\t\t\t\t ";
1179
  protected final String TEXT_1162 = "()).basicAdd(otherEnd, msgs);";
1180
  protected final String TEXT_1162 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
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 = "\", ";
1181
  protected final String TEXT_1164 = NL + "\t\t\t\treturn basicSet";
1182
  protected final String TEXT_1164 = ".getObjectLabel(this, ";
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 = 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 (";
1184
  protected final String TEXT_1167 = NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, ";
1185
  protected final String TEXT_1167 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
1185
  protected final String TEXT_1168 = ", msgs);";
1186
  protected final String TEXT_1168 = ".add" + NL + "\t\t\t\t\t\t(new ";
1186
  protected final String TEXT_1169 = NL + "\t\t\t\t";
1187
  protected final String TEXT_1169 = NL + "\t\t\t\t\t\t\t(";
1187
  protected final String TEXT_1170 = " ";
1188
  protected final String TEXT_1170 = ".ERROR," + NL + "\t\t\t\t\t\t\t ";
1188
  protected final String TEXT_1171 = " = (";
1189
  protected final String TEXT_1171 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t\t ";
1189
  protected final String TEXT_1172 = ")eVirtualGet(";
1190
  protected final String TEXT_1172 = ".";
1190
  protected final String TEXT_1173 = ");";
1191
  protected final String TEXT_1173 = "," + 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 = ".INSTANCE.getString(\"_UI_InvariantDelegateException_diagnostic\", new Object[] { \"";
1192
  protected final String TEXT_1175 = " ";
1193
  protected final String TEXT_1175 = "\", ";
1193
  protected final String TEXT_1176 = " = ";
1194
  protected final String TEXT_1176 = ".getObjectLabel(this, ";
1194
  protected final String TEXT_1177 = "basicGet";
1195
  protected final String TEXT_1177 = "), throwable.getLocalizedMessage() }),";
1195
  protected final String TEXT_1178 = "();";
1196
  protected final String TEXT_1178 = 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";
1196
  protected final String TEXT_1179 = NL + "\t\t\t\tif (";
1197
  protected final String TEXT_1179 = ".add" + NL + "\t\t\t\t\t(new ";
1197
  protected final String TEXT_1180 = " != null)";
1198
  protected final String TEXT_1180 = NL + "\t\t\t\t\t\t(";
1198
  protected final String TEXT_1181 = NL + "\t\t\t\t\tmsgs = ((";
1199
  protected final String TEXT_1181 = ".ERROR," + NL + "\t\t\t\t\t\t ";
1199
  protected final String TEXT_1182 = ")";
1200
  protected final String TEXT_1182 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t ";
1200
  protected final String TEXT_1183 = ").eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
1201
  protected final String TEXT_1183 = ".";
1201
  protected final String TEXT_1184 = ", null, msgs);";
1202
  protected final String TEXT_1184 = "," + 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 = ".INSTANCE.getString(\"_UI_InvariantDelegateNotFound_diagnostic\", new Object[] { \"";
1203
  protected final String TEXT_1186 = ")";
1204
  protected final String TEXT_1186 = "\", ";
1204
  protected final String TEXT_1187 = ").eInverseRemove(this, ";
1205
  protected final String TEXT_1187 = ".getObjectLabel(this, ";
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 = "\" }),";
1207
  protected final String TEXT_1190 = NL + "\t\t\t\treturn basicSet";
1208
  protected final String TEXT_1190 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
1208
  protected final String TEXT_1191 = "((";
1209
  protected final String TEXT_1191 = 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 (";
1209
  protected final String TEXT_1192 = ")otherEnd, msgs);";
1210
  protected final String TEXT_1192 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
1210
  protected final String TEXT_1193 = NL + "\t\t}";
1211
  protected final String TEXT_1193 = ".add" + NL + "\t\t\t\t\t(new ";
1211
  protected final String TEXT_1194 = NL + "\t\treturn super.eInverseAdd(otherEnd, featureID, msgs);";
1212
  protected final String TEXT_1194 = NL + "\t\t\t\t\t\t(";
1212
  protected final String TEXT_1195 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, featureID, msgs);";
1213
  protected final String TEXT_1195 = ".ERROR," + NL + "\t\t\t\t\t\t ";
1213
  protected final String TEXT_1196 = NL + "\t}" + NL;
1214
  protected final String TEXT_1196 = ".DIAGNOSTIC_SOURCE," + 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 = ".";
1215
  protected final String TEXT_1198 = NL + "\t@Override";
1216
  protected final String TEXT_1198 = "," + NL + "\t\t\t\t\t\t ";
1216
  protected final String TEXT_1199 = NL + "\tpublic ";
1217
  protected final String TEXT_1199 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
1217
  protected final String TEXT_1200 = " eInverseRemove(";
1218
  protected final String TEXT_1200 = "\", ";
1218
  protected final String TEXT_1201 = " otherEnd, int featureID, ";
1219
  protected final String TEXT_1201 = ".getObjectLabel(this, ";
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 = 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;";
1221
  protected final String TEXT_1204 = NL + "\t\t\tcase ";
1222
  protected final String TEXT_1204 = 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();";
1222
  protected final String TEXT_1205 = ":";
1223
  protected final String TEXT_1205 = NL + "\t}" + NL;
1223
  protected final String TEXT_1206 = NL + "\t\t\t\treturn ((";
1224
  protected final String TEXT_1206 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1224
  protected final String TEXT_1207 = ")((";
1225
  protected final String TEXT_1207 = NL + "\t@SuppressWarnings(\"unchecked\")";
1225
  protected final String TEXT_1208 = ".InternalMapView";
1226
  protected final String TEXT_1208 = NL + "\t@Override";
1226
  protected final String TEXT_1209 = ")";
1227
  protected final String TEXT_1209 = NL + "\tpublic ";
1227
  protected final String TEXT_1210 = "()).eMap()).basicRemove(otherEnd, msgs);";
1228
  protected final String TEXT_1210 = " eInverseAdd(";
1228
  protected final String TEXT_1211 = NL + "\t\t\t\treturn ((";
1229
  protected final String TEXT_1211 = " otherEnd, int featureID, ";
1229
  protected final String TEXT_1212 = ")((";
1230
  protected final String TEXT_1212 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1230
  protected final String TEXT_1213 = ".Internal.Wrapper)";
1231
  protected final String TEXT_1213 = ")" + NL + "\t\t{";
1231
  protected final String TEXT_1214 = "()).featureMap()).basicRemove(otherEnd, msgs);";
1232
  protected final String TEXT_1214 = NL + "\t\t\tcase ";
1232
  protected final String TEXT_1215 = NL + "\t\t\t\treturn ((";
1233
  protected final String TEXT_1215 = ":";
1233
  protected final String TEXT_1216 = ")";
1234
  protected final String TEXT_1216 = NL + "\t\t\t\treturn ((";
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 = ".InternalMapView";
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 = "()).eMap()).basicAdd(otherEnd, msgs);";
1238
  protected final String TEXT_1221 = "(msgs);";
1239
  protected final String TEXT_1221 = NL + "\t\t\t\treturn (";
1239
  protected final String TEXT_1222 = NL + "\t\t\t\treturn basicSet";
1240
  protected final String TEXT_1222 = "()).basicAdd(otherEnd, msgs);";
1240
  protected final String TEXT_1223 = "(null, msgs);";
1241
  protected final String TEXT_1223 = NL + "\t\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\t\tmsgs = eBasicRemoveFromContainer(msgs);";
1241
  protected final String TEXT_1224 = NL + "\t\t}";
1242
  protected final String TEXT_1224 = NL + "\t\t\t\treturn basicSet";
1242
  protected final String TEXT_1225 = NL + "\t\treturn super.eInverseRemove(otherEnd, featureID, msgs);";
1243
  protected final String TEXT_1225 = "((";
1243
  protected final String TEXT_1226 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, featureID, msgs);";
1244
  protected final String TEXT_1226 = ")otherEnd, msgs);";
1244
  protected final String TEXT_1227 = NL + "\t}" + NL;
1245
  protected final String TEXT_1227 = NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, ";
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 = ", msgs);";
1246
  protected final String TEXT_1229 = NL + "\t@Override";
1247
  protected final String TEXT_1229 = NL + "\t\t\t\t";
1247
  protected final String TEXT_1230 = NL + "\tpublic ";
1248
  protected final String TEXT_1230 = " ";
1248
  protected final String TEXT_1231 = " eBasicRemoveFromContainerFeature(";
1249
  protected final String TEXT_1231 = " = (";
1249
  protected final String TEXT_1232 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID()";
1250
  protected final String TEXT_1232 = ")eVirtualGet(";
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 = NL + "\t\t\t\t";
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 = " = ";
1254
  protected final String TEXT_1237 = ".class, msgs);";
1255
  protected final String TEXT_1237 = "basicGet";
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 = NL + "\t\t\t\tif (";
1257
  protected final String TEXT_1240 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(msgs);";
1258
  protected final String TEXT_1240 = " != null)";
1258
  protected final String TEXT_1241 = NL + "\t}" + NL;
1259
  protected final String TEXT_1241 = NL + "\t\t\t\t\tmsgs = ((";
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 = ")";
1260
  protected final String TEXT_1243 = NL + "\t@Override";
1261
  protected final String TEXT_1243 = ").eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
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 = ", null, msgs);";
1262
  protected final String TEXT_1245 = ")" + NL + "\t\t{";
1263
  protected final String TEXT_1245 = NL + "\t\t\t\t\tmsgs = ((";
1263
  protected final String TEXT_1246 = NL + "\t\t\tcase ";
1264
  protected final String TEXT_1246 = ")";
1264
  protected final String TEXT_1247 = ":";
1265
  protected final String TEXT_1247 = ").eInverseRemove(this, ";
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 = ".class, msgs);";
1267
  protected final String TEXT_1250 = NL + "\t\t\t\treturn ";
1268
  protected final String TEXT_1250 = NL + "\t\t\t\treturn basicSet";
1268
  protected final String TEXT_1251 = "() ? Boolean.TRUE : Boolean.FALSE;";
1269
  protected final String TEXT_1251 = "((";
1269
  protected final String TEXT_1252 = NL + "\t\t\t\treturn new ";
1270
  protected final String TEXT_1252 = ")otherEnd, msgs);";
1270
  protected final String TEXT_1253 = "(";
1271
  protected final String TEXT_1253 = NL + "\t\t}";
1271
  protected final String TEXT_1254 = "());";
1272
  protected final String TEXT_1254 = NL + "\t\treturn super.eInverseAdd(otherEnd, featureID, msgs);";
1272
  protected final String TEXT_1255 = NL + "\t\t\t\tif (resolve) return ";
1273
  protected final String TEXT_1255 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, featureID, msgs);";
1273
  protected final String TEXT_1256 = "();" + NL + "\t\t\t\treturn basicGet";
1274
  protected final String TEXT_1256 = NL + "\t}" + NL;
1274
  protected final String TEXT_1257 = "();";
1275
  protected final String TEXT_1257 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1275
  protected final String TEXT_1258 = NL + "\t\t\t\tif (coreType) return ((";
1276
  protected final String TEXT_1258 = NL + "\t@Override";
1276
  protected final String TEXT_1259 = ".InternalMapView";
1277
  protected final String TEXT_1259 = NL + "\tpublic ";
1277
  protected final String TEXT_1260 = ")";
1278
  protected final String TEXT_1260 = " eInverseRemove(";
1278
  protected final String TEXT_1261 = "()).eMap();" + NL + "\t\t\t\telse return ";
1279
  protected final String TEXT_1261 = " otherEnd, int featureID, ";
1279
  protected final String TEXT_1262 = "();";
1280
  protected final String TEXT_1262 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1280
  protected final String TEXT_1263 = NL + "\t\t\t\tif (coreType) return ";
1281
  protected final String TEXT_1263 = ")" + NL + "\t\t{";
1281
  protected final String TEXT_1264 = "();" + NL + "\t\t\t\telse return ";
1282
  protected final String TEXT_1264 = NL + "\t\t\tcase ";
1282
  protected final String TEXT_1265 = "().map();";
1283
  protected final String TEXT_1265 = ":";
1283
  protected final String TEXT_1266 = NL + "\t\t\t\tif (coreType) return ((";
1284
  protected final String TEXT_1266 = NL + "\t\t\t\treturn ((";
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 = ".InternalMapView";
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 = "()).eMap()).basicRemove(otherEnd, msgs);";
1288
  protected final String TEXT_1271 = "();" + NL + "\t\t\t\treturn ((";
1289
  protected final String TEXT_1271 = NL + "\t\t\t\treturn ((";
1289
  protected final String TEXT_1272 = ".Internal)";
1290
  protected final String TEXT_1272 = ")((";
1290
  protected final String TEXT_1273 = "()).getWrapper();";
1291
  protected final String TEXT_1273 = ".Internal.Wrapper)";
1291
  protected final String TEXT_1274 = NL + "\t\t\t\treturn ";
1292
  protected final String TEXT_1274 = "()).featureMap()).basicRemove(otherEnd, msgs);";
1292
  protected final String TEXT_1275 = "();";
1293
  protected final String TEXT_1275 = NL + "\t\t\t\treturn ((";
1293
  protected final String TEXT_1276 = NL + "\t\t}";
1294
  protected final String TEXT_1276 = ")";
1294
  protected final String TEXT_1277 = NL + "\t\treturn super.eGet(featureID, resolve, coreType);";
1295
  protected final String TEXT_1277 = "()).basicRemove(otherEnd, msgs);";
1295
  protected final String TEXT_1278 = NL + "\t\treturn eDynamicGet(featureID, resolve, coreType);";
1296
  protected final String TEXT_1278 = NL + "\t\t\t\treturn eBasicSetContainer(null, ";
1296
  protected final String TEXT_1279 = NL + "\t}" + NL;
1297
  protected final String TEXT_1279 = ", 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 basicUnset";
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 basicSet";
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 = "(null, msgs);";
1301
  protected final String TEXT_1284 = ")" + NL + "\t\t{";
1302
  protected final String TEXT_1284 = NL + "\t\t}";
1302
  protected final String TEXT_1285 = NL + "\t\t\tcase ";
1303
  protected final String TEXT_1285 = NL + "\t\treturn super.eInverseRemove(otherEnd, featureID, msgs);";
1303
  protected final String TEXT_1286 = ":";
1304
  protected final String TEXT_1286 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, featureID, msgs);";
1304
  protected final String TEXT_1287 = NL + "\t\t\t\t((";
1305
  protected final String TEXT_1287 = NL + "\t}" + NL;
1305
  protected final String TEXT_1288 = ".Internal)((";
1306
  protected final String TEXT_1288 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1306
  protected final String TEXT_1289 = ".Internal.Wrapper)";
1307
  protected final String TEXT_1289 = NL + "\t@Override";
1307
  protected final String TEXT_1290 = "()).featureMap()).set(newValue);";
1308
  protected final String TEXT_1290 = NL + "\tpublic ";
1308
  protected final String TEXT_1291 = NL + "\t\t\t\t((";
1309
  protected final String TEXT_1291 = " eBasicRemoveFromContainerFeature(";
1309
  protected final String TEXT_1292 = ".Internal)";
1310
  protected final String TEXT_1292 = " msgs)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID()";
1310
  protected final String TEXT_1293 = "()).set(newValue);";
1311
  protected final String TEXT_1293 = ")" + NL + "\t\t{";
1311
  protected final String TEXT_1294 = NL + "\t\t\t\t((";
1312
  protected final String TEXT_1294 = NL + "\t\t\tcase ";
1312
  protected final String TEXT_1295 = ".Setting)((";
1313
  protected final String TEXT_1295 = ":" + NL + "\t\t\t\treturn eInternalContainer().eInverseRemove(this, ";
1313
  protected final String TEXT_1296 = ".InternalMapView";
1314
  protected final String TEXT_1296 = ", ";
1314
  protected final String TEXT_1297 = ")";
1315
  protected final String TEXT_1297 = ".class, msgs);";
1315
  protected final String TEXT_1298 = "()).eMap()).set(newValue);";
1316
  protected final String TEXT_1298 = NL + "\t\t}";
1316
  protected final String TEXT_1299 = NL + "\t\t\t\t((";
1317
  protected final String TEXT_1299 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(msgs);";
1317
  protected final String TEXT_1300 = ".Setting)";
1318
  protected final String TEXT_1300 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(msgs);";
1318
  protected final String TEXT_1301 = "()).set(newValue);";
1319
  protected final String TEXT_1301 = NL + "\t}" + NL;
1319
  protected final String TEXT_1302 = NL + "\t\t\t\t";
1320
  protected final String TEXT_1302 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1320
  protected final String TEXT_1303 = "().clear();" + NL + "\t\t\t\t";
1321
  protected final String TEXT_1303 = NL + "\t@Override";
1321
  protected final String TEXT_1304 = "().addAll((";
1322
  protected final String TEXT_1304 = NL + "\tpublic Object eGet(int featureID, boolean resolve, boolean coreType)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1322
  protected final String TEXT_1305 = "<? extends ";
1323
  protected final String TEXT_1305 = ")" + NL + "\t\t{";
1323
  protected final String TEXT_1306 = ">";
1324
  protected final String TEXT_1306 = NL + "\t\t\tcase ";
1324
  protected final String TEXT_1307 = ")newValue);";
1325
  protected final String TEXT_1307 = ":";
1325
  protected final String TEXT_1308 = NL + "\t\t\t\tset";
1326
  protected final String TEXT_1308 = NL + "\t\t\t\treturn ";
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 = "() ? Boolean.TRUE : Boolean.FALSE;";
1329
  protected final String TEXT_1312 = NL + "\t\t\t\tset";
1330
  protected final String TEXT_1312 = NL + "\t\t\t\treturn new ";
1330
  protected final String TEXT_1313 = "(";
1331
  protected final String TEXT_1313 = "(";
1331
  protected final String TEXT_1314 = "(";
1332
  protected final String TEXT_1314 = "());";
1332
  protected final String TEXT_1315 = ")";
1333
  protected final String TEXT_1315 = NL + "\t\t\t\tif (resolve) return ";
1333
  protected final String TEXT_1316 = "newValue);";
1334
  protected final String TEXT_1316 = "();" + NL + "\t\t\t\treturn basicGet";
1334
  protected final String TEXT_1317 = NL + "\t\t\t\treturn;";
1335
  protected final String TEXT_1317 = "();";
1335
  protected final String TEXT_1318 = NL + "\t\t}";
1336
  protected final String TEXT_1318 = NL + "\t\t\t\tif (coreType) return ((";
1336
  protected final String TEXT_1319 = NL + "\t\tsuper.eSet(featureID, newValue);";
1337
  protected final String TEXT_1319 = ".InternalMapView";
1337
  protected final String TEXT_1320 = NL + "\t\teDynamicSet(featureID, newValue);";
1338
  protected final String TEXT_1320 = ")";
1338
  protected final String TEXT_1321 = NL + "\t}" + NL;
1339
  protected final String TEXT_1321 = "()).eMap();" + NL + "\t\t\t\telse return ";
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 = NL + "\t\t\t\tif (coreType) 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 = "();" + NL + "\t\t\t\telse return ";
1342
  protected final String TEXT_1325 = ")" + NL + "\t\t{";
1343
  protected final String TEXT_1325 = "().map();";
1343
  protected final String TEXT_1326 = NL + "\t\t\tcase ";
1344
  protected final String TEXT_1326 = NL + "\t\t\t\tif (coreType) return ((";
1344
  protected final String TEXT_1327 = ":";
1345
  protected final String TEXT_1327 = ".Internal.Wrapper)";
1345
  protected final String TEXT_1328 = NL + "\t\t\t\t((";
1346
  protected final String TEXT_1328 = "()).featureMap();" + NL + "\t\t\t\treturn ";
1346
  protected final String TEXT_1329 = ".Internal.Wrapper)";
1347
  protected final String TEXT_1329 = "();";
1347
  protected final String TEXT_1330 = "()).featureMap().clear();";
1348
  protected final String TEXT_1330 = NL + "\t\t\t\tif (coreType) return ";
1348
  protected final String TEXT_1331 = NL + "\t\t\t\t";
1349
  protected final String TEXT_1331 = "();" + NL + "\t\t\t\treturn ((";
1349
  protected final String TEXT_1332 = "().clear();";
1350
  protected final String TEXT_1332 = ".Internal)";
1350
  protected final String TEXT_1333 = NL + "\t\t\t\tunset";
1351
  protected final String TEXT_1333 = "()).getWrapper();";
1351
  protected final String TEXT_1334 = "();";
1352
  protected final String TEXT_1334 = NL + "\t\t\t\treturn ";
1352
  protected final String TEXT_1335 = NL + "\t\t\t\tset";
1353
  protected final String TEXT_1335 = "();";
1353
  protected final String TEXT_1336 = "((";
1354
  protected final String TEXT_1336 = NL + "\t\t}";
1354
  protected final String TEXT_1337 = ")null);";
1355
  protected final String TEXT_1337 = NL + "\t\treturn super.eGet(featureID, resolve, coreType);";
1355
  protected final String TEXT_1338 = NL + "\t\t\t\tset";
1356
  protected final String TEXT_1338 = NL + "\t\treturn eDynamicGet(featureID, resolve, coreType);";
1356
  protected final String TEXT_1339 = "(";
1357
  protected final String TEXT_1339 = NL + "\t}" + NL;
1357
  protected final String TEXT_1340 = ");";
1358
  protected final String TEXT_1340 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1358
  protected final String TEXT_1341 = NL + "\t\t\t\treturn;";
1359
  protected final String TEXT_1341 = NL + "\t@SuppressWarnings(\"unchecked\")";
1359
  protected final String TEXT_1342 = NL + "\t\t}";
1360
  protected final String TEXT_1342 = NL + "\t@Override";
1360
  protected final String TEXT_1343 = NL + "\t\tsuper.eUnset(featureID);";
1361
  protected final String TEXT_1343 = NL + "\tpublic void eSet(int featureID, Object newValue)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1361
  protected final String TEXT_1344 = NL + "\t\teDynamicUnset(featureID);";
1362
  protected final String TEXT_1344 = ")" + NL + "\t\t{";
1362
  protected final String TEXT_1345 = NL + "\t}" + NL;
1363
  protected final String TEXT_1345 = NL + "\t\t\tcase ";
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 = ":";
1364
  protected final String TEXT_1347 = NL + "\t@SuppressWarnings(\"unchecked\")";
1365
  protected final String TEXT_1347 = NL + "\t\t\t\t((";
1365
  protected final String TEXT_1348 = NL + "\t@Override";
1366
  protected final String TEXT_1348 = ".Internal)((";
1366
  protected final String TEXT_1349 = NL + "\tpublic boolean eIsSet(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1367
  protected final String TEXT_1349 = ".Internal.Wrapper)";
1367
  protected final String TEXT_1350 = ")" + NL + "\t\t{";
1368
  protected final String TEXT_1350 = "()).featureMap()).set(newValue);";
1368
  protected final String TEXT_1351 = NL + "\t\t\tcase ";
1369
  protected final String TEXT_1351 = NL + "\t\t\t\t((";
1369
  protected final String TEXT_1352 = ":";
1370
  protected final String TEXT_1352 = ".Internal)";
1370
  protected final String TEXT_1353 = NL + "\t\t\t\treturn !((";
1371
  protected final String TEXT_1353 = "()).set(newValue);";
1371
  protected final String TEXT_1354 = ".Internal.Wrapper)";
1372
  protected final String TEXT_1354 = NL + "\t\t\t\t((";
1372
  protected final String TEXT_1355 = "()).featureMap().isEmpty();";
1373
  protected final String TEXT_1355 = ".Setting)((";
1373
  protected final String TEXT_1356 = NL + "\t\t\t\treturn ";
1374
  protected final String TEXT_1356 = ".InternalMapView";
1374
  protected final String TEXT_1357 = " != null && !";
1375
  protected final String TEXT_1357 = ")";
1375
  protected final String TEXT_1358 = ".featureMap().isEmpty();";
1376
  protected final String TEXT_1358 = "()).eMap()).set(newValue);";
1376
  protected final String TEXT_1359 = NL + "\t\t\t\treturn ";
1377
  protected final String TEXT_1359 = NL + "\t\t\t\t((";
1377
  protected final String TEXT_1360 = " != null && !";
1378
  protected final String TEXT_1360 = ".Setting)";
1378
  protected final String TEXT_1361 = ".isEmpty();";
1379
  protected final String TEXT_1361 = "()).set(newValue);";
1379
  protected final String TEXT_1362 = NL + "\t\t\t\t";
1380
  protected final String TEXT_1362 = NL + "\t\t\t\t";
1380
  protected final String TEXT_1363 = " ";
1381
  protected final String TEXT_1363 = "().clear();" + NL + "\t\t\t\t";
1381
  protected final String TEXT_1364 = " = (";
1382
  protected final String TEXT_1364 = "().addAll((";
1382
  protected final String TEXT_1365 = ")eVirtualGet(";
1383
  protected final String TEXT_1365 = "<? extends ";
1383
  protected final String TEXT_1366 = ");" + NL + "\t\t\t\treturn ";
1384
  protected final String TEXT_1366 = ">";
1384
  protected final String TEXT_1367 = " != null && !";
1385
  protected final String TEXT_1367 = ")newValue);";
1385
  protected final String TEXT_1368 = ".isEmpty();";
1386
  protected final String TEXT_1368 = NL + "\t\t\t\tset";
1386
  protected final String TEXT_1369 = NL + "\t\t\t\treturn !";
1387
  protected final String TEXT_1369 = "(((";
1387
  protected final String TEXT_1370 = "().isEmpty();";
1388
  protected final String TEXT_1370 = ")newValue).";
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 = NL + "\t\t\t\tset";
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 = "(";
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 = "newValue);";
1394
  protected final String TEXT_1377 = NL + "\t\t\t\treturn basicGet";
1395
  protected final String TEXT_1377 = NL + "\t\t\t\treturn;";
1395
  protected final String TEXT_1378 = "() != null;";
1396
  protected final String TEXT_1378 = NL + "\t\t}";
1396
  protected final String TEXT_1379 = NL + "\t\t\t\treturn ";
1397
  protected final String TEXT_1379 = NL + "\t\tsuper.eSet(featureID, newValue);";
1397
  protected final String TEXT_1380 = " != null;";
1398
  protected final String TEXT_1380 = NL + "\t\teDynamicSet(featureID, newValue);";
1398
  protected final String TEXT_1381 = NL + "\t\t\t\treturn eVirtualGet(";
1399
  protected final String TEXT_1381 = NL + "\t}" + NL;
1399
  protected final String TEXT_1382 = ") != null;";
1400
  protected final String TEXT_1382 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1400
  protected final String TEXT_1383 = NL + "\t\t\t\treturn ";
1401
  protected final String TEXT_1383 = NL + "\t@Override";
1401
  protected final String TEXT_1384 = "() != null;";
1402
  protected final String TEXT_1384 = NL + "\tpublic void eUnset(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1402
  protected final String TEXT_1385 = NL + "\t\t\t\treturn ((";
1403
  protected final String TEXT_1385 = ")" + NL + "\t\t{";
1403
  protected final String TEXT_1386 = " & ";
1404
  protected final String TEXT_1386 = NL + "\t\t\tcase ";
1404
  protected final String TEXT_1387 = "_EFLAG) != 0) != ";
1405
  protected final String TEXT_1387 = ":";
1405
  protected final String TEXT_1388 = ";";
1406
  protected final String TEXT_1388 = NL + "\t\t\t\t((";
1406
  protected final String TEXT_1389 = NL + "\t\t\t\treturn (";
1407
  protected final String TEXT_1389 = ".Internal.Wrapper)";
1407
  protected final String TEXT_1390 = " & ";
1408
  protected final String TEXT_1390 = "()).featureMap().clear();";
1408
  protected final String TEXT_1391 = "_EFLAG) != ";
1409
  protected final String TEXT_1391 = NL + "\t\t\t\t";
1409
  protected final String TEXT_1392 = "_EFLAG_DEFAULT;";
1410
  protected final String TEXT_1392 = "().clear();";
1410
  protected final String TEXT_1393 = NL + "\t\t\t\treturn ";
1411
  protected final String TEXT_1393 = NL + "\t\t\t\tunset";
1411
  protected final String TEXT_1394 = " != ";
1412
  protected final String TEXT_1394 = "();";
1412
  protected final String TEXT_1395 = ";";
1413
  protected final String TEXT_1395 = NL + "\t\t\t\tset";
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 = ")null);";
1415
  protected final String TEXT_1398 = ") != ";
1416
  protected final String TEXT_1398 = NL + "\t\t\t\tset";
1416
  protected final String TEXT_1399 = ";";
1417
  protected final String TEXT_1399 = "(";
1417
  protected final String TEXT_1400 = NL + "\t\t\t\treturn ";
1418
  protected final String TEXT_1400 = ");";
1418
  protected final String TEXT_1401 = "() != ";
1419
  protected final String TEXT_1401 = NL + "\t\t\t\treturn;";
1419
  protected final String TEXT_1402 = ";";
1420
  protected final String TEXT_1402 = NL + "\t\t}";
1420
  protected final String TEXT_1403 = NL + "\t\t\t\treturn ";
1421
  protected final String TEXT_1403 = NL + "\t\tsuper.eUnset(featureID);";
1421
  protected final String TEXT_1404 = " == null ? ";
1422
  protected final String TEXT_1404 = NL + "\t\teDynamicUnset(featureID);";
1422
  protected final String TEXT_1405 = " != null : !";
1423
  protected final String TEXT_1405 = NL + "\t}" + NL;
1423
  protected final String TEXT_1406 = ".equals(";
1424
  protected final String TEXT_1406 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1424
  protected final String TEXT_1407 = ");";
1425
  protected final String TEXT_1407 = NL + "\t@SuppressWarnings(\"unchecked\")";
1425
  protected final String TEXT_1408 = NL + "\t\t\t\t";
1426
  protected final String TEXT_1408 = NL + "\t@Override";
1426
  protected final String TEXT_1409 = " ";
1427
  protected final String TEXT_1409 = NL + "\tpublic boolean eIsSet(int featureID)" + NL + "\t{" + NL + "\t\tswitch (featureID";
1427
  protected final String TEXT_1410 = " = (";
1428
  protected final String TEXT_1410 = ")" + NL + "\t\t{";
1428
  protected final String TEXT_1411 = ")eVirtualGet(";
1429
  protected final String TEXT_1411 = NL + "\t\t\tcase ";
1429
  protected final String TEXT_1412 = ", ";
1430
  protected final String TEXT_1412 = ":";
1430
  protected final String TEXT_1413 = ");" + NL + "\t\t\t\treturn ";
1431
  protected final String TEXT_1413 = NL + "\t\t\t\treturn !((";
1431
  protected final String TEXT_1414 = " == null ? ";
1432
  protected final String TEXT_1414 = ".Internal.Wrapper)";
1432
  protected final String TEXT_1415 = " != null : !";
1433
  protected final String TEXT_1415 = "()).featureMap().isEmpty();";
1433
  protected final String TEXT_1416 = ".equals(";
1434
  protected final String TEXT_1416 = NL + "\t\t\t\treturn ";
1434
  protected final String TEXT_1417 = ");";
1435
  protected final String TEXT_1417 = " != null && !";
1435
  protected final String TEXT_1418 = NL + "\t\t\t\treturn ";
1436
  protected final String TEXT_1418 = ".featureMap().isEmpty();";
1436
  protected final String TEXT_1419 = " == null ? ";
1437
  protected final String TEXT_1419 = NL + "\t\t\t\treturn ";
1437
  protected final String TEXT_1420 = "() != null : !";
1438
  protected final String TEXT_1420 = " != null && !";
1438
  protected final String TEXT_1421 = ".equals(";
1439
  protected final String TEXT_1421 = ".isEmpty();";
1439
  protected final String TEXT_1422 = "());";
1440
  protected final String TEXT_1422 = NL + "\t\t\t\t";
1440
  protected final String TEXT_1423 = NL + "\t\t}";
1441
  protected final String TEXT_1423 = " ";
1441
  protected final String TEXT_1424 = NL + "\t\treturn super.eIsSet(featureID);";
1442
  protected final String TEXT_1424 = " = (";
1442
  protected final String TEXT_1425 = NL + "\t\treturn eDynamicIsSet(featureID);";
1443
  protected final String TEXT_1425 = ")eVirtualGet(";
1443
  protected final String TEXT_1426 = NL + "\t}" + NL;
1444
  protected final String TEXT_1426 = ");" + NL + "\t\t\t\treturn ";
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 = " != null && !";
1445
  protected final String TEXT_1428 = NL + "\t@Override";
1446
  protected final String TEXT_1428 = ".isEmpty();";
1446
  protected final String TEXT_1429 = NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class";
1447
  protected final String TEXT_1429 = NL + "\t\t\t\treturn !";
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 isSet";
1449
  protected final String TEXT_1432 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID";
1450
  protected final String TEXT_1432 = "();";
1450
  protected final String TEXT_1433 = ")" + NL + "\t\t\t{";
1451
  protected final String TEXT_1433 = NL + "\t\t\t\treturn ";
1451
  protected final String TEXT_1434 = NL + "\t\t\t\tcase ";
1452
  protected final String TEXT_1434 = " != null;";
1452
  protected final String TEXT_1435 = ": return ";
1453
  protected final String TEXT_1435 = NL + "\t\t\t\treturn eVirtualGet(";
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 basicGet";
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 ";
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 eVirtualGet(";
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 ";
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 = " & ";
1464
  protected final String TEXT_1447 = ";";
1465
  protected final String TEXT_1447 = "_EFLAG) != 0) != ";
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 = NL + "\t\t\t\treturn (";
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 = "_EFLAG) != ";
1469
  protected final String TEXT_1452 = NL + "\t\t\t\tcase ";
1470
  protected final String TEXT_1452 = "_EFLAG_DEFAULT;";
1470
  protected final String TEXT_1453 = ": return ";
1471
  protected final String TEXT_1453 = NL + "\t\t\t\treturn ";
1471
  protected final String TEXT_1454 = ";";
1472
  protected final String TEXT_1454 = " != ";
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 = ";";
1473
  protected final String TEXT_1456 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL;
1474
  protected final String TEXT_1456 = NL + "\t\t\t\treturn eVirtualGet(";
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 = ") != ";
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 = NL + "\t\t\t\treturn ";
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 = ";";
1480
  protected final String TEXT_1463 = " = newValues;" + NL + "\t}" + NL;
1481
  protected final String TEXT_1463 = NL + "\t\t\t\treturn ";
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 = " == null ? ";
1482
  protected final String TEXT_1465 = NL + "\t@Override";
1483
  protected final String TEXT_1465 = " != null : !";
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 = ".equals(";
1484
  protected final String TEXT_1467 = NL + "\t\t\tcase ";
1485
  protected final String TEXT_1467 = ");";
1485
  protected final String TEXT_1468 = " :" + NL + "\t\t\t\treturn ";
1486
  protected final String TEXT_1468 = NL + "\t\t\t\t";
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 = " = (";
1488
  protected final String TEXT_1471 = NL + "\t@Override";
1489
  protected final String TEXT_1471 = ")eVirtualGet(";
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 = ");" + NL + "\t\t\t\treturn ";
1491
  protected final String TEXT_1474 = " :" + NL + "\t\t\t\t";
1492
  protected final String TEXT_1474 = " == null ? ";
1492
  protected final String TEXT_1475 = " = newIndexBits;" + NL + "\t\t\t\tbreak;";
1493
  protected final String TEXT_1475 = " != null : !";
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 = ".equals(";
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 = ");";
1495
  protected final String TEXT_1478 = NL + "\t@Override";
1496
  protected final String TEXT_1478 = NL + "\t\t\t\treturn ";
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 = " == null ? ";
1497
  protected final String TEXT_1480 = NL + "\t\tresult.append(\" (";
1498
  protected final String TEXT_1480 = "() != null : !";
1498
  protected final String TEXT_1481 = ": \");";
1499
  protected final String TEXT_1481 = ".equals(";
1499
  protected final String TEXT_1482 = NL + "\t\tresult.append(\", ";
1500
  protected final String TEXT_1482 = "());";
1500
  protected final String TEXT_1483 = ": \");";
1501
  protected final String TEXT_1483 = NL + "\t\t}";
1501
  protected final String TEXT_1484 = NL + "\t\tif (eVirtualIsSet(";
1502
  protected final String TEXT_1484 = NL + "\t\treturn super.eIsSet(featureID);";
1502
  protected final String TEXT_1485 = ")) result.append(eVirtualGet(";
1503
  protected final String TEXT_1485 = NL + "\t\treturn eDynamicIsSet(featureID);";
1503
  protected final String TEXT_1486 = ")); else result.append(\"<unset>\");";
1504
  protected final String TEXT_1486 = NL + "\t}" + NL;
1504
  protected final String TEXT_1487 = NL + "\t\tif (";
1505
  protected final String TEXT_1487 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1505
  protected final String TEXT_1488 = "(";
1506
  protected final String TEXT_1488 = NL + "\t@Override";
1506
  protected final String TEXT_1489 = " & ";
1507
  protected final String TEXT_1489 = NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class";
1507
  protected final String TEXT_1490 = "_ESETFLAG) != 0";
1508
  protected final String TEXT_1490 = " baseClass)" + NL + "\t{";
1508
  protected final String TEXT_1491 = "ESet";
1509
  protected final String TEXT_1491 = NL + "\t\tif (baseClass == ";
1509
  protected final String TEXT_1492 = ") result.append((";
1510
  protected final String TEXT_1492 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID";
1510
  protected final String TEXT_1493 = " & ";
1511
  protected final String TEXT_1493 = ")" + NL + "\t\t\t{";
1511
  protected final String TEXT_1494 = "_EFLAG) != 0); else result.append(\"<unset>\");";
1512
  protected final String TEXT_1494 = NL + "\t\t\t\tcase ";
1512
  protected final String TEXT_1495 = NL + "\t\tif (";
1513
  protected final String TEXT_1495 = ": return ";
1513
  protected final String TEXT_1496 = "(";
1514
  protected final String TEXT_1496 = ";";
1514
  protected final String TEXT_1497 = " & ";
1515
  protected final String TEXT_1497 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1515
  protected final String TEXT_1498 = "_ESETFLAG) != 0";
1516
  protected final String TEXT_1498 = NL + "\t\treturn super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);" + NL + "\t}";
1516
  protected final String TEXT_1499 = "ESet";
1517
  protected final String TEXT_1499 = NL + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1517
  protected final String TEXT_1500 = ") result.append(";
1518
  protected final String TEXT_1500 = NL + "\t@Override";
1518
  protected final String TEXT_1501 = "_EFLAG_VALUES[(";
1519
  protected final String TEXT_1501 = NL + "\tpublic int eDerivedStructuralFeatureID(int baseFeatureID, Class";
1519
  protected final String TEXT_1502 = " & ";
1520
  protected final String TEXT_1502 = " baseClass)" + NL + "\t{";
1520
  protected final String TEXT_1503 = "_EFLAG) >>> ";
1521
  protected final String TEXT_1503 = NL + "\t\tif (baseClass == ";
1521
  protected final String TEXT_1504 = "_EFLAG_OFFSET]); else result.append(\"<unset>\");";
1522
  protected final String TEXT_1504 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{";
1522
  protected final String TEXT_1505 = NL + "\t\tif (";
1523
  protected final String TEXT_1505 = NL + "\t\t\t\tcase ";
1523
  protected final String TEXT_1506 = "(";
1524
  protected final String TEXT_1506 = ": return ";
1524
  protected final String TEXT_1507 = " & ";
1525
  protected final String TEXT_1507 = ";";
1525
  protected final String TEXT_1508 = "_ESETFLAG) != 0";
1526
  protected final String TEXT_1508 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1526
  protected final String TEXT_1509 = "ESet";
1527
  protected final String TEXT_1509 = NL + "\t\tif (baseClass == ";
1527
  protected final String TEXT_1510 = ") result.append(";
1528
  protected final String TEXT_1510 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID";
1528
  protected final String TEXT_1511 = "); else result.append(\"<unset>\");";
1529
  protected final String TEXT_1511 = ")" + NL + "\t\t\t{";
1529
  protected final String TEXT_1512 = NL + "\t\tresult.append(eVirtualGet(";
1530
  protected final String TEXT_1512 = NL + "\t\t\t\tcase ";
1530
  protected final String TEXT_1513 = ", ";
1531
  protected final String TEXT_1513 = ": return ";
1531
  protected final String TEXT_1514 = "));";
1532
  protected final String TEXT_1514 = ";";
1532
  protected final String TEXT_1515 = NL + "\t\tresult.append((";
1533
  protected final String TEXT_1515 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
1533
  protected final String TEXT_1516 = " & ";
1534
  protected final String TEXT_1516 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL;
1534
  protected final String TEXT_1517 = "_EFLAG) != 0);";
1535
  protected final String TEXT_1517 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1535
  protected final String TEXT_1518 = NL + "\t\tresult.append(";
1536
  protected final String TEXT_1518 = NL + "\t@Override";
1536
  protected final String TEXT_1519 = "_EFLAG_VALUES[(";
1537
  protected final String TEXT_1519 = NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn ";
1537
  protected final String TEXT_1520 = " & ";
1538
  protected final String TEXT_1520 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1538
  protected final String TEXT_1521 = "_EFLAG) >>> ";
1539
  protected final String TEXT_1521 = NL + "\t@Override";
1539
  protected final String TEXT_1522 = "_EFLAG_OFFSET]);";
1540
  protected final String TEXT_1522 = NL + "\tprotected void eSetVirtualValues(Object[] newValues)" + NL + "\t{" + NL + "\t\t";
1540
  protected final String TEXT_1523 = NL + "\t\tresult.append(";
1541
  protected final String TEXT_1523 = " = newValues;" + NL + "\t}" + NL;
1541
  protected final String TEXT_1524 = ");";
1542
  protected final String TEXT_1524 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\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 = NL + "\t@Override";
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 + "\tprotected int eVirtualIndexBits(int offset)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\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\t\tcase ";
1545
  protected final String TEXT_1528 = " getKey()" + NL + "\t{";
1546
  protected final String TEXT_1528 = " :" + NL + "\t\t\t\treturn ";
1546
  protected final String TEXT_1529 = NL + "\t\treturn new ";
1547
  protected final String TEXT_1529 = ";";
1547
  protected final String TEXT_1530 = "(getTypedKey());";
1548
  protected final String TEXT_1530 = 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 */";
1548
  protected final String TEXT_1531 = NL + "\t\treturn getTypedKey();";
1549
  protected final String TEXT_1531 = NL + "\t@Override";
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 + "\tprotected void eSetVirtualIndexBits(int offset, int newIndexBits)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
1550
  protected final String TEXT_1533 = " key)" + NL + "\t{";
1551
  protected final String TEXT_1533 = NL + "\t\t\tcase ";
1551
  protected final String TEXT_1534 = NL + "\t\tgetTypedKey().addAll(";
1552
  protected final String TEXT_1534 = " :" + NL + "\t\t\t\t";
1552
  protected final String TEXT_1535 = "(";
1553
  protected final String TEXT_1535 = " = newIndexBits;" + NL + "\t\t\t\tbreak;";
1553
  protected final String TEXT_1536 = ")";
1554
  protected final String TEXT_1536 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL;
1554
  protected final String TEXT_1537 = "key);";
1555
  protected final String TEXT_1537 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1555
  protected final String TEXT_1538 = NL + "\t\tsetTypedKey(key);";
1556
  protected final String TEXT_1538 = NL + "\t@Override";
1556
  protected final String TEXT_1539 = NL + "\t\tsetTypedKey(((";
1557
  protected final String TEXT_1539 = NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (eIsProxy()) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());";
1557
  protected final String TEXT_1540 = ")key).";
1558
  protected final String TEXT_1540 = NL + "\t\tresult.append(\" (";
1558
  protected final String TEXT_1541 = "());";
1559
  protected final String TEXT_1541 = ": \");";
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\tif (eVirtualIsSet(";
1562
  protected final String TEXT_1545 = " getValue()" + NL + "\t{";
1563
  protected final String TEXT_1545 = ")) result.append(eVirtualGet(";
1563
  protected final String TEXT_1546 = NL + "\t\treturn new ";
1564
  protected final String TEXT_1546 = ")); else result.append(\"<unset>\");";
1564
  protected final String TEXT_1547 = "(getTypedValue());";
1565
  protected final String TEXT_1547 = NL + "\t\tif (";
1565
  protected final String TEXT_1548 = NL + "\t\treturn getTypedValue();";
1566
  protected final String TEXT_1548 = "(";
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 = " & ";
1567
  protected final String TEXT_1550 = " setValue(";
1568
  protected final String TEXT_1550 = "_ESETFLAG) != 0";
1568
  protected final String TEXT_1551 = " value)" + NL + "\t{" + NL + "\t\t";
1569
  protected final String TEXT_1551 = "ESet";
1569
  protected final String TEXT_1552 = " oldValue = getValue();";
1570
  protected final String TEXT_1552 = ") result.append((";
1570
  protected final String TEXT_1553 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll(";
1571
  protected final String TEXT_1553 = " & ";
1571
  protected final String TEXT_1554 = "(";
1572
  protected final String TEXT_1554 = "_EFLAG) != 0); else result.append(\"<unset>\");";
1572
  protected final String TEXT_1555 = ")";
1573
  protected final String TEXT_1555 = NL + "\t\tif (";
1573
  protected final String TEXT_1556 = "value);";
1574
  protected final String TEXT_1556 = "(";
1574
  protected final String TEXT_1557 = NL + "\t\tsetTypedValue(value);";
1575
  protected final String TEXT_1557 = " & ";
1575
  protected final String TEXT_1558 = NL + "\t\tsetTypedValue(((";
1576
  protected final String TEXT_1558 = "_ESETFLAG) != 0";
1576
  protected final String TEXT_1559 = ")value).";
1577
  protected final String TEXT_1559 = "ESet";
1577
  protected final String TEXT_1560 = "());";
1578
  protected final String TEXT_1560 = ") result.append(";
1578
  protected final String TEXT_1561 = NL + "\t\tsetTypedValue((";
1579
  protected final String TEXT_1561 = "_EFLAG_VALUES[(";
1579
  protected final String TEXT_1562 = ")value);";
1580
  protected final String TEXT_1562 = " & ";
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) >>> ";
1581
  protected final String TEXT_1564 = NL + "\t@SuppressWarnings(\"unchecked\")";
1582
  protected final String TEXT_1564 = "_EFLAG_OFFSET]); else result.append(\"<unset>\");";
1582
  protected final String TEXT_1565 = NL + "\tpublic ";
1583
  protected final String TEXT_1565 = NL + "\t\tif (";
1583
  protected final String TEXT_1566 = " getEMap()" + NL + "\t{" + NL + "\t\t";
1584
  protected final String TEXT_1566 = "(";
1584
  protected final String TEXT_1567 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
1585
  protected final String TEXT_1567 = " & ";
1585
  protected final String TEXT_1568 = ")container.eGet(eContainmentFeature());" + NL + "\t}" + NL;
1586
  protected final String TEXT_1568 = "_ESETFLAG) != 0";
1586
  protected final String TEXT_1569 = NL + "} //";
1587
  protected final String TEXT_1569 = "ESet";
1587
  protected final String TEXT_1570 = NL;
1588
  protected final String TEXT_1570 = ") result.append(";
1589
  protected final String TEXT_1571 = "); else result.append(\"<unset>\");";
1590
  protected final String TEXT_1572 = NL + "\t\tresult.append(eVirtualGet(";
1591
  protected final String TEXT_1573 = ", ";
1592
  protected final String TEXT_1574 = "));";
1593
  protected final String TEXT_1575 = NL + "\t\tresult.append((";
1594
  protected final String TEXT_1576 = " & ";
1595
  protected final String TEXT_1577 = "_EFLAG) != 0);";
1596
  protected final String TEXT_1578 = NL + "\t\tresult.append(";
1597
  protected final String TEXT_1579 = "_EFLAG_VALUES[(";
1598
  protected final String TEXT_1580 = " & ";
1599
  protected final String TEXT_1581 = "_EFLAG) >>> ";
1600
  protected final String TEXT_1582 = "_EFLAG_OFFSET]);";
1601
  protected final String TEXT_1583 = NL + "\t\tresult.append(";
1602
  protected final String TEXT_1584 = ");";
1603
  protected final String TEXT_1585 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL;
1604
  protected final String TEXT_1586 = 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";
1605
  protected final String TEXT_1587 = " 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 ";
1606
  protected final String TEXT_1588 = " getKey()" + NL + "\t{";
1607
  protected final String TEXT_1589 = NL + "\t\treturn new ";
1608
  protected final String TEXT_1590 = "(getTypedKey());";
1609
  protected final String TEXT_1591 = NL + "\t\treturn getTypedKey();";
1610
  protected final String TEXT_1592 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setKey(";
1611
  protected final String TEXT_1593 = " key)" + NL + "\t{";
1612
  protected final String TEXT_1594 = NL + "\t\tgetTypedKey().addAll(";
1613
  protected final String TEXT_1595 = "(";
1614
  protected final String TEXT_1596 = ")";
1615
  protected final String TEXT_1597 = "key);";
1616
  protected final String TEXT_1598 = NL + "\t\tsetTypedKey(key);";
1617
  protected final String TEXT_1599 = NL + "\t\tsetTypedKey(((";
1618
  protected final String TEXT_1600 = ")key).";
1619
  protected final String TEXT_1601 = "());";
1620
  protected final String TEXT_1602 = NL + "\t\tsetTypedKey((";
1621
  protected final String TEXT_1603 = ")key);";
1622
  protected final String TEXT_1604 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1623
  protected final String TEXT_1605 = " getValue()" + NL + "\t{";
1624
  protected final String TEXT_1606 = NL + "\t\treturn new ";
1625
  protected final String TEXT_1607 = "(getTypedValue());";
1626
  protected final String TEXT_1608 = NL + "\t\treturn getTypedValue();";
1627
  protected final String TEXT_1609 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
1628
  protected final String TEXT_1610 = " setValue(";
1629
  protected final String TEXT_1611 = " value)" + NL + "\t{" + NL + "\t\t";
1630
  protected final String TEXT_1612 = " oldValue = getValue();";
1631
  protected final String TEXT_1613 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll(";
1632
  protected final String TEXT_1614 = "(";
1633
  protected final String TEXT_1615 = ")";
1634
  protected final String TEXT_1616 = "value);";
1635
  protected final String TEXT_1617 = NL + "\t\tsetTypedValue(value);";
1636
  protected final String TEXT_1618 = NL + "\t\tsetTypedValue(((";
1637
  protected final String TEXT_1619 = ")value).";
1638
  protected final String TEXT_1620 = "());";
1639
  protected final String TEXT_1621 = NL + "\t\tsetTypedValue((";
1640
  protected final String TEXT_1622 = ")value);";
1641
  protected final String TEXT_1623 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
1642
  protected final String TEXT_1624 = NL + "\t@SuppressWarnings(\"unchecked\")";
1643
  protected final String TEXT_1625 = NL + "\tpublic ";
1644
  protected final String TEXT_1626 = " getEMap()" + NL + "\t{" + NL + "\t\t";
1645
  protected final String TEXT_1627 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
1646
  protected final String TEXT_1628 = ")container.eGet(eContainmentFeature());" + NL + "\t}" + NL;
1647
  protected final String TEXT_1629 = NL + "} //";
1648
  protected final String TEXT_1630 = NL;
1588
1649
1589
  public String generate(Object argument)
1650
  public String generate(Object argument)
1590
  {
1651
  {
Lines 1593-1599 Link Here
1593
/**
1654
/**
1594
 * <copyright>
1655
 * <copyright>
1595
 *
1656
 *
1596
 * Copyright (c) 2002-2007 IBM Corporation and others.
1657
 * Copyright (c) 2002-2009 IBM Corporation and others.
1597
 * All rights reserved.   This program and the accompanying materials
1658
 * All rights reserved.   This program and the accompanying materials
1598
 * are made available under the terms of the Eclipse Public License v1.0
1659
 * are made available under the terms of the Eclipse Public License v1.0
1599
 * which accompanies this distribution, and is available at
1660
 * which accompanies this distribution, and is available at
Lines 4189-5287 Link Here
4189
    }//for
4250
    }//for
4190
    }}.run();
4251
    }}.run();
4191
    for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {
4252
    for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) {
4192
    if (isInterface) {
4253
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && isImplementation && genOperation.isInvariant() && genOperation.hasValidationExpression()) {
4193
    stringBuffer.append(TEXT_1106);
4254
    stringBuffer.append(TEXT_1106);
4255
    stringBuffer.append(genOperation.getName());
4194
    stringBuffer.append(TEXT_1107);
4256
    stringBuffer.append(TEXT_1107);
4195
    if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) {
4257
    stringBuffer.append(genOperation.getParameterTypes(", "));
4196
    stringBuffer.append(TEXT_1108);
4258
    stringBuffer.append(TEXT_1108);
4197
    if (genOperation.hasDocumentation()) {
4259
    stringBuffer.append(genOperation.getFormattedName());
4198
    stringBuffer.append(TEXT_1109);
4260
    stringBuffer.append(TEXT_1109);
4261
    stringBuffer.append(genOperation.getName());
4262
    stringBuffer.append(TEXT_1110);
4263
    stringBuffer.append(genOperation.getParameterTypes(", "));
4264
    stringBuffer.append(TEXT_1111);
4265
    stringBuffer.append(genModel.getImportedName("java.lang.String"));
4266
    stringBuffer.append(TEXT_1112);
4267
    stringBuffer.append(CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale()));
4268
    stringBuffer.append(genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale()));
4269
    stringBuffer.append(TEXT_1113);
4270
    stringBuffer.append(genOperation.getValidationExpression("\t\t"));
4271
    stringBuffer.append(TEXT_1114);
4272
    stringBuffer.append(genModel.getNonNLS());
4273
    stringBuffer.append(TEXT_1115);
4274
    }
4275
    if (isInterface) {
4276
    stringBuffer.append(TEXT_1116);
4277
    stringBuffer.append(TEXT_1117);
4278
    if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) {
4279
    stringBuffer.append(TEXT_1118);
4280
    if (genOperation.hasDocumentation()) {
4281
    stringBuffer.append(TEXT_1119);
4199
    stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
4282
    stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
4200
    }
4283
    }
4201
    for (GenParameter genParameter : genOperation.getGenParameters()) {
4284
    for (GenParameter genParameter : genOperation.getGenParameters()) {
4202
    if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation("");
4285
    if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation("");
4203
    if (documentation.contains("\n") || documentation.contains("\r")) {
4286
    if (documentation.contains("\n") || documentation.contains("\r")) {
4204
    stringBuffer.append(TEXT_1110);
4287
    stringBuffer.append(TEXT_1120);
4205
    stringBuffer.append(genParameter.getName());
4288
    stringBuffer.append(genParameter.getName());
4206
    stringBuffer.append(TEXT_1111);
4289
    stringBuffer.append(TEXT_1121);
4207
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4290
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4208
    } else {
4291
    } else {
4209
    stringBuffer.append(TEXT_1112);
4292
    stringBuffer.append(TEXT_1122);
4210
    stringBuffer.append(genParameter.getName());
4293
    stringBuffer.append(genParameter.getName());
4211
    stringBuffer.append(TEXT_1113);
4294
    stringBuffer.append(TEXT_1123);
4212
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4295
    stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer)));
4213
    }
4296
    }
4214
    }
4297
    }
4215
    }
4298
    }
4216
    stringBuffer.append(TEXT_1114);
4299
    stringBuffer.append(TEXT_1124);
4217
    }
4300
    }
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;
4301
    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);
4302
    stringBuffer.append(TEXT_1125);
4220
    stringBuffer.append(modelInfo);
4303
    stringBuffer.append(modelInfo);
4221
    } else {
4304
    } else {
4222
    stringBuffer.append(TEXT_1116);
4305
    stringBuffer.append(TEXT_1126);
4223
    stringBuffer.append(modelInfo);
4306
    stringBuffer.append(modelInfo);
4224
    }} if (first) {
4307
    }} if (first) {
4225
    stringBuffer.append(TEXT_1117);
4308
    stringBuffer.append(TEXT_1127);
4226
    }}
4309
    }}
4227
    stringBuffer.append(TEXT_1118);
4310
    stringBuffer.append(TEXT_1128);
4228
    //Class/genOperation.javadoc.override.javajetinc
4311
    //Class/genOperation.javadoc.override.javajetinc
4229
    } else {
4312
    } else {
4230
    stringBuffer.append(TEXT_1119);
4313
    stringBuffer.append(TEXT_1129);
4231
    if (isJDK50) { //Class/genOperation.annotations.insert.javajetinc
4314
    if (isJDK50) { //Class/genOperation.annotations.insert.javajetinc
4232
    }
4315
    }
4233
    }
4316
    }
4234
    if (!isImplementation) {
4317
    if (!isImplementation) {
4235
    stringBuffer.append(TEXT_1120);
4318
    stringBuffer.append(TEXT_1130);
4236
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4319
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4237
    stringBuffer.append(genOperation.getImportedType(genClass));
4320
    stringBuffer.append(genOperation.getImportedType(genClass));
4238
    stringBuffer.append(TEXT_1121);
4321
    stringBuffer.append(TEXT_1131);
4239
    stringBuffer.append(genOperation.getName());
4322
    stringBuffer.append(genOperation.getName());
4240
    stringBuffer.append(TEXT_1122);
4323
    stringBuffer.append(TEXT_1132);
4241
    stringBuffer.append(genOperation.getParameters(genClass));
4324
    stringBuffer.append(genOperation.getParameters(genClass));
4242
    stringBuffer.append(TEXT_1123);
4325
    stringBuffer.append(TEXT_1133);
4243
    stringBuffer.append(genOperation.getThrows(genClass));
4326
    stringBuffer.append(genOperation.getThrows(genClass));
4244
    stringBuffer.append(TEXT_1124);
4327
    stringBuffer.append(TEXT_1134);
4245
    } else {
4328
    } else {
4246
    stringBuffer.append(TEXT_1125);
4329
    stringBuffer.append(TEXT_1135);
4247
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4330
    stringBuffer.append(genOperation.getTypeParameters(genClass));
4248
    stringBuffer.append(genOperation.getImportedType(genClass));
4331
    stringBuffer.append(genOperation.getImportedType(genClass));
4249
    stringBuffer.append(TEXT_1126);
4332
    stringBuffer.append(TEXT_1136);
4250
    stringBuffer.append(genOperation.getName());
4333
    stringBuffer.append(genOperation.getName());
4251
    stringBuffer.append(TEXT_1127);
4334
    stringBuffer.append(TEXT_1137);
4252
    stringBuffer.append(genOperation.getParameters(genClass));
4335
    stringBuffer.append(genOperation.getParameters(genClass));
4253
    stringBuffer.append(TEXT_1128);
4336
    stringBuffer.append(TEXT_1138);
4254
    stringBuffer.append(genOperation.getThrows(genClass));
4337
    stringBuffer.append(genOperation.getThrows(genClass));
4255
    stringBuffer.append(TEXT_1129);
4338
    stringBuffer.append(TEXT_1139);
4256
    if (genOperation.hasBody()) {
4339
    if (genOperation.hasBody()) {
4257
    stringBuffer.append(TEXT_1130);
4340
    stringBuffer.append(TEXT_1140);
4258
    stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer)));
4341
    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();
4342
    } 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);
4343
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genOperation.hasValidationExpression()) {
4344
    stringBuffer.append(TEXT_1141);
4345
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4346
    stringBuffer.append(TEXT_1142);
4347
    stringBuffer.append(context);
4348
    stringBuffer.append(TEXT_1143);
4349
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4350
    stringBuffer.append(TEXT_1144);
4351
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4352
    stringBuffer.append(TEXT_1145);
4353
    stringBuffer.append(context);
4354
    stringBuffer.append(TEXT_1146);
4355
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4356
    stringBuffer.append(TEXT_1147);
4357
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4358
    stringBuffer.append(TEXT_1148);
4359
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
4360
    stringBuffer.append(TEXT_1149);
4361
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
4362
    stringBuffer.append(TEXT_1150);
4363
    stringBuffer.append(genOperation.getValidationDelegate());
4364
    stringBuffer.append(TEXT_1151);
4365
    stringBuffer.append(genModel.getNonNLS());
4366
    stringBuffer.append(TEXT_1152);
4367
    stringBuffer.append(CodeGenUtil.upperName(genOperation.getName(), genModel.getLocale()));
4368
    stringBuffer.append(genOperation.getGenParameters().size() == 0 ? "" : "__" + CodeGenUtil.upperName(genOperation.getParameterTypes("_", false), genModel.getLocale()));
4369
    stringBuffer.append(TEXT_1153);
4370
    stringBuffer.append(genClass.getQualifiedClassifierAccessor());
4371
    stringBuffer.append(TEXT_1154);
4372
    stringBuffer.append(context);
4373
    stringBuffer.append(TEXT_1155);
4261
    stringBuffer.append(diagnostics);
4374
    stringBuffer.append(diagnostics);
4262
    stringBuffer.append(TEXT_1132);
4375
    stringBuffer.append(TEXT_1156);
4376
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4377
    stringBuffer.append(TEXT_1157);
4378
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4379
    stringBuffer.append(TEXT_1158);
4380
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4381
    stringBuffer.append(TEXT_1159);
4382
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4383
    stringBuffer.append(TEXT_1160);
4384
    stringBuffer.append(opClass.getOperationID(genOperation));
4385
    stringBuffer.append(TEXT_1161);
4386
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4387
    stringBuffer.append(TEXT_1162);
4388
    stringBuffer.append(genOperation.getName());
4389
    stringBuffer.append(TEXT_1163);
4390
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4391
    stringBuffer.append(TEXT_1164);
4392
    stringBuffer.append(context);
4393
    stringBuffer.append(TEXT_1165);
4394
    stringBuffer.append(genModel.getNonNLS());
4395
    stringBuffer.append(genModel.getNonNLS(2));
4396
    stringBuffer.append(TEXT_1166);
4397
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
4398
    stringBuffer.append(TEXT_1167);
4263
    stringBuffer.append(diagnostics);
4399
    stringBuffer.append(diagnostics);
4264
    stringBuffer.append(TEXT_1133);
4400
    stringBuffer.append(TEXT_1168);
4265
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4401
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4266
    stringBuffer.append(TEXT_1134);
4402
    stringBuffer.append(TEXT_1169);
4267
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4403
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4268
    stringBuffer.append(TEXT_1135);
4404
    stringBuffer.append(TEXT_1170);
4269
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4405
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4270
    stringBuffer.append(TEXT_1136);
4406
    stringBuffer.append(TEXT_1171);
4271
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4407
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4272
    stringBuffer.append(TEXT_1137);
4408
    stringBuffer.append(TEXT_1172);
4273
    stringBuffer.append(opClass.getOperationID(genOperation));
4409
    stringBuffer.append(opClass.getOperationID(genOperation));
4274
    stringBuffer.append(TEXT_1138);
4410
    stringBuffer.append(TEXT_1173);
4275
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4411
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4276
    stringBuffer.append(TEXT_1139);
4412
    stringBuffer.append(TEXT_1174);
4277
    stringBuffer.append(genOperation.getName());
4413
    stringBuffer.append(genOperation.getName());
4278
    stringBuffer.append(TEXT_1140);
4414
    stringBuffer.append(TEXT_1175);
4279
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4415
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4280
    stringBuffer.append(TEXT_1141);
4416
    stringBuffer.append(TEXT_1176);
4281
    stringBuffer.append(context);
4417
    stringBuffer.append(context);
4282
    stringBuffer.append(TEXT_1142);
4418
    stringBuffer.append(TEXT_1177);
4283
    stringBuffer.append(genModel.getNonNLS());
4419
    stringBuffer.append(genModel.getNonNLS());
4284
    stringBuffer.append(genModel.getNonNLS(2));
4420
    stringBuffer.append(genModel.getNonNLS(2));
4285
    stringBuffer.append(TEXT_1143);
4421
    stringBuffer.append(TEXT_1178);
4422
    stringBuffer.append(diagnostics);
4423
    stringBuffer.append(TEXT_1179);
4424
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4425
    stringBuffer.append(TEXT_1180);
4426
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4427
    stringBuffer.append(TEXT_1181);
4428
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4429
    stringBuffer.append(TEXT_1182);
4430
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4431
    stringBuffer.append(TEXT_1183);
4432
    stringBuffer.append(opClass.getOperationID(genOperation));
4433
    stringBuffer.append(TEXT_1184);
4434
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4435
    stringBuffer.append(TEXT_1185);
4436
    stringBuffer.append(genOperation.getName());
4437
    stringBuffer.append(TEXT_1186);
4438
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4439
    stringBuffer.append(TEXT_1187);
4440
    stringBuffer.append(context);
4441
    stringBuffer.append(TEXT_1188);
4442
    stringBuffer.append(genOperation.getValidationDelegate());
4443
    stringBuffer.append(TEXT_1189);
4444
    stringBuffer.append(genModel.getNonNLS());
4445
    stringBuffer.append(genModel.getNonNLS(2));
4446
    stringBuffer.append(genModel.getNonNLS(3));
4447
    stringBuffer.append(TEXT_1190);
4286
    } else {
4448
    } else {
4287
    stringBuffer.append(TEXT_1144);
4449
    stringBuffer.append(TEXT_1191);
4450
    stringBuffer.append(diagnostics);
4451
    stringBuffer.append(TEXT_1192);
4452
    stringBuffer.append(diagnostics);
4453
    stringBuffer.append(TEXT_1193);
4454
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
4455
    stringBuffer.append(TEXT_1194);
4456
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
4457
    stringBuffer.append(TEXT_1195);
4458
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4459
    stringBuffer.append(TEXT_1196);
4460
    stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
4461
    stringBuffer.append(TEXT_1197);
4462
    stringBuffer.append(opClass.getOperationID(genOperation));
4463
    stringBuffer.append(TEXT_1198);
4464
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
4465
    stringBuffer.append(TEXT_1199);
4466
    stringBuffer.append(genOperation.getName());
4467
    stringBuffer.append(TEXT_1200);
4468
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
4469
    stringBuffer.append(TEXT_1201);
4470
    stringBuffer.append(context);
4471
    stringBuffer.append(TEXT_1202);
4472
    stringBuffer.append(genModel.getNonNLS());
4473
    stringBuffer.append(genModel.getNonNLS(2));
4474
    stringBuffer.append(TEXT_1203);
4475
    }
4476
    } else {
4477
    stringBuffer.append(TEXT_1204);
4288
    //Class/implementedGenOperation.todo.override.javajetinc
4478
    //Class/implementedGenOperation.todo.override.javajetinc
4289
    }
4479
    }
4290
    stringBuffer.append(TEXT_1145);
4480
    stringBuffer.append(TEXT_1205);
4291
    }
4481
    }
4292
    //Class/implementedGenOperation.override.javajetinc
4482
    //Class/implementedGenOperation.override.javajetinc
4293
    }//for
4483
    }//for
4294
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
4484
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
4295
    stringBuffer.append(TEXT_1146);
4485
    stringBuffer.append(TEXT_1206);
4296
    if (genModel.useGenerics()) {
4486
    if (genModel.useGenerics()) {
4297
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4487
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4298
    if (genFeature.isUncheckedCast(genClass)) {
4488
    if (genFeature.isUncheckedCast(genClass)) {
4299
    stringBuffer.append(TEXT_1147);
4489
    stringBuffer.append(TEXT_1207);
4300
    break; }
4490
    break; }
4301
    }
4491
    }
4302
    }
4492
    }
4303
    if (genModel.useClassOverrideAnnotation()) {
4493
    if (genModel.useClassOverrideAnnotation()) {
4304
    stringBuffer.append(TEXT_1148);
4494
    stringBuffer.append(TEXT_1208);
4305
    }
4495
    }
4306
    stringBuffer.append(TEXT_1149);
4496
    stringBuffer.append(TEXT_1209);
4307
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4497
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4308
    stringBuffer.append(TEXT_1150);
4498
    stringBuffer.append(TEXT_1210);
4309
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4499
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4310
    stringBuffer.append(TEXT_1151);
4500
    stringBuffer.append(TEXT_1211);
4311
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4501
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4312
    stringBuffer.append(TEXT_1152);
4502
    stringBuffer.append(TEXT_1212);
4313
    stringBuffer.append(negativeOffsetCorrection);
4503
    stringBuffer.append(negativeOffsetCorrection);
4314
    stringBuffer.append(TEXT_1153);
4504
    stringBuffer.append(TEXT_1213);
4315
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4505
    for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) {
4316
    stringBuffer.append(TEXT_1154);
4506
    stringBuffer.append(TEXT_1214);
4317
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4507
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4318
    stringBuffer.append(TEXT_1155);
4508
    stringBuffer.append(TEXT_1215);
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") + "<?>)");
4509
    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()) {
4510
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4321
    stringBuffer.append(TEXT_1156);
4511
    stringBuffer.append(TEXT_1216);
4322
    stringBuffer.append(cast);
4512
    stringBuffer.append(cast);
4323
    stringBuffer.append(TEXT_1157);
4513
    stringBuffer.append(TEXT_1217);
4324
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4514
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4325
    stringBuffer.append(TEXT_1158);
4515
    stringBuffer.append(TEXT_1218);
4326
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4516
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4327
    stringBuffer.append(TEXT_1159);
4517
    stringBuffer.append(TEXT_1219);
4328
    stringBuffer.append(genFeature.getGetAccessor());
4518
    stringBuffer.append(genFeature.getGetAccessor());
4329
    stringBuffer.append(TEXT_1160);
4519
    stringBuffer.append(TEXT_1220);
4330
    } else {
4520
    } else {
4331
    stringBuffer.append(TEXT_1161);
4521
    stringBuffer.append(TEXT_1221);
4332
    stringBuffer.append(cast);
4522
    stringBuffer.append(cast);
4333
    stringBuffer.append(genFeature.getGetAccessor());
4523
    stringBuffer.append(genFeature.getGetAccessor());
4334
    stringBuffer.append(TEXT_1162);
4524
    stringBuffer.append(TEXT_1222);
4335
    }
4525
    }
4336
    } else if (genFeature.isContainer()) {
4526
    } else if (genFeature.isContainer()) {
4337
    stringBuffer.append(TEXT_1163);
4527
    stringBuffer.append(TEXT_1223);
4338
    if (genFeature.isBasicSet()) {
4528
    if (genFeature.isBasicSet()) {
4339
    stringBuffer.append(TEXT_1164);
4529
    stringBuffer.append(TEXT_1224);
4340
    stringBuffer.append(genFeature.getAccessorName());
4530
    stringBuffer.append(genFeature.getAccessorName());
4341
    stringBuffer.append(TEXT_1165);
4531
    stringBuffer.append(TEXT_1225);
4342
    stringBuffer.append(genFeature.getImportedType(genClass));
4532
    stringBuffer.append(genFeature.getImportedType(genClass));
4343
    stringBuffer.append(TEXT_1166);
4533
    stringBuffer.append(TEXT_1226);
4344
    } else {
4534
    } else {
4345
    stringBuffer.append(TEXT_1167);
4535
    stringBuffer.append(TEXT_1227);
4346
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4536
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4347
    stringBuffer.append(positiveOffsetCorrection);
4537
    stringBuffer.append(positiveOffsetCorrection);
4348
    stringBuffer.append(TEXT_1168);
4538
    stringBuffer.append(TEXT_1228);
4349
    }
4539
    }
4350
    } else {
4540
    } else {
4351
    if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4541
    if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4352
    stringBuffer.append(TEXT_1169);
4542
    stringBuffer.append(TEXT_1229);
4353
    stringBuffer.append(genFeature.getImportedType(genClass));
4543
    stringBuffer.append(genFeature.getImportedType(genClass));
4354
    stringBuffer.append(TEXT_1170);
4544
    stringBuffer.append(TEXT_1230);
4355
    stringBuffer.append(genFeature.getSafeName());
4545
    stringBuffer.append(genFeature.getSafeName());
4356
    stringBuffer.append(TEXT_1171);
4546
    stringBuffer.append(TEXT_1231);
4357
    stringBuffer.append(genFeature.getImportedType(genClass));
4547
    stringBuffer.append(genFeature.getImportedType(genClass));
4358
    stringBuffer.append(TEXT_1172);
4548
    stringBuffer.append(TEXT_1232);
4359
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4549
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4360
    stringBuffer.append(positiveOffsetCorrection);
4550
    stringBuffer.append(positiveOffsetCorrection);
4361
    stringBuffer.append(TEXT_1173);
4551
    stringBuffer.append(TEXT_1233);
4362
    } else if (genFeature.isVolatile() || genClass.getImplementingGenModel(genFeature).isDynamicDelegation()) {
4552
    } else if (genFeature.isVolatile() || genClass.getImplementingGenModel(genFeature).isDynamicDelegation()) {
4363
    stringBuffer.append(TEXT_1174);
4553
    stringBuffer.append(TEXT_1234);
4364
    stringBuffer.append(genFeature.getImportedType(genClass));
4554
    stringBuffer.append(genFeature.getImportedType(genClass));
4365
    stringBuffer.append(TEXT_1175);
4555
    stringBuffer.append(TEXT_1235);
4366
    stringBuffer.append(genFeature.getSafeName());
4556
    stringBuffer.append(genFeature.getSafeName());
4367
    stringBuffer.append(TEXT_1176);
4557
    stringBuffer.append(TEXT_1236);
4368
    if (genFeature.isResolveProxies()) {
4558
    if (genFeature.isResolveProxies()) {
4369
    stringBuffer.append(TEXT_1177);
4559
    stringBuffer.append(TEXT_1237);
4370
    stringBuffer.append(genFeature.getAccessorName());
4560
    stringBuffer.append(genFeature.getAccessorName());
4371
    } else {
4561
    } else {
4372
    stringBuffer.append(genFeature.getGetAccessor());
4562
    stringBuffer.append(genFeature.getGetAccessor());
4373
    }
4563
    }
4374
    stringBuffer.append(TEXT_1178);
4564
    stringBuffer.append(TEXT_1238);
4375
    }
4565
    }
4376
    stringBuffer.append(TEXT_1179);
4566
    stringBuffer.append(TEXT_1239);
4377
    stringBuffer.append(genFeature.getSafeName());
4567
    stringBuffer.append(genFeature.getSafeName());
4378
    stringBuffer.append(TEXT_1180);
4568
    stringBuffer.append(TEXT_1240);
4379
    if (genFeature.isEffectiveContains()) {
4569
    if (genFeature.isEffectiveContains()) {
4380
    stringBuffer.append(TEXT_1181);
4570
    stringBuffer.append(TEXT_1241);
4381
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4571
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4382
    stringBuffer.append(TEXT_1182);
4572
    stringBuffer.append(TEXT_1242);
4383
    stringBuffer.append(genFeature.getSafeName());
4573
    stringBuffer.append(genFeature.getSafeName());
4384
    stringBuffer.append(TEXT_1183);
4574
    stringBuffer.append(TEXT_1243);
4385
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4575
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4386
    stringBuffer.append(negativeOffsetCorrection);
4576
    stringBuffer.append(negativeOffsetCorrection);
4387
    stringBuffer.append(TEXT_1184);
4577
    stringBuffer.append(TEXT_1244);
4388
    } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4578
    } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4389
    stringBuffer.append(TEXT_1185);
4579
    stringBuffer.append(TEXT_1245);
4390
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4580
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4391
    stringBuffer.append(TEXT_1186);
4581
    stringBuffer.append(TEXT_1246);
4392
    stringBuffer.append(genFeature.getSafeName());
4582
    stringBuffer.append(genFeature.getSafeName());
4393
    stringBuffer.append(TEXT_1187);
4583
    stringBuffer.append(TEXT_1247);
4394
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4584
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4395
    stringBuffer.append(reverseOffsetCorrection);
4585
    stringBuffer.append(reverseOffsetCorrection);
4396
    stringBuffer.append(TEXT_1188);
4586
    stringBuffer.append(TEXT_1248);
4397
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4587
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4398
    stringBuffer.append(TEXT_1189);
4588
    stringBuffer.append(TEXT_1249);
4399
    }
4589
    }
4400
    stringBuffer.append(TEXT_1190);
4590
    stringBuffer.append(TEXT_1250);
4401
    stringBuffer.append(genFeature.getAccessorName());
4591
    stringBuffer.append(genFeature.getAccessorName());
4402
    stringBuffer.append(TEXT_1191);
4592
    stringBuffer.append(TEXT_1251);
4403
    stringBuffer.append(genFeature.getImportedType(genClass));
4593
    stringBuffer.append(genFeature.getImportedType(genClass));
4404
    stringBuffer.append(TEXT_1192);
4594
    stringBuffer.append(TEXT_1252);
4405
    }
4595
    }
4406
    }
4596
    }
4407
    stringBuffer.append(TEXT_1193);
4597
    stringBuffer.append(TEXT_1253);
4408
    if (genModel.isMinimalReflectiveMethods()) {
4598
    if (genModel.isMinimalReflectiveMethods()) {
4409
    stringBuffer.append(TEXT_1194);
4599
    stringBuffer.append(TEXT_1254);
4410
    } else {
4600
    } else {
4411
    stringBuffer.append(TEXT_1195);
4601
    stringBuffer.append(TEXT_1255);
4412
    }
4602
    }
4413
    stringBuffer.append(TEXT_1196);
4603
    stringBuffer.append(TEXT_1256);
4414
    }
4604
    }
4415
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
4605
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
4416
    stringBuffer.append(TEXT_1197);
4606
    stringBuffer.append(TEXT_1257);
4417
    if (genModel.useClassOverrideAnnotation()) {
4607
    if (genModel.useClassOverrideAnnotation()) {
4418
    stringBuffer.append(TEXT_1198);
4608
    stringBuffer.append(TEXT_1258);
4419
    }
4609
    }
4420
    stringBuffer.append(TEXT_1199);
4610
    stringBuffer.append(TEXT_1259);
4421
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4611
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4422
    stringBuffer.append(TEXT_1200);
4612
    stringBuffer.append(TEXT_1260);
4423
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4613
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
4424
    stringBuffer.append(TEXT_1201);
4614
    stringBuffer.append(TEXT_1261);
4425
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4615
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4426
    stringBuffer.append(TEXT_1202);
4616
    stringBuffer.append(TEXT_1262);
4427
    stringBuffer.append(negativeOffsetCorrection);
4617
    stringBuffer.append(negativeOffsetCorrection);
4428
    stringBuffer.append(TEXT_1203);
4618
    stringBuffer.append(TEXT_1263);
4429
    for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) {
4619
    for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) {
4430
    stringBuffer.append(TEXT_1204);
4620
    stringBuffer.append(TEXT_1264);
4431
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4621
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4432
    stringBuffer.append(TEXT_1205);
4622
    stringBuffer.append(TEXT_1265);
4433
    if (genFeature.isListType()) {
4623
    if (genFeature.isListType()) {
4434
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4624
    if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
4435
    stringBuffer.append(TEXT_1206);
4625
    stringBuffer.append(TEXT_1266);
4436
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4626
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4437
    stringBuffer.append(singleWildcard);
4627
    stringBuffer.append(singleWildcard);
4438
    stringBuffer.append(TEXT_1207);
4628
    stringBuffer.append(TEXT_1267);
4439
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4629
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4440
    stringBuffer.append(TEXT_1208);
4630
    stringBuffer.append(TEXT_1268);
4441
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4631
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4442
    stringBuffer.append(TEXT_1209);
4632
    stringBuffer.append(TEXT_1269);
4443
    stringBuffer.append(genFeature.getGetAccessor());
4633
    stringBuffer.append(genFeature.getGetAccessor());
4444
    stringBuffer.append(TEXT_1210);
4634
    stringBuffer.append(TEXT_1270);
4445
    } else if (genFeature.isWrappedFeatureMapType()) {
4635
    } else if (genFeature.isWrappedFeatureMapType()) {
4446
    stringBuffer.append(TEXT_1211);
4636
    stringBuffer.append(TEXT_1271);
4447
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4637
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4448
    stringBuffer.append(singleWildcard);
4638
    stringBuffer.append(singleWildcard);
4449
    stringBuffer.append(TEXT_1212);
4639
    stringBuffer.append(TEXT_1272);
4450
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4640
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4451
    stringBuffer.append(TEXT_1213);
4641
    stringBuffer.append(TEXT_1273);
4452
    stringBuffer.append(genFeature.getGetAccessor());
4642
    stringBuffer.append(genFeature.getGetAccessor());
4453
    stringBuffer.append(TEXT_1214);
4643
    stringBuffer.append(TEXT_1274);
4454
    } else {
4644
    } else {
4455
    stringBuffer.append(TEXT_1215);
4645
    stringBuffer.append(TEXT_1275);
4456
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4646
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
4457
    stringBuffer.append(singleWildcard);
4647
    stringBuffer.append(singleWildcard);
4458
    stringBuffer.append(TEXT_1216);
4648
    stringBuffer.append(TEXT_1276);
4459
    stringBuffer.append(genFeature.getGetAccessor());
4649
    stringBuffer.append(genFeature.getGetAccessor());
4460
    stringBuffer.append(TEXT_1217);
4650
    stringBuffer.append(TEXT_1277);
4461
    }
4651
    }
4462
    } else if (genFeature.isContainer() && !genFeature.isBasicSet()) {
4652
    } else if (genFeature.isContainer() && !genFeature.isBasicSet()) {
4463
    stringBuffer.append(TEXT_1218);
4653
    stringBuffer.append(TEXT_1278);
4464
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4654
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4465
    stringBuffer.append(positiveOffsetCorrection);
4655
    stringBuffer.append(positiveOffsetCorrection);
4466
    stringBuffer.append(TEXT_1219);
4656
    stringBuffer.append(TEXT_1279);
4467
    } else if (genFeature.isUnsettable()) {
4657
    } else if (genFeature.isUnsettable()) {
4468
    stringBuffer.append(TEXT_1220);
4658
    stringBuffer.append(TEXT_1280);
4469
    stringBuffer.append(genFeature.getAccessorName());
4659
    stringBuffer.append(genFeature.getAccessorName());
4470
    stringBuffer.append(TEXT_1221);
4660
    stringBuffer.append(TEXT_1281);
4471
    } else {
4661
    } else {
4472
    stringBuffer.append(TEXT_1222);
4662
    stringBuffer.append(TEXT_1282);
4473
    stringBuffer.append(genFeature.getAccessorName());
4663
    stringBuffer.append(genFeature.getAccessorName());
4474
    stringBuffer.append(TEXT_1223);
4664
    stringBuffer.append(TEXT_1283);
4475
    }
4665
    }
4476
    }
4666
    }
4477
    stringBuffer.append(TEXT_1224);
4667
    stringBuffer.append(TEXT_1284);
4478
    if (genModel.isMinimalReflectiveMethods()) {
4668
    if (genModel.isMinimalReflectiveMethods()) {
4479
    stringBuffer.append(TEXT_1225);
4669
    stringBuffer.append(TEXT_1285);
4480
    } else {
4670
    } else {
4481
    stringBuffer.append(TEXT_1226);
4671
    stringBuffer.append(TEXT_1286);
4482
    }
4672
    }
4483
    stringBuffer.append(TEXT_1227);
4673
    stringBuffer.append(TEXT_1287);
4484
    }
4674
    }
4485
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
4675
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
4486
    stringBuffer.append(TEXT_1228);
4676
    stringBuffer.append(TEXT_1288);
4487
    if (genModel.useClassOverrideAnnotation()) {
4677
    if (genModel.useClassOverrideAnnotation()) {
4488
    stringBuffer.append(TEXT_1229);
4678
    stringBuffer.append(TEXT_1289);
4489
    }
4679
    }
4490
    stringBuffer.append(TEXT_1230);
4680
    stringBuffer.append(TEXT_1290);
4491
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4681
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4492
    stringBuffer.append(TEXT_1231);
4682
    stringBuffer.append(TEXT_1291);
4493
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4683
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain"));
4494
    stringBuffer.append(TEXT_1232);
4684
    stringBuffer.append(TEXT_1292);
4495
    stringBuffer.append(negativeOffsetCorrection);
4685
    stringBuffer.append(negativeOffsetCorrection);
4496
    stringBuffer.append(TEXT_1233);
4686
    stringBuffer.append(TEXT_1293);
4497
    for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) {
4687
    for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) {
4498
    GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4688
    GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : "";
4499
    stringBuffer.append(TEXT_1234);
4689
    stringBuffer.append(TEXT_1294);
4500
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4690
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4501
    stringBuffer.append(TEXT_1235);
4691
    stringBuffer.append(TEXT_1295);
4502
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4692
    stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
4503
    stringBuffer.append(reverseOffsetCorrection);
4693
    stringBuffer.append(reverseOffsetCorrection);
4504
    stringBuffer.append(TEXT_1236);
4694
    stringBuffer.append(TEXT_1296);
4505
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4695
    stringBuffer.append(targetClass.getRawImportedInterfaceName());
4506
    stringBuffer.append(TEXT_1237);
4696
    stringBuffer.append(TEXT_1297);
4507
    }
4697
    }
4508
    stringBuffer.append(TEXT_1238);
4698
    stringBuffer.append(TEXT_1298);
4509
    if (genModel.isMinimalReflectiveMethods()) {
4699
    if (genModel.isMinimalReflectiveMethods()) {
4510
    stringBuffer.append(TEXT_1239);
4700
    stringBuffer.append(TEXT_1299);
4511
    } else {
4701
    } else {
4512
    stringBuffer.append(TEXT_1240);
4702
    stringBuffer.append(TEXT_1300);
4513
    }
4703
    }
4514
    stringBuffer.append(TEXT_1241);
4704
    stringBuffer.append(TEXT_1301);
4515
    }
4705
    }
4516
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) {
4706
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) {
4517
    stringBuffer.append(TEXT_1242);
4707
    stringBuffer.append(TEXT_1302);
4518
    if (genModel.useClassOverrideAnnotation()) {
4708
    if (genModel.useClassOverrideAnnotation()) {
4519
    stringBuffer.append(TEXT_1243);
4709
    stringBuffer.append(TEXT_1303);
4520
    }
4710
    }
4521
    stringBuffer.append(TEXT_1244);
4711
    stringBuffer.append(TEXT_1304);
4522
    stringBuffer.append(negativeOffsetCorrection);
4712
    stringBuffer.append(negativeOffsetCorrection);
4523
    stringBuffer.append(TEXT_1245);
4713
    stringBuffer.append(TEXT_1305);
4524
    for (GenFeature genFeature : genClass.getEGetGenFeatures()) {
4714
    for (GenFeature genFeature : genClass.getEGetGenFeatures()) {
4525
    stringBuffer.append(TEXT_1246);
4715
    stringBuffer.append(TEXT_1306);
4526
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4716
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4527
    stringBuffer.append(TEXT_1247);
4717
    stringBuffer.append(TEXT_1307);
4528
    if (genFeature.isPrimitiveType()) {
4718
    if (genFeature.isPrimitiveType()) {
4529
    if (isJDK50) {
4719
    if (isJDK50) {
4530
    stringBuffer.append(TEXT_1248);
4720
    stringBuffer.append(TEXT_1308);
4531
    stringBuffer.append(genFeature.getGetAccessor());
4721
    stringBuffer.append(genFeature.getGetAccessor());
4532
    stringBuffer.append(TEXT_1249);
4722
    stringBuffer.append(TEXT_1309);
4533
    } else if (genFeature.isBooleanType()) {
4723
    } else if (genFeature.isBooleanType()) {
4534
    stringBuffer.append(TEXT_1250);
4724
    stringBuffer.append(TEXT_1310);
4535
    stringBuffer.append(genFeature.getGetAccessor());
4725
    stringBuffer.append(genFeature.getGetAccessor());
4536
    stringBuffer.append(TEXT_1251);
4726
    stringBuffer.append(TEXT_1311);
4537
    } else {
4727
    } else {
4538
    stringBuffer.append(TEXT_1252);
4728
    stringBuffer.append(TEXT_1312);
4539
    stringBuffer.append(genFeature.getObjectType(genClass));
4729
    stringBuffer.append(genFeature.getObjectType(genClass));
4540
    stringBuffer.append(TEXT_1253);
4730
    stringBuffer.append(TEXT_1313);
4541
    stringBuffer.append(genFeature.getGetAccessor());
4731
    stringBuffer.append(genFeature.getGetAccessor());
4542
    stringBuffer.append(TEXT_1254);
4732
    stringBuffer.append(TEXT_1314);
4543
    }
4733
    }
4544
    } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
4734
    } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
4545
    stringBuffer.append(TEXT_1255);
4735
    stringBuffer.append(TEXT_1315);
4546
    stringBuffer.append(genFeature.getGetAccessor());
4736
    stringBuffer.append(genFeature.getGetAccessor());
4547
    stringBuffer.append(TEXT_1256);
4737
    stringBuffer.append(TEXT_1316);
4548
    stringBuffer.append(genFeature.getAccessorName());
4738
    stringBuffer.append(genFeature.getAccessorName());
4549
    stringBuffer.append(TEXT_1257);
4739
    stringBuffer.append(TEXT_1317);
4550
    } else if (genFeature.isMapType()) {
4740
    } else if (genFeature.isMapType()) {
4551
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4741
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4552
    stringBuffer.append(TEXT_1258);
4742
    stringBuffer.append(TEXT_1318);
4553
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4743
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4554
    stringBuffer.append(TEXT_1259);
4744
    stringBuffer.append(TEXT_1319);
4555
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4745
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4556
    stringBuffer.append(TEXT_1260);
4746
    stringBuffer.append(TEXT_1320);
4557
    stringBuffer.append(genFeature.getGetAccessor());
4747
    stringBuffer.append(genFeature.getGetAccessor());
4558
    stringBuffer.append(TEXT_1261);
4748
    stringBuffer.append(TEXT_1321);
4559
    stringBuffer.append(genFeature.getGetAccessor());
4749
    stringBuffer.append(genFeature.getGetAccessor());
4560
    stringBuffer.append(TEXT_1262);
4750
    stringBuffer.append(TEXT_1322);
4561
    } else {
4751
    } else {
4562
    stringBuffer.append(TEXT_1263);
4752
    stringBuffer.append(TEXT_1323);
4563
    stringBuffer.append(genFeature.getGetAccessor());
4753
    stringBuffer.append(genFeature.getGetAccessor());
4564
    stringBuffer.append(TEXT_1264);
4754
    stringBuffer.append(TEXT_1324);
4565
    stringBuffer.append(genFeature.getGetAccessor());
4755
    stringBuffer.append(genFeature.getGetAccessor());
4566
    stringBuffer.append(TEXT_1265);
4756
    stringBuffer.append(TEXT_1325);
4567
    }
4757
    }
4568
    } else if (genFeature.isWrappedFeatureMapType()) {
4758
    } else if (genFeature.isWrappedFeatureMapType()) {
4569
    stringBuffer.append(TEXT_1266);
4759
    stringBuffer.append(TEXT_1326);
4570
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4760
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4571
    stringBuffer.append(TEXT_1267);
4761
    stringBuffer.append(TEXT_1327);
4572
    stringBuffer.append(genFeature.getGetAccessor());
4762
    stringBuffer.append(genFeature.getGetAccessor());
4573
    stringBuffer.append(TEXT_1268);
4763
    stringBuffer.append(TEXT_1328);
4574
    stringBuffer.append(genFeature.getGetAccessor());
4764
    stringBuffer.append(genFeature.getGetAccessor());
4575
    stringBuffer.append(TEXT_1269);
4765
    stringBuffer.append(TEXT_1329);
4576
    } else if (genFeature.isFeatureMapType()) {
4766
    } else if (genFeature.isFeatureMapType()) {
4577
    stringBuffer.append(TEXT_1270);
4767
    stringBuffer.append(TEXT_1330);
4578
    stringBuffer.append(genFeature.getGetAccessor());
4768
    stringBuffer.append(genFeature.getGetAccessor());
4579
    stringBuffer.append(TEXT_1271);
4769
    stringBuffer.append(TEXT_1331);
4580
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4770
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4581
    stringBuffer.append(TEXT_1272);
4771
    stringBuffer.append(TEXT_1332);
4582
    stringBuffer.append(genFeature.getGetAccessor());
4772
    stringBuffer.append(genFeature.getGetAccessor());
4583
    stringBuffer.append(TEXT_1273);
4773
    stringBuffer.append(TEXT_1333);
4584
    } else {
4774
    } else {
4585
    stringBuffer.append(TEXT_1274);
4775
    stringBuffer.append(TEXT_1334);
4586
    stringBuffer.append(genFeature.getGetAccessor());
4776
    stringBuffer.append(genFeature.getGetAccessor());
4587
    stringBuffer.append(TEXT_1275);
4777
    stringBuffer.append(TEXT_1335);
4588
    }
4778
    }
4589
    }
4779
    }
4590
    stringBuffer.append(TEXT_1276);
4780
    stringBuffer.append(TEXT_1336);
4591
    if (genModel.isMinimalReflectiveMethods()) {
4781
    if (genModel.isMinimalReflectiveMethods()) {
4592
    stringBuffer.append(TEXT_1277);
4782
    stringBuffer.append(TEXT_1337);
4593
    } else {
4783
    } else {
4594
    stringBuffer.append(TEXT_1278);
4784
    stringBuffer.append(TEXT_1338);
4595
    }
4785
    }
4596
    stringBuffer.append(TEXT_1279);
4786
    stringBuffer.append(TEXT_1339);
4597
    }
4787
    }
4598
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
4788
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
4599
    stringBuffer.append(TEXT_1280);
4789
    stringBuffer.append(TEXT_1340);
4600
    if (genModel.useGenerics()) {
4790
    if (genModel.useGenerics()) {
4601
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4791
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4602
    if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
4792
    if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
4603
    stringBuffer.append(TEXT_1281);
4793
    stringBuffer.append(TEXT_1341);
4604
    break; }
4794
    break; }
4605
    }
4795
    }
4606
    }
4796
    }
4607
    if (genModel.useClassOverrideAnnotation()) {
4797
    if (genModel.useClassOverrideAnnotation()) {
4608
    stringBuffer.append(TEXT_1282);
4798
    stringBuffer.append(TEXT_1342);
4609
    }
4799
    }
4610
    stringBuffer.append(TEXT_1283);
4800
    stringBuffer.append(TEXT_1343);
4611
    stringBuffer.append(negativeOffsetCorrection);
4801
    stringBuffer.append(negativeOffsetCorrection);
4612
    stringBuffer.append(TEXT_1284);
4802
    stringBuffer.append(TEXT_1344);
4613
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4803
    for (GenFeature genFeature : genClass.getESetGenFeatures()) {
4614
    stringBuffer.append(TEXT_1285);
4804
    stringBuffer.append(TEXT_1345);
4615
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4805
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4616
    stringBuffer.append(TEXT_1286);
4806
    stringBuffer.append(TEXT_1346);
4617
    if (genFeature.isListType()) {
4807
    if (genFeature.isListType()) {
4618
    if (genFeature.isWrappedFeatureMapType()) {
4808
    if (genFeature.isWrappedFeatureMapType()) {
4619
    stringBuffer.append(TEXT_1287);
4809
    stringBuffer.append(TEXT_1347);
4620
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4810
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4621
    stringBuffer.append(TEXT_1288);
4811
    stringBuffer.append(TEXT_1348);
4622
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4812
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4623
    stringBuffer.append(TEXT_1289);
4813
    stringBuffer.append(TEXT_1349);
4624
    stringBuffer.append(genFeature.getGetAccessor());
4814
    stringBuffer.append(genFeature.getGetAccessor());
4625
    stringBuffer.append(TEXT_1290);
4815
    stringBuffer.append(TEXT_1350);
4626
    } else if (genFeature.isFeatureMapType()) {
4816
    } else if (genFeature.isFeatureMapType()) {
4627
    stringBuffer.append(TEXT_1291);
4817
    stringBuffer.append(TEXT_1351);
4628
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4818
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4629
    stringBuffer.append(TEXT_1292);
4819
    stringBuffer.append(TEXT_1352);
4630
    stringBuffer.append(genFeature.getGetAccessor());
4820
    stringBuffer.append(genFeature.getGetAccessor());
4631
    stringBuffer.append(TEXT_1293);
4821
    stringBuffer.append(TEXT_1353);
4632
    } else if (genFeature.isMapType()) {
4822
    } else if (genFeature.isMapType()) {
4633
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4823
    if (genFeature.isEffectiveSuppressEMFTypes()) {
4634
    stringBuffer.append(TEXT_1294);
4824
    stringBuffer.append(TEXT_1354);
4635
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4825
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4636
    stringBuffer.append(TEXT_1295);
4826
    stringBuffer.append(TEXT_1355);
4637
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4827
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
4638
    stringBuffer.append(TEXT_1296);
4828
    stringBuffer.append(TEXT_1356);
4639
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4829
    stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass));
4640
    stringBuffer.append(TEXT_1297);
4830
    stringBuffer.append(TEXT_1357);
4641
    stringBuffer.append(genFeature.getGetAccessor());
4831
    stringBuffer.append(genFeature.getGetAccessor());
4642
    stringBuffer.append(TEXT_1298);
4832
    stringBuffer.append(TEXT_1358);
4643
    } else {
4833
    } else {
4644
    stringBuffer.append(TEXT_1299);
4834
    stringBuffer.append(TEXT_1359);
4645
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4835
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
4646
    stringBuffer.append(TEXT_1300);
4836
    stringBuffer.append(TEXT_1360);
4647
    stringBuffer.append(genFeature.getGetAccessor());
4837
    stringBuffer.append(genFeature.getGetAccessor());
4648
    stringBuffer.append(TEXT_1301);
4838
    stringBuffer.append(TEXT_1361);
4649
    }
4839
    }
4650
    } else {
4840
    } else {
4651
    stringBuffer.append(TEXT_1302);
4841
    stringBuffer.append(TEXT_1362);
4652
    stringBuffer.append(genFeature.getGetAccessor());
4842
    stringBuffer.append(genFeature.getGetAccessor());
4653
    stringBuffer.append(TEXT_1303);
4843
    stringBuffer.append(TEXT_1363);
4654
    stringBuffer.append(genFeature.getGetAccessor());
4844
    stringBuffer.append(genFeature.getGetAccessor());
4655
    stringBuffer.append(TEXT_1304);
4845
    stringBuffer.append(TEXT_1364);
4656
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
4846
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
4657
    if (isJDK50) {
4847
    if (isJDK50) {
4658
    stringBuffer.append(TEXT_1305);
4848
    stringBuffer.append(TEXT_1365);
4659
    stringBuffer.append(genFeature.getListItemType(genClass));
4849
    stringBuffer.append(genFeature.getListItemType(genClass));
4660
    stringBuffer.append(TEXT_1306);
4850
    stringBuffer.append(TEXT_1366);
4661
    }
4851
    }
4662
    stringBuffer.append(TEXT_1307);
4852
    stringBuffer.append(TEXT_1367);
4663
    }
4853
    }
4664
    } else if (!isJDK50 && genFeature.isPrimitiveType()) {
4854
    } else if (!isJDK50 && genFeature.isPrimitiveType()) {
4665
    stringBuffer.append(TEXT_1308);
4855
    stringBuffer.append(TEXT_1368);
4666
    stringBuffer.append(genFeature.getAccessorName());
4856
    stringBuffer.append(genFeature.getAccessorName());
4667
    stringBuffer.append(TEXT_1309);
4857
    stringBuffer.append(TEXT_1369);
4668
    stringBuffer.append(genFeature.getObjectType(genClass));
4858
    stringBuffer.append(genFeature.getObjectType(genClass));
4669
    stringBuffer.append(TEXT_1310);
4859
    stringBuffer.append(TEXT_1370);
4670
    stringBuffer.append(genFeature.getPrimitiveValueFunction());
4860
    stringBuffer.append(genFeature.getPrimitiveValueFunction());
4671
    stringBuffer.append(TEXT_1311);
4861
    stringBuffer.append(TEXT_1371);
4672
    } else {
4862
    } else {
4673
    stringBuffer.append(TEXT_1312);
4863
    stringBuffer.append(TEXT_1372);
4674
    stringBuffer.append(genFeature.getAccessorName());
4864
    stringBuffer.append(genFeature.getAccessorName());
4675
    stringBuffer.append(TEXT_1313);
4865
    stringBuffer.append(TEXT_1373);
4676
    if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) {
4866
    if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) {
4677
    stringBuffer.append(TEXT_1314);
4867
    stringBuffer.append(TEXT_1374);
4678
    stringBuffer.append(genFeature.getObjectType(genClass));
4868
    stringBuffer.append(genFeature.getObjectType(genClass));
4679
    stringBuffer.append(TEXT_1315);
4869
    stringBuffer.append(TEXT_1375);
4680
    }
4870
    }
4681
    stringBuffer.append(TEXT_1316);
4871
    stringBuffer.append(TEXT_1376);
4682
    }
4872
    }
4683
    stringBuffer.append(TEXT_1317);
4873
    stringBuffer.append(TEXT_1377);
4684
    }
4874
    }
4685
    stringBuffer.append(TEXT_1318);
4875
    stringBuffer.append(TEXT_1378);
4686
    if (genModel.isMinimalReflectiveMethods()) {
4876
    if (genModel.isMinimalReflectiveMethods()) {
4687
    stringBuffer.append(TEXT_1319);
4877
    stringBuffer.append(TEXT_1379);
4688
    } else {
4878
    } else {
4689
    stringBuffer.append(TEXT_1320);
4879
    stringBuffer.append(TEXT_1380);
4690
    }
4880
    }
4691
    stringBuffer.append(TEXT_1321);
4881
    stringBuffer.append(TEXT_1381);
4692
    }
4882
    }
4693
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) {
4883
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) {
4694
    stringBuffer.append(TEXT_1322);
4884
    stringBuffer.append(TEXT_1382);
4695
    if (genModel.useClassOverrideAnnotation()) {
4885
    if (genModel.useClassOverrideAnnotation()) {
4696
    stringBuffer.append(TEXT_1323);
4886
    stringBuffer.append(TEXT_1383);
4697
    }
4887
    }
4698
    stringBuffer.append(TEXT_1324);
4888
    stringBuffer.append(TEXT_1384);
4699
    stringBuffer.append(negativeOffsetCorrection);
4889
    stringBuffer.append(negativeOffsetCorrection);
4700
    stringBuffer.append(TEXT_1325);
4890
    stringBuffer.append(TEXT_1385);
4701
    for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) {
4891
    for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) {
4702
    stringBuffer.append(TEXT_1326);
4892
    stringBuffer.append(TEXT_1386);
4703
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4893
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4704
    stringBuffer.append(TEXT_1327);
4894
    stringBuffer.append(TEXT_1387);
4705
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4895
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4706
    if (genFeature.isWrappedFeatureMapType()) {
4896
    if (genFeature.isWrappedFeatureMapType()) {
4707
    stringBuffer.append(TEXT_1328);
4897
    stringBuffer.append(TEXT_1388);
4708
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4898
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4709
    stringBuffer.append(TEXT_1329);
4899
    stringBuffer.append(TEXT_1389);
4710
    stringBuffer.append(genFeature.getGetAccessor());
4900
    stringBuffer.append(genFeature.getGetAccessor());
4711
    stringBuffer.append(TEXT_1330);
4901
    stringBuffer.append(TEXT_1390);
4712
    } else {
4902
    } else {
4713
    stringBuffer.append(TEXT_1331);
4903
    stringBuffer.append(TEXT_1391);
4714
    stringBuffer.append(genFeature.getGetAccessor());
4904
    stringBuffer.append(genFeature.getGetAccessor());
4715
    stringBuffer.append(TEXT_1332);
4905
    stringBuffer.append(TEXT_1392);
4716
    }
4906
    }
4717
    } else if (genFeature.isUnsettable()) {
4907
    } else if (genFeature.isUnsettable()) {
4718
    stringBuffer.append(TEXT_1333);
4908
    stringBuffer.append(TEXT_1393);
4719
    stringBuffer.append(genFeature.getAccessorName());
4909
    stringBuffer.append(genFeature.getAccessorName());
4720
    stringBuffer.append(TEXT_1334);
4910
    stringBuffer.append(TEXT_1394);
4721
    } else if (!genFeature.hasEDefault()) {
4911
    } else if (!genFeature.hasEDefault()) {
4722
    stringBuffer.append(TEXT_1335);
4912
    stringBuffer.append(TEXT_1395);
4723
    stringBuffer.append(genFeature.getAccessorName());
4913
    stringBuffer.append(genFeature.getAccessorName());
4724
    stringBuffer.append(TEXT_1336);
4914
    stringBuffer.append(TEXT_1396);
4725
    stringBuffer.append(genFeature.getImportedType(genClass));
4915
    stringBuffer.append(genFeature.getImportedType(genClass));
4726
    stringBuffer.append(TEXT_1337);
4916
    stringBuffer.append(TEXT_1397);
4727
    } else {
4917
    } else {
4728
    stringBuffer.append(TEXT_1338);
4918
    stringBuffer.append(TEXT_1398);
4729
    stringBuffer.append(genFeature.getAccessorName());
4919
    stringBuffer.append(genFeature.getAccessorName());
4730
    stringBuffer.append(TEXT_1339);
4920
    stringBuffer.append(TEXT_1399);
4731
    stringBuffer.append(genFeature.getEDefault());
4921
    stringBuffer.append(genFeature.getEDefault());
4732
    stringBuffer.append(TEXT_1340);
4922
    stringBuffer.append(TEXT_1400);
4733
    }
4923
    }
4734
    stringBuffer.append(TEXT_1341);
4924
    stringBuffer.append(TEXT_1401);
4735
    }
4925
    }
4736
    stringBuffer.append(TEXT_1342);
4926
    stringBuffer.append(TEXT_1402);
4737
    if (genModel.isMinimalReflectiveMethods()) {
4927
    if (genModel.isMinimalReflectiveMethods()) {
4738
    stringBuffer.append(TEXT_1343);
4928
    stringBuffer.append(TEXT_1403);
4739
    } else {
4929
    } else {
4740
    stringBuffer.append(TEXT_1344);
4930
    stringBuffer.append(TEXT_1404);
4741
    }
4931
    }
4742
    stringBuffer.append(TEXT_1345);
4932
    stringBuffer.append(TEXT_1405);
4743
    //Class/eUnset.override.javajetinc
4933
    //Class/eUnset.override.javajetinc
4744
    }
4934
    }
4745
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) {
4935
    if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) {
4746
    stringBuffer.append(TEXT_1346);
4936
    stringBuffer.append(TEXT_1406);
4747
    if (genModel.useGenerics()) {
4937
    if (genModel.useGenerics()) {
4748
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) {
4938
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) {
4749
    if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4939
    if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4750
    stringBuffer.append(TEXT_1347);
4940
    stringBuffer.append(TEXT_1407);
4751
    break; }
4941
    break; }
4752
    }
4942
    }
4753
    }
4943
    }
4754
    if (genModel.useClassOverrideAnnotation()) {
4944
    if (genModel.useClassOverrideAnnotation()) {
4755
    stringBuffer.append(TEXT_1348);
4945
    stringBuffer.append(TEXT_1408);
4756
    }
4946
    }
4757
    stringBuffer.append(TEXT_1349);
4947
    stringBuffer.append(TEXT_1409);
4758
    stringBuffer.append(negativeOffsetCorrection);
4948
    stringBuffer.append(negativeOffsetCorrection);
4759
    stringBuffer.append(TEXT_1350);
4949
    stringBuffer.append(TEXT_1410);
4760
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { String safeNameAccessor = genFeature.getSafeName(); if ("featureID".equals(safeNameAccessor)) { safeNameAccessor = "this." + safeNameAccessor; }
4950
    for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { String safeNameAccessor = genFeature.getSafeName(); if ("featureID".equals(safeNameAccessor)) { safeNameAccessor = "this." + safeNameAccessor; }
4761
    stringBuffer.append(TEXT_1351);
4951
    stringBuffer.append(TEXT_1411);
4762
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4952
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4763
    stringBuffer.append(TEXT_1352);
4953
    stringBuffer.append(TEXT_1412);
4764
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4954
    if (genFeature.isListType() && !genFeature.isUnsettable()) {
4765
    if (genFeature.isWrappedFeatureMapType()) {
4955
    if (genFeature.isWrappedFeatureMapType()) {
4766
    if (genFeature.isVolatile()) {
4956
    if (genFeature.isVolatile()) {
4767
    stringBuffer.append(TEXT_1353);
4957
    stringBuffer.append(TEXT_1413);
4768
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4958
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
4769
    stringBuffer.append(TEXT_1354);
4959
    stringBuffer.append(TEXT_1414);
4770
    stringBuffer.append(genFeature.getGetAccessor());
4960
    stringBuffer.append(genFeature.getGetAccessor());
4771
    stringBuffer.append(TEXT_1355);
4961
    stringBuffer.append(TEXT_1415);
4772
    } else {
4962
    } else {
4773
    stringBuffer.append(TEXT_1356);
4963
    stringBuffer.append(TEXT_1416);
4774
    stringBuffer.append(safeNameAccessor);
4964
    stringBuffer.append(safeNameAccessor);
4775
    stringBuffer.append(TEXT_1357);
4965
    stringBuffer.append(TEXT_1417);
4776
    stringBuffer.append(safeNameAccessor);
4966
    stringBuffer.append(safeNameAccessor);
4777
    stringBuffer.append(TEXT_1358);
4967
    stringBuffer.append(TEXT_1418);
4778
    }
4968
    }
4779
    } else {
4969
    } else {
4780
    if (genClass.isField(genFeature)) {
4970
    if (genClass.isField(genFeature)) {
4781
    stringBuffer.append(TEXT_1359);
4971
    stringBuffer.append(TEXT_1419);
4782
    stringBuffer.append(safeNameAccessor);
4972
    stringBuffer.append(safeNameAccessor);
4783
    stringBuffer.append(TEXT_1360);
4973
    stringBuffer.append(TEXT_1420);
4784
    stringBuffer.append(safeNameAccessor);
4974
    stringBuffer.append(safeNameAccessor);
4785
    stringBuffer.append(TEXT_1361);
4975
    stringBuffer.append(TEXT_1421);
4786
    } else {
4976
    } else {
4787
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4977
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4788
    stringBuffer.append(TEXT_1362);
4978
    stringBuffer.append(TEXT_1422);
4789
    stringBuffer.append(genFeature.getImportedType(genClass));
4979
    stringBuffer.append(genFeature.getImportedType(genClass));
4790
    stringBuffer.append(TEXT_1363);
4980
    stringBuffer.append(TEXT_1423);
4791
    stringBuffer.append(safeNameAccessor);
4981
    stringBuffer.append(safeNameAccessor);
4792
    stringBuffer.append(TEXT_1364);
4982
    stringBuffer.append(TEXT_1424);
4793
    stringBuffer.append(genFeature.getImportedType(genClass));
4983
    stringBuffer.append(genFeature.getImportedType(genClass));
4794
    stringBuffer.append(TEXT_1365);
4984
    stringBuffer.append(TEXT_1425);
4795
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4985
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4796
    stringBuffer.append(positiveOffsetCorrection);
4986
    stringBuffer.append(positiveOffsetCorrection);
4797
    stringBuffer.append(TEXT_1366);
4987
    stringBuffer.append(TEXT_1426);
4798
    stringBuffer.append(safeNameAccessor);
4988
    stringBuffer.append(safeNameAccessor);
4799
    stringBuffer.append(TEXT_1367);
4989
    stringBuffer.append(TEXT_1427);
4800
    stringBuffer.append(safeNameAccessor);
4990
    stringBuffer.append(safeNameAccessor);
4801
    stringBuffer.append(TEXT_1368);
4991
    stringBuffer.append(TEXT_1428);
4802
    } else {
4992
    } else {
4803
    stringBuffer.append(TEXT_1369);
4993
    stringBuffer.append(TEXT_1429);
4804
    stringBuffer.append(genFeature.getGetAccessor());
4994
    stringBuffer.append(genFeature.getGetAccessor());
4805
    stringBuffer.append(TEXT_1370);
4995
    stringBuffer.append(TEXT_1430);
4806
    }
4996
    }
4807
    }
4997
    }
4808
    }
4998
    }
4809
    } else if (genFeature.isUnsettable()) {
4999
    } else if (genFeature.isUnsettable()) {
4810
    stringBuffer.append(TEXT_1371);
5000
    stringBuffer.append(TEXT_1431);
4811
    stringBuffer.append(genFeature.getAccessorName());
5001
    stringBuffer.append(genFeature.getAccessorName());
4812
    stringBuffer.append(TEXT_1372);
5002
    stringBuffer.append(TEXT_1432);
4813
    } else if (genFeature.isResolveProxies()) {
5003
    } else if (genFeature.isResolveProxies()) {
4814
    if (genClass.isField(genFeature)) {
5004
    if (genClass.isField(genFeature)) {
4815
    stringBuffer.append(TEXT_1373);
5005
    stringBuffer.append(TEXT_1433);
4816
    stringBuffer.append(safeNameAccessor);
5006
    stringBuffer.append(safeNameAccessor);
4817
    stringBuffer.append(TEXT_1374);
5007
    stringBuffer.append(TEXT_1434);
4818
    } else {
5008
    } else {
4819
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5009
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4820
    stringBuffer.append(TEXT_1375);
5010
    stringBuffer.append(TEXT_1435);
4821
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5011
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4822
    stringBuffer.append(positiveOffsetCorrection);
5012
    stringBuffer.append(positiveOffsetCorrection);
4823
    stringBuffer.append(TEXT_1376);
5013
    stringBuffer.append(TEXT_1436);
4824
    } else {
5014
    } else {
4825
    stringBuffer.append(TEXT_1377);
5015
    stringBuffer.append(TEXT_1437);
4826
    stringBuffer.append(genFeature.getAccessorName());
5016
    stringBuffer.append(genFeature.getAccessorName());
4827
    stringBuffer.append(TEXT_1378);
5017
    stringBuffer.append(TEXT_1438);
4828
    }
5018
    }
4829
    }
5019
    }
4830
    } else if (!genFeature.hasEDefault()) {
5020
    } else if (!genFeature.hasEDefault()) {
4831
    if (genClass.isField(genFeature)) {
5021
    if (genClass.isField(genFeature)) {
4832
    stringBuffer.append(TEXT_1379);
5022
    stringBuffer.append(TEXT_1439);
4833
    stringBuffer.append(safeNameAccessor);
5023
    stringBuffer.append(safeNameAccessor);
4834
    stringBuffer.append(TEXT_1380);
5024
    stringBuffer.append(TEXT_1440);
4835
    } else {
5025
    } else {
4836
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5026
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4837
    stringBuffer.append(TEXT_1381);
5027
    stringBuffer.append(TEXT_1441);
4838
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5028
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4839
    stringBuffer.append(positiveOffsetCorrection);
5029
    stringBuffer.append(positiveOffsetCorrection);
4840
    stringBuffer.append(TEXT_1382);
5030
    stringBuffer.append(TEXT_1442);
4841
    } else {
5031
    } else {
4842
    stringBuffer.append(TEXT_1383);
5032
    stringBuffer.append(TEXT_1443);
4843
    stringBuffer.append(genFeature.getGetAccessor());
5033
    stringBuffer.append(genFeature.getGetAccessor());
4844
    stringBuffer.append(TEXT_1384);
5034
    stringBuffer.append(TEXT_1444);
4845
    }
5035
    }
4846
    }
5036
    }
4847
    } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
5037
    } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
4848
    if (genClass.isField(genFeature)) {
5038
    if (genClass.isField(genFeature)) {
4849
    if (genClass.isFlag(genFeature)) {
5039
    if (genClass.isFlag(genFeature)) {
4850
    if (genFeature.isBooleanType()) {
5040
    if (genFeature.isBooleanType()) {
4851
    stringBuffer.append(TEXT_1385);
5041
    stringBuffer.append(TEXT_1445);
4852
    stringBuffer.append(genClass.getFlagsField(genFeature));
5042
    stringBuffer.append(genClass.getFlagsField(genFeature));
4853
    stringBuffer.append(TEXT_1386);
5043
    stringBuffer.append(TEXT_1446);
4854
    stringBuffer.append(genFeature.getUpperName());
5044
    stringBuffer.append(genFeature.getUpperName());
4855
    stringBuffer.append(TEXT_1387);
5045
    stringBuffer.append(TEXT_1447);
4856
    stringBuffer.append(genFeature.getEDefault());
5046
    stringBuffer.append(genFeature.getEDefault());
4857
    stringBuffer.append(TEXT_1388);
5047
    stringBuffer.append(TEXT_1448);
4858
    } else {
5048
    } else {
4859
    stringBuffer.append(TEXT_1389);
5049
    stringBuffer.append(TEXT_1449);
4860
    stringBuffer.append(genClass.getFlagsField(genFeature));
5050
    stringBuffer.append(genClass.getFlagsField(genFeature));
4861
    stringBuffer.append(TEXT_1390);
5051
    stringBuffer.append(TEXT_1450);
4862
    stringBuffer.append(genFeature.getUpperName());
5052
    stringBuffer.append(genFeature.getUpperName());
4863
    stringBuffer.append(TEXT_1391);
5053
    stringBuffer.append(TEXT_1451);
4864
    stringBuffer.append(genFeature.getUpperName());
5054
    stringBuffer.append(genFeature.getUpperName());
4865
    stringBuffer.append(TEXT_1392);
5055
    stringBuffer.append(TEXT_1452);
4866
    }
5056
    }
4867
    } else {
5057
    } else {
4868
    stringBuffer.append(TEXT_1393);
5058
    stringBuffer.append(TEXT_1453);
4869
    stringBuffer.append(safeNameAccessor);
5059
    stringBuffer.append(safeNameAccessor);
4870
    stringBuffer.append(TEXT_1394);
5060
    stringBuffer.append(TEXT_1454);
4871
    stringBuffer.append(genFeature.getEDefault());
5061
    stringBuffer.append(genFeature.getEDefault());
4872
    stringBuffer.append(TEXT_1395);
5062
    stringBuffer.append(TEXT_1455);
4873
    }
5063
    }
4874
    } else {
5064
    } else {
4875
    if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5065
    if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4876
    stringBuffer.append(TEXT_1396);
5066
    stringBuffer.append(TEXT_1456);
4877
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5067
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4878
    stringBuffer.append(positiveOffsetCorrection);
5068
    stringBuffer.append(positiveOffsetCorrection);
4879
    stringBuffer.append(TEXT_1397);
5069
    stringBuffer.append(TEXT_1457);
4880
    stringBuffer.append(genFeature.getEDefault());
5070
    stringBuffer.append(genFeature.getEDefault());
4881
    stringBuffer.append(TEXT_1398);
5071
    stringBuffer.append(TEXT_1458);
4882
    stringBuffer.append(genFeature.getEDefault());
5072
    stringBuffer.append(genFeature.getEDefault());
4883
    stringBuffer.append(TEXT_1399);
5073
    stringBuffer.append(TEXT_1459);
4884
    } else {
5074
    } else {
4885
    stringBuffer.append(TEXT_1400);
5075
    stringBuffer.append(TEXT_1460);
4886
    stringBuffer.append(genFeature.getGetAccessor());
5076
    stringBuffer.append(genFeature.getGetAccessor());
4887
    stringBuffer.append(TEXT_1401);
5077
    stringBuffer.append(TEXT_1461);
4888
    stringBuffer.append(genFeature.getEDefault());
5078
    stringBuffer.append(genFeature.getEDefault());
4889
    stringBuffer.append(TEXT_1402);
5079
    stringBuffer.append(TEXT_1462);
4890
    }
5080
    }
4891
    }
5081
    }
4892
    } else {//datatype
5082
    } else {//datatype
4893
    if (genClass.isField(genFeature)) {
5083
    if (genClass.isField(genFeature)) {
4894
    stringBuffer.append(TEXT_1403);
5084
    stringBuffer.append(TEXT_1463);
4895
    stringBuffer.append(genFeature.getEDefault());
5085
    stringBuffer.append(genFeature.getEDefault());
4896
    stringBuffer.append(TEXT_1404);
5086
    stringBuffer.append(TEXT_1464);
4897
    stringBuffer.append(safeNameAccessor);
5087
    stringBuffer.append(safeNameAccessor);
4898
    stringBuffer.append(TEXT_1405);
5088
    stringBuffer.append(TEXT_1465);
4899
    stringBuffer.append(genFeature.getEDefault());
5089
    stringBuffer.append(genFeature.getEDefault());
4900
    stringBuffer.append(TEXT_1406);
5090
    stringBuffer.append(TEXT_1466);
4901
    stringBuffer.append(safeNameAccessor);
5091
    stringBuffer.append(safeNameAccessor);
4902
    stringBuffer.append(TEXT_1407);
5092
    stringBuffer.append(TEXT_1467);
4903
    } else {
5093
    } else {
4904
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
5094
    if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
4905
    stringBuffer.append(TEXT_1408);
5095
    stringBuffer.append(TEXT_1468);
4906
    stringBuffer.append(genFeature.getImportedType(genClass));
5096
    stringBuffer.append(genFeature.getImportedType(genClass));
4907
    stringBuffer.append(TEXT_1409);
5097
    stringBuffer.append(TEXT_1469);
4908
    stringBuffer.append(safeNameAccessor);
5098
    stringBuffer.append(safeNameAccessor);
4909
    stringBuffer.append(TEXT_1410);
5099
    stringBuffer.append(TEXT_1470);
4910
    stringBuffer.append(genFeature.getImportedType(genClass));
5100
    stringBuffer.append(genFeature.getImportedType(genClass));
4911
    stringBuffer.append(TEXT_1411);
5101
    stringBuffer.append(TEXT_1471);
4912
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5102
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4913
    stringBuffer.append(positiveOffsetCorrection);
5103
    stringBuffer.append(positiveOffsetCorrection);
4914
    stringBuffer.append(TEXT_1412);
5104
    stringBuffer.append(TEXT_1472);
4915
    stringBuffer.append(genFeature.getEDefault());
5105
    stringBuffer.append(genFeature.getEDefault());
4916
    stringBuffer.append(TEXT_1413);
5106
    stringBuffer.append(TEXT_1473);
4917
    stringBuffer.append(genFeature.getEDefault());
5107
    stringBuffer.append(genFeature.getEDefault());
4918
    stringBuffer.append(TEXT_1414);
5108
    stringBuffer.append(TEXT_1474);
4919
    stringBuffer.append(safeNameAccessor);
5109
    stringBuffer.append(safeNameAccessor);
4920
    stringBuffer.append(TEXT_1415);
5110
    stringBuffer.append(TEXT_1475);
4921
    stringBuffer.append(genFeature.getEDefault());
5111
    stringBuffer.append(genFeature.getEDefault());
4922
    stringBuffer.append(TEXT_1416);
5112
    stringBuffer.append(TEXT_1476);
4923
    stringBuffer.append(safeNameAccessor);
5113
    stringBuffer.append(safeNameAccessor);
4924
    stringBuffer.append(TEXT_1417);
5114
    stringBuffer.append(TEXT_1477);
4925
    } else {
5115
    } else {
4926
    stringBuffer.append(TEXT_1418);
5116
    stringBuffer.append(TEXT_1478);
4927
    stringBuffer.append(genFeature.getEDefault());
5117
    stringBuffer.append(genFeature.getEDefault());
4928
    stringBuffer.append(TEXT_1419);
5118
    stringBuffer.append(TEXT_1479);
4929
    stringBuffer.append(genFeature.getGetAccessor());
5119
    stringBuffer.append(genFeature.getGetAccessor());
4930
    stringBuffer.append(TEXT_1420);
5120
    stringBuffer.append(TEXT_1480);
4931
    stringBuffer.append(genFeature.getEDefault());
5121
    stringBuffer.append(genFeature.getEDefault());
4932
    stringBuffer.append(TEXT_1421);
5122
    stringBuffer.append(TEXT_1481);
4933
    stringBuffer.append(genFeature.getGetAccessor());
5123
    stringBuffer.append(genFeature.getGetAccessor());
4934
    stringBuffer.append(TEXT_1422);
5124
    stringBuffer.append(TEXT_1482);
4935
    }
5125
    }
4936
    }
5126
    }
4937
    }
5127
    }
4938
    }
5128
    }
4939
    stringBuffer.append(TEXT_1423);
5129
    stringBuffer.append(TEXT_1483);
4940
    if (genModel.isMinimalReflectiveMethods()) {
5130
    if (genModel.isMinimalReflectiveMethods()) {
4941
    stringBuffer.append(TEXT_1424);
5131
    stringBuffer.append(TEXT_1484);
4942
    } else {
5132
    } else {
4943
    stringBuffer.append(TEXT_1425);
5133
    stringBuffer.append(TEXT_1485);
4944
    }
5134
    }
4945
    stringBuffer.append(TEXT_1426);
5135
    stringBuffer.append(TEXT_1486);
4946
    //Class/eIsSet.override.javajetinc
5136
    //Class/eIsSet.override.javajetinc
4947
    }
5137
    }
4948
    if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) {
5138
    if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) {
4949
    if (!genClass.getMixinGenFeatures().isEmpty()) {
5139
    if (!genClass.getMixinGenFeatures().isEmpty()) {
4950
    stringBuffer.append(TEXT_1427);
5140
    stringBuffer.append(TEXT_1487);
4951
    if (genModel.useClassOverrideAnnotation()) {
5141
    if (genModel.useClassOverrideAnnotation()) {
4952
    stringBuffer.append(TEXT_1428);
5142
    stringBuffer.append(TEXT_1488);
4953
    }
5143
    }
4954
    stringBuffer.append(TEXT_1429);
5144
    stringBuffer.append(TEXT_1489);
4955
    stringBuffer.append(singleWildcard);
5145
    stringBuffer.append(singleWildcard);
4956
    stringBuffer.append(TEXT_1430);
5146
    stringBuffer.append(TEXT_1490);
4957
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
5147
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
4958
    stringBuffer.append(TEXT_1431);
5148
    stringBuffer.append(TEXT_1491);
4959
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
5149
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
4960
    stringBuffer.append(TEXT_1432);
5150
    stringBuffer.append(TEXT_1492);
4961
    stringBuffer.append(negativeOffsetCorrection);
5151
    stringBuffer.append(negativeOffsetCorrection);
4962
    stringBuffer.append(TEXT_1433);
5152
    stringBuffer.append(TEXT_1493);
4963
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
5153
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
4964
    stringBuffer.append(TEXT_1434);
5154
    stringBuffer.append(TEXT_1494);
4965
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5155
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4966
    stringBuffer.append(TEXT_1435);
5156
    stringBuffer.append(TEXT_1495);
4967
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
5157
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
4968
    stringBuffer.append(TEXT_1436);
5158
    stringBuffer.append(TEXT_1496);
4969
    }
5159
    }
4970
    stringBuffer.append(TEXT_1437);
5160
    stringBuffer.append(TEXT_1497);
4971
    }
5161
    }
4972
    stringBuffer.append(TEXT_1438);
5162
    stringBuffer.append(TEXT_1498);
4973
    }
5163
    }
4974
    stringBuffer.append(TEXT_1439);
5164
    stringBuffer.append(TEXT_1499);
4975
    if (genModel.useClassOverrideAnnotation()) {
5165
    if (genModel.useClassOverrideAnnotation()) {
4976
    stringBuffer.append(TEXT_1440);
5166
    stringBuffer.append(TEXT_1500);
4977
    }
5167
    }
4978
    stringBuffer.append(TEXT_1441);
5168
    stringBuffer.append(TEXT_1501);
4979
    stringBuffer.append(singleWildcard);
5169
    stringBuffer.append(singleWildcard);
4980
    stringBuffer.append(TEXT_1442);
5170
    stringBuffer.append(TEXT_1502);
4981
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
5171
    for (GenClass mixinGenClass : genClass.getMixinGenClasses()) {
4982
    stringBuffer.append(TEXT_1443);
5172
    stringBuffer.append(TEXT_1503);
4983
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
5173
    stringBuffer.append(mixinGenClass.getRawImportedInterfaceName());
4984
    stringBuffer.append(TEXT_1444);
5174
    stringBuffer.append(TEXT_1504);
4985
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
5175
    for (GenFeature genFeature : mixinGenClass.getGenFeatures()) {
4986
    stringBuffer.append(TEXT_1445);
5176
    stringBuffer.append(TEXT_1505);
4987
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
5177
    stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
4988
    stringBuffer.append(TEXT_1446);
5178
    stringBuffer.append(TEXT_1506);
4989
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5179
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
4990
    stringBuffer.append(positiveOffsetCorrection);
5180
    stringBuffer.append(positiveOffsetCorrection);
4991
    stringBuffer.append(TEXT_1447);
5181
    stringBuffer.append(TEXT_1507);
4992
    }
5182
    }
4993
    stringBuffer.append(TEXT_1448);
5183
    stringBuffer.append(TEXT_1508);
4994
    }
5184
    }
4995
    if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) {
5185
    if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) {
4996
    stringBuffer.append(TEXT_1449);
5186
    stringBuffer.append(TEXT_1509);
4997
    stringBuffer.append(genClass.getRawImportedInterfaceName());
5187
    stringBuffer.append(genClass.getRawImportedInterfaceName());
4998
    stringBuffer.append(TEXT_1450);
5188
    stringBuffer.append(TEXT_1510);
4999
    stringBuffer.append(negativeOffsetCorrection);
5189
    stringBuffer.append(negativeOffsetCorrection);
5000
    stringBuffer.append(TEXT_1451);
5190
    stringBuffer.append(TEXT_1511);
5001
    for (GenFeature genFeature : genClass.getGenFeatures()) {
5191
    for (GenFeature genFeature : genClass.getGenFeatures()) {
5002
    stringBuffer.append(TEXT_1452);
5192
    stringBuffer.append(TEXT_1512);
5003
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5193
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5004
    stringBuffer.append(TEXT_1453);
5194
    stringBuffer.append(TEXT_1513);
5005
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5195
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5006
    stringBuffer.append(positiveOffsetCorrection);
5196
    stringBuffer.append(positiveOffsetCorrection);
5007
    stringBuffer.append(TEXT_1454);
5197
    stringBuffer.append(TEXT_1514);
5008
    }
5198
    }
5009
    stringBuffer.append(TEXT_1455);
5199
    stringBuffer.append(TEXT_1515);
5010
    }
5200
    }
5011
    stringBuffer.append(TEXT_1456);
5201
    stringBuffer.append(TEXT_1516);
5012
    }
5202
    }
5013
    if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
5203
    if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
5014
    if (eVirtualValuesField != null) {
5204
    if (eVirtualValuesField != null) {
5015
    stringBuffer.append(TEXT_1457);
5205
    stringBuffer.append(TEXT_1517);
5016
    if (genModel.useClassOverrideAnnotation()) {
5206
    if (genModel.useClassOverrideAnnotation()) {
5017
    stringBuffer.append(TEXT_1458);
5207
    stringBuffer.append(TEXT_1518);
5018
    }
5208
    }
5019
    stringBuffer.append(TEXT_1459);
5209
    stringBuffer.append(TEXT_1519);
5020
    stringBuffer.append(eVirtualValuesField);
5210
    stringBuffer.append(eVirtualValuesField);
5021
    stringBuffer.append(TEXT_1460);
5211
    stringBuffer.append(TEXT_1520);
5022
    if (genModel.useClassOverrideAnnotation()) {
5212
    if (genModel.useClassOverrideAnnotation()) {
5023
    stringBuffer.append(TEXT_1461);
5213
    stringBuffer.append(TEXT_1521);
5024
    }
5214
    }
5025
    stringBuffer.append(TEXT_1462);
5215
    stringBuffer.append(TEXT_1522);
5026
    stringBuffer.append(eVirtualValuesField);
5216
    stringBuffer.append(eVirtualValuesField);
5027
    stringBuffer.append(TEXT_1463);
5217
    stringBuffer.append(TEXT_1523);
5028
    }
5218
    }
5029
    { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());
5219
    { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>());
5030
    if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>());
5220
    if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>());
5031
    stringBuffer.append(TEXT_1464);
5221
    stringBuffer.append(TEXT_1524);
5032
    if (genModel.useClassOverrideAnnotation()) {
5222
    if (genModel.useClassOverrideAnnotation()) {
5033
    stringBuffer.append(TEXT_1465);
5223
    stringBuffer.append(TEXT_1525);
5034
    }
5224
    }
5035
    stringBuffer.append(TEXT_1466);
5225
    stringBuffer.append(TEXT_1526);
5036
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5226
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5037
    stringBuffer.append(TEXT_1467);
5227
    stringBuffer.append(TEXT_1527);
5038
    stringBuffer.append(i);
5228
    stringBuffer.append(i);
5039
    stringBuffer.append(TEXT_1468);
5229
    stringBuffer.append(TEXT_1528);
5040
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5230
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5041
    stringBuffer.append(TEXT_1469);
5231
    stringBuffer.append(TEXT_1529);
5042
    }
5232
    }
5043
    stringBuffer.append(TEXT_1470);
5233
    stringBuffer.append(TEXT_1530);
5044
    if (genModel.useClassOverrideAnnotation()) {
5234
    if (genModel.useClassOverrideAnnotation()) {
5045
    stringBuffer.append(TEXT_1471);
5235
    stringBuffer.append(TEXT_1531);
5046
    }
5236
    }
5047
    stringBuffer.append(TEXT_1472);
5237
    stringBuffer.append(TEXT_1532);
5048
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5238
    for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
5049
    stringBuffer.append(TEXT_1473);
5239
    stringBuffer.append(TEXT_1533);
5050
    stringBuffer.append(i);
5240
    stringBuffer.append(i);
5051
    stringBuffer.append(TEXT_1474);
5241
    stringBuffer.append(TEXT_1534);
5052
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5242
    stringBuffer.append(allEVirtualIndexBitFields.get(i));
5053
    stringBuffer.append(TEXT_1475);
5243
    stringBuffer.append(TEXT_1535);
5054
    }
5244
    }
5055
    stringBuffer.append(TEXT_1476);
5245
    stringBuffer.append(TEXT_1536);
5056
    }
5246
    }
5057
    }
5247
    }
5058
    }
5248
    }
5059
    if (!genClass.hasImplementedToStringGenOperation() && isImplementation && !genModel.isReflectiveDelegation() && !genModel.isDynamicDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
5249
    if (!genClass.hasImplementedToStringGenOperation() && isImplementation && !genModel.isReflectiveDelegation() && !genModel.isDynamicDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
5060
    stringBuffer.append(TEXT_1477);
5250
    stringBuffer.append(TEXT_1537);
5061
    if (genModel.useClassOverrideAnnotation()) {
5251
    if (genModel.useClassOverrideAnnotation()) {
5062
    stringBuffer.append(TEXT_1478);
5252
    stringBuffer.append(TEXT_1538);
5063
    }
5253
    }
5064
    stringBuffer.append(TEXT_1479);
5254
    stringBuffer.append(TEXT_1539);
5065
    { boolean first = true;
5255
    { boolean first = true;
5066
    for (GenFeature genFeature : genClass.getToStringGenFeatures()) {
5256
    for (GenFeature genFeature : genClass.getToStringGenFeatures()) {
5067
    if (first) { first = false;
5257
    if (first) { first = false;
5068
    stringBuffer.append(TEXT_1480);
5258
    stringBuffer.append(TEXT_1540);
5069
    stringBuffer.append(genFeature.getName());
5259
    stringBuffer.append(genFeature.getName());
5070
    stringBuffer.append(TEXT_1481);
5260
    stringBuffer.append(TEXT_1541);
5071
    stringBuffer.append(genModel.getNonNLS());
5261
    stringBuffer.append(genModel.getNonNLS());
5072
    } else {
5262
    } else {
5073
    stringBuffer.append(TEXT_1482);
5263
    stringBuffer.append(TEXT_1542);
5074
    stringBuffer.append(genFeature.getName());
5264
    stringBuffer.append(genFeature.getName());
5075
    stringBuffer.append(TEXT_1483);
5265
    stringBuffer.append(TEXT_1543);
5076
    stringBuffer.append(genModel.getNonNLS());
5266
    stringBuffer.append(genModel.getNonNLS());
5077
    }
5267
    }
5078
    if (genFeature.isUnsettable() && !genFeature.isListType()) {
5268
    if (genFeature.isUnsettable() && !genFeature.isListType()) {
5079
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5269
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5080
    stringBuffer.append(TEXT_1484);
5270
    stringBuffer.append(TEXT_1544);
5081
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5271
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5082
    stringBuffer.append(positiveOffsetCorrection);
5272
    stringBuffer.append(positiveOffsetCorrection);
5083
    stringBuffer.append(TEXT_1485);
5273
    stringBuffer.append(TEXT_1545);
5084
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5274
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5085
    stringBuffer.append(positiveOffsetCorrection);
5275
    stringBuffer.append(positiveOffsetCorrection);
5086
    stringBuffer.append(TEXT_1486);
5276
    stringBuffer.append(TEXT_1546);
5087
    stringBuffer.append(genModel.getNonNLS());
5277
    stringBuffer.append(genModel.getNonNLS());
5088
    } else {
5278
    } else {
5089
    if (genClass.isFlag(genFeature)) {
5279
    if (genClass.isFlag(genFeature)) {
5090
    if (genFeature.isBooleanType()) {
5280
    if (genFeature.isBooleanType()) {
5091
    stringBuffer.append(TEXT_1487);
5281
    stringBuffer.append(TEXT_1547);
5092
    if (genClass.isESetFlag(genFeature)) {
5282
    if (genClass.isESetFlag(genFeature)) {
5093
    stringBuffer.append(TEXT_1488);
5283
    stringBuffer.append(TEXT_1548);
5094
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5284
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5095
    stringBuffer.append(TEXT_1489);
5285
    stringBuffer.append(TEXT_1549);
5096
    stringBuffer.append(genFeature.getUpperName());
5286
    stringBuffer.append(genFeature.getUpperName());
5097
    stringBuffer.append(TEXT_1490);
5287
    stringBuffer.append(TEXT_1550);
5098
    } else {
5288
    } else {
5099
    stringBuffer.append(genFeature.getUncapName());
5289
    stringBuffer.append(genFeature.getUncapName());
5100
    stringBuffer.append(TEXT_1491);
5290
    stringBuffer.append(TEXT_1551);
5101
    }
5291
    }
5102
    stringBuffer.append(TEXT_1492);
5292
    stringBuffer.append(TEXT_1552);
5103
    stringBuffer.append(genClass.getFlagsField(genFeature));
5293
    stringBuffer.append(genClass.getFlagsField(genFeature));
5104
    stringBuffer.append(TEXT_1493);
5294
    stringBuffer.append(TEXT_1553);
5105
    stringBuffer.append(genFeature.getUpperName());
5295
    stringBuffer.append(genFeature.getUpperName());
5106
    stringBuffer.append(TEXT_1494);
5296
    stringBuffer.append(TEXT_1554);
5107
    stringBuffer.append(genModel.getNonNLS());
5297
    stringBuffer.append(genModel.getNonNLS());
5108
    } else {
5298
    } else {
5109
    stringBuffer.append(TEXT_1495);
5299
    stringBuffer.append(TEXT_1555);
5110
    if (genClass.isESetFlag(genFeature)) {
5300
    if (genClass.isESetFlag(genFeature)) {
5111
    stringBuffer.append(TEXT_1496);
5301
    stringBuffer.append(TEXT_1556);
5112
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5302
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5113
    stringBuffer.append(TEXT_1497);
5303
    stringBuffer.append(TEXT_1557);
5114
    stringBuffer.append(genFeature.getUpperName());
5304
    stringBuffer.append(genFeature.getUpperName());
5115
    stringBuffer.append(TEXT_1498);
5305
    stringBuffer.append(TEXT_1558);
5116
    } else {
5306
    } else {
5117
    stringBuffer.append(genFeature.getUncapName());
5307
    stringBuffer.append(genFeature.getUncapName());
5118
    stringBuffer.append(TEXT_1499);
5308
    stringBuffer.append(TEXT_1559);
5119
    }
5309
    }
5120
    stringBuffer.append(TEXT_1500);
5310
    stringBuffer.append(TEXT_1560);
5121
    stringBuffer.append(genFeature.getUpperName());
5311
    stringBuffer.append(genFeature.getUpperName());
5122
    stringBuffer.append(TEXT_1501);
5312
    stringBuffer.append(TEXT_1561);
5123
    stringBuffer.append(genClass.getFlagsField(genFeature));
5313
    stringBuffer.append(genClass.getFlagsField(genFeature));
5124
    stringBuffer.append(TEXT_1502);
5314
    stringBuffer.append(TEXT_1562);
5125
    stringBuffer.append(genFeature.getUpperName());
5315
    stringBuffer.append(genFeature.getUpperName());
5126
    stringBuffer.append(TEXT_1503);
5316
    stringBuffer.append(TEXT_1563);
5127
    stringBuffer.append(genFeature.getUpperName());
5317
    stringBuffer.append(genFeature.getUpperName());
5128
    stringBuffer.append(TEXT_1504);
5318
    stringBuffer.append(TEXT_1564);
5129
    stringBuffer.append(genModel.getNonNLS());
5319
    stringBuffer.append(genModel.getNonNLS());
5130
    }
5320
    }
5131
    } else {
5321
    } else {
5132
    stringBuffer.append(TEXT_1505);
5322
    stringBuffer.append(TEXT_1565);
5133
    if (genClass.isESetFlag(genFeature)) {
5323
    if (genClass.isESetFlag(genFeature)) {
5134
    stringBuffer.append(TEXT_1506);
5324
    stringBuffer.append(TEXT_1566);
5135
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5325
    stringBuffer.append(genClass.getESetFlagsField(genFeature));
5136
    stringBuffer.append(TEXT_1507);
5326
    stringBuffer.append(TEXT_1567);
5137
    stringBuffer.append(genFeature.getUpperName());
5327
    stringBuffer.append(genFeature.getUpperName());
5138
    stringBuffer.append(TEXT_1508);
5328
    stringBuffer.append(TEXT_1568);
5139
    } else {
5329
    } else {
5140
    stringBuffer.append(genFeature.getUncapName());
5330
    stringBuffer.append(genFeature.getUncapName());
5141
    stringBuffer.append(TEXT_1509);
5331
    stringBuffer.append(TEXT_1569);
5142
    }
5332
    }
5143
    stringBuffer.append(TEXT_1510);
5333
    stringBuffer.append(TEXT_1570);
5144
    stringBuffer.append(genFeature.getSafeName());
5334
    stringBuffer.append(genFeature.getSafeName());
5145
    stringBuffer.append(TEXT_1511);
5335
    stringBuffer.append(TEXT_1571);
5146
    stringBuffer.append(genModel.getNonNLS());
5336
    stringBuffer.append(genModel.getNonNLS());
5147
    }
5337
    }
5148
    }
5338
    }
5149
    } else {
5339
    } else {
5150
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5340
    if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
5151
    stringBuffer.append(TEXT_1512);
5341
    stringBuffer.append(TEXT_1572);
5152
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5342
    stringBuffer.append(genClass.getQualifiedFeatureID(genFeature));
5153
    stringBuffer.append(positiveOffsetCorrection);
5343
    stringBuffer.append(positiveOffsetCorrection);
5154
    if (!genFeature.isListType() && !genFeature.isReferenceType()){
5344
    if (!genFeature.isListType() && !genFeature.isReferenceType()){
5155
    stringBuffer.append(TEXT_1513);
5345
    stringBuffer.append(TEXT_1573);
5156
    stringBuffer.append(genFeature.getEDefault());
5346
    stringBuffer.append(genFeature.getEDefault());
5157
    }
5347
    }
5158
    stringBuffer.append(TEXT_1514);
5348
    stringBuffer.append(TEXT_1574);
5159
    } else {
5349
    } else {
5160
    if (genClass.isFlag(genFeature)) {
5350
    if (genClass.isFlag(genFeature)) {
5161
    if (genFeature.isBooleanType()) {
5351
    if (genFeature.isBooleanType()) {
5162
    stringBuffer.append(TEXT_1515);
5352
    stringBuffer.append(TEXT_1575);
5163
    stringBuffer.append(genClass.getFlagsField(genFeature));
5353
    stringBuffer.append(genClass.getFlagsField(genFeature));
5164
    stringBuffer.append(TEXT_1516);
5354
    stringBuffer.append(TEXT_1576);
5165
    stringBuffer.append(genFeature.getUpperName());
5355
    stringBuffer.append(genFeature.getUpperName());
5166
    stringBuffer.append(TEXT_1517);
5356
    stringBuffer.append(TEXT_1577);
5167
    } else {
5357
    } else {
5168
    stringBuffer.append(TEXT_1518);
5358
    stringBuffer.append(TEXT_1578);
5169
    stringBuffer.append(genFeature.getUpperName());
5359
    stringBuffer.append(genFeature.getUpperName());
5170
    stringBuffer.append(TEXT_1519);
5360
    stringBuffer.append(TEXT_1579);
5171
    stringBuffer.append(genClass.getFlagsField(genFeature));
5361
    stringBuffer.append(genClass.getFlagsField(genFeature));
5172
    stringBuffer.append(TEXT_1520);
5362
    stringBuffer.append(TEXT_1580);
5173
    stringBuffer.append(genFeature.getUpperName());
5363
    stringBuffer.append(genFeature.getUpperName());
5174
    stringBuffer.append(TEXT_1521);
5364
    stringBuffer.append(TEXT_1581);
5175
    stringBuffer.append(genFeature.getUpperName());
5365
    stringBuffer.append(genFeature.getUpperName());
5176
    stringBuffer.append(TEXT_1522);
5366
    stringBuffer.append(TEXT_1582);
5177
    }
5367
    }
5178
    } else {
5368
    } else {
5179
    stringBuffer.append(TEXT_1523);
5369
    stringBuffer.append(TEXT_1583);
5180
    stringBuffer.append(genFeature.getSafeName());
5370
    stringBuffer.append(genFeature.getSafeName());
5181
    stringBuffer.append(TEXT_1524);
5371
    stringBuffer.append(TEXT_1584);
5182
    }
5372
    }
5183
    }
5373
    }
5184
    }
5374
    }
5185
    }
5375
    }
5186
    }
5376
    }
5187
    stringBuffer.append(TEXT_1525);
5377
    stringBuffer.append(TEXT_1585);
5188
    }
5378
    }
5189
    if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
5379
    if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
5190
    String objectType = genModel.getImportedName("java.lang.Object");
5380
    String objectType = genModel.getImportedName("java.lang.Object");
5191
    String keyType = isJDK50 ? keyFeature.getObjectType(genClass) : objectType;
5381
    String keyType = isJDK50 ? keyFeature.getObjectType(genClass) : objectType;
5192
    String valueType = isJDK50 ? valueFeature.getObjectType(genClass) : objectType;
5382
    String valueType = isJDK50 ? valueFeature.getObjectType(genClass) : objectType;
5193
    String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (isJDK50 ? "<" + keyType + ", " + valueType + ">" : "");
5383
    String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (isJDK50 ? "<" + keyType + ", " + valueType + ">" : "");
5194
    stringBuffer.append(TEXT_1526);
5384
    stringBuffer.append(TEXT_1586);
5195
    stringBuffer.append(objectType);
5385
    stringBuffer.append(objectType);
5196
    stringBuffer.append(TEXT_1527);
5386
    stringBuffer.append(TEXT_1587);
5197
    stringBuffer.append(keyType);
5387
    stringBuffer.append(keyType);
5198
    stringBuffer.append(TEXT_1528);
5388
    stringBuffer.append(TEXT_1588);
5199
    if (!isJDK50 && keyFeature.isPrimitiveType()) {
5389
    if (!isJDK50 && keyFeature.isPrimitiveType()) {
5200
    stringBuffer.append(TEXT_1529);
5390
    stringBuffer.append(TEXT_1589);
5201
    stringBuffer.append(keyFeature.getObjectType(genClass));
5391
    stringBuffer.append(keyFeature.getObjectType(genClass));
5202
    stringBuffer.append(TEXT_1530);
5392
    stringBuffer.append(TEXT_1590);
5203
    } else {
5393
    } else {
5204
    stringBuffer.append(TEXT_1531);
5394
    stringBuffer.append(TEXT_1591);
5205
    }
5395
    }
5206
    stringBuffer.append(TEXT_1532);
5396
    stringBuffer.append(TEXT_1592);
5207
    stringBuffer.append(keyType);
5397
    stringBuffer.append(keyType);
5208
    stringBuffer.append(TEXT_1533);
5398
    stringBuffer.append(TEXT_1593);
5209
    if (keyFeature.isListType()) {
5399
    if (keyFeature.isListType()) {
5210
    stringBuffer.append(TEXT_1534);
5400
    stringBuffer.append(TEXT_1594);
5211
    if (!genModel.useGenerics()) {
5401
    if (!genModel.useGenerics()) {
5212
    stringBuffer.append(TEXT_1535);
5402
    stringBuffer.append(TEXT_1595);
5213
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5403
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5214
    stringBuffer.append(TEXT_1536);
5404
    stringBuffer.append(TEXT_1596);
5215
    }
5405
    }
5216
    stringBuffer.append(TEXT_1537);
5406
    stringBuffer.append(TEXT_1597);
5217
    } else if (isJDK50) {
5407
    } else if (isJDK50) {
5218
    stringBuffer.append(TEXT_1538);
5408
    stringBuffer.append(TEXT_1598);
5219
    } else if (keyFeature.isPrimitiveType()) {
5409
    } else if (keyFeature.isPrimitiveType()) {
5220
    stringBuffer.append(TEXT_1539);
5410
    stringBuffer.append(TEXT_1599);
5221
    stringBuffer.append(keyFeature.getObjectType(genClass));
5411
    stringBuffer.append(keyFeature.getObjectType(genClass));
5222
    stringBuffer.append(TEXT_1540);
5412
    stringBuffer.append(TEXT_1600);
5223
    stringBuffer.append(keyFeature.getPrimitiveValueFunction());
5413
    stringBuffer.append(keyFeature.getPrimitiveValueFunction());
5224
    stringBuffer.append(TEXT_1541);
5414
    stringBuffer.append(TEXT_1601);
5225
    } else {
5415
    } else {
5226
    stringBuffer.append(TEXT_1542);
5416
    stringBuffer.append(TEXT_1602);
5227
    stringBuffer.append(keyFeature.getImportedType(genClass));
5417
    stringBuffer.append(keyFeature.getImportedType(genClass));
5228
    stringBuffer.append(TEXT_1543);
5418
    stringBuffer.append(TEXT_1603);
5229
    }
5419
    }
5230
    stringBuffer.append(TEXT_1544);
5420
    stringBuffer.append(TEXT_1604);
5231
    stringBuffer.append(valueType);
5421
    stringBuffer.append(valueType);
5232
    stringBuffer.append(TEXT_1545);
5422
    stringBuffer.append(TEXT_1605);
5233
    if (!isJDK50 && valueFeature.isPrimitiveType()) {
5423
    if (!isJDK50 && valueFeature.isPrimitiveType()) {
5234
    stringBuffer.append(TEXT_1546);
5424
    stringBuffer.append(TEXT_1606);
5235
    stringBuffer.append(valueFeature.getObjectType(genClass));
5425
    stringBuffer.append(valueFeature.getObjectType(genClass));
5236
    stringBuffer.append(TEXT_1547);
5426
    stringBuffer.append(TEXT_1607);
5237
    } else {
5427
    } else {
5238
    stringBuffer.append(TEXT_1548);
5428
    stringBuffer.append(TEXT_1608);
5239
    }
5429
    }
5240
    stringBuffer.append(TEXT_1549);
5430
    stringBuffer.append(TEXT_1609);
5241
    stringBuffer.append(valueType);
5431
    stringBuffer.append(valueType);
5242
    stringBuffer.append(TEXT_1550);
5432
    stringBuffer.append(TEXT_1610);
5243
    stringBuffer.append(valueType);
5433
    stringBuffer.append(valueType);
5244
    stringBuffer.append(TEXT_1551);
5434
    stringBuffer.append(TEXT_1611);
5245
    stringBuffer.append(valueType);
5435
    stringBuffer.append(valueType);
5246
    stringBuffer.append(TEXT_1552);
5436
    stringBuffer.append(TEXT_1612);
5247
    if (valueFeature.isListType()) {
5437
    if (valueFeature.isListType()) {
5248
    stringBuffer.append(TEXT_1553);
5438
    stringBuffer.append(TEXT_1613);
5249
    if (!genModel.useGenerics()) {
5439
    if (!genModel.useGenerics()) {
5250
    stringBuffer.append(TEXT_1554);
5440
    stringBuffer.append(TEXT_1614);
5251
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5441
    stringBuffer.append(genModel.getImportedName("java.util.Collection"));
5252
    stringBuffer.append(TEXT_1555);
5442
    stringBuffer.append(TEXT_1615);
5253
    }
5443
    }
5254
    stringBuffer.append(TEXT_1556);
5444
    stringBuffer.append(TEXT_1616);
5255
    } else if (isJDK50) {
5445
    } else if (isJDK50) {
5256
    stringBuffer.append(TEXT_1557);
5446
    stringBuffer.append(TEXT_1617);
5257
    } else if (valueFeature.isPrimitiveType()) {
5447
    } else if (valueFeature.isPrimitiveType()) {
5258
    stringBuffer.append(TEXT_1558);
5448
    stringBuffer.append(TEXT_1618);
5259
    stringBuffer.append(valueFeature.getObjectType(genClass));
5449
    stringBuffer.append(valueFeature.getObjectType(genClass));
5260
    stringBuffer.append(TEXT_1559);
5450
    stringBuffer.append(TEXT_1619);
5261
    stringBuffer.append(valueFeature.getPrimitiveValueFunction());
5451
    stringBuffer.append(valueFeature.getPrimitiveValueFunction());
5262
    stringBuffer.append(TEXT_1560);
5452
    stringBuffer.append(TEXT_1620);
5263
    } else {
5453
    } else {
5264
    stringBuffer.append(TEXT_1561);
5454
    stringBuffer.append(TEXT_1621);
5265
    stringBuffer.append(valueFeature.getImportedType(genClass));
5455
    stringBuffer.append(valueFeature.getImportedType(genClass));
5266
    stringBuffer.append(TEXT_1562);
5456
    stringBuffer.append(TEXT_1622);
5267
    }
5457
    }
5268
    stringBuffer.append(TEXT_1563);
5458
    stringBuffer.append(TEXT_1623);
5269
    if (genModel.useGenerics()) {
5459
    if (genModel.useGenerics()) {
5270
    stringBuffer.append(TEXT_1564);
5460
    stringBuffer.append(TEXT_1624);
5271
    }
5461
    }
5272
    stringBuffer.append(TEXT_1565);
5462
    stringBuffer.append(TEXT_1625);
5273
    stringBuffer.append(eMapType);
5463
    stringBuffer.append(eMapType);
5274
    stringBuffer.append(TEXT_1566);
5464
    stringBuffer.append(TEXT_1626);
5275
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
5465
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
5276
    stringBuffer.append(TEXT_1567);
5466
    stringBuffer.append(TEXT_1627);
5277
    stringBuffer.append(eMapType);
5467
    stringBuffer.append(eMapType);
5278
    stringBuffer.append(TEXT_1568);
5468
    stringBuffer.append(TEXT_1628);
5279
    }
5469
    }
5280
    stringBuffer.append(TEXT_1569);
5470
    stringBuffer.append(TEXT_1629);
5281
    stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
5471
    stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
5282
    // TODO fix the space above
5472
    // TODO fix the space above
5283
    genModel.emitSortedImports();
5473
    genModel.emitSortedImports();
5284
    stringBuffer.append(TEXT_1570);
5474
    stringBuffer.append(TEXT_1630);
5285
    return stringBuffer.toString();
5475
    return stringBuffer.toString();
5286
  }
5476
  }
5287
}
5477
}
(-)src/org/eclipse/emf/codegen/ecore/templates/model/ValidatorClass.java (-792 / +1061 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 = ".Registry registry = getValidationDelegateRegistry(";
501
  protected final String TEXT_483 = NL + "\t\t\t\t\t\t new Object[] { ";
501
  protected final String TEXT_483 = ");" + NL + "\t\t";
502
  protected final String TEXT_484 = " }," + NL + "\t\t\t\t\t\t context));";
502
  protected final String TEXT_484 = " delegate = registry.getValidationDelegate(";
503
  protected final String TEXT_485 = NL + "\t\t\t\t\t(new ";
503
  protected final String TEXT_485 = ".createURI(\"";
504
  protected final String TEXT_486 = NL + "\t\t\t\t\t\t(";
504
  protected final String TEXT_486 = "\"));";
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 = NL + "\t\tif (delegate != null) {" + NL + "\t\t\ttry {" + NL + "\t\t\t\tif (!delegate.validate(";
506
  protected final String TEXT_488 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
506
  protected final String TEXT_488 = "__";
507
  protected final String TEXT_489 = "\", getValueLabel(";
507
  protected final String TEXT_489 = "__EXP, ";
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 = ")) {" + NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
511
  protected final String TEXT_493 = NL + "\t\t\t\t\t\t new Object[] { ";
511
  protected final String TEXT_493 = ".add" + NL + "\t\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t\t(";
512
  protected final String TEXT_494 = " }));";
512
  protected final String TEXT_494 = ".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\",";
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 = NL + "\t\t\t\t\t\t\t\t new Object[] { \"";
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 = "\", getValueLabel(";
515
  protected final String TEXT_497 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
515
  protected final String TEXT_497 = ", ";
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 = NL + "\t\t\t\t\t\t\t\t new Object[] { ";
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 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 (";
520
  protected final String TEXT_502 = "\", getObjectLabel(";
520
  protected final String TEXT_502 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
521
  protected final String TEXT_503 = ", ";
521
  protected final String TEXT_503 = ".add" + NL + "\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t(";
522
  protected final String TEXT_504 = ") },";
522
  protected final String TEXT_504 = ".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\",";
523
  protected final String TEXT_505 = NL + "\t\t\t\t\t\t new Object[] { ";
523
  protected final String TEXT_505 = NL + "\t\t\t\t\t\t\t new Object[] { \"";
524
  protected final String TEXT_506 = " }," + NL + "\t\t\t\t\t\t context));";
524
  protected final String TEXT_506 = "\", getValueLabel(";
525
  protected final String TEXT_507 = NL + "\t\t\t\t\t(new ";
525
  protected final String TEXT_507 = ", ";
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 = "), throwable.getLocalizedMessage() },";
528
  protected final String TEXT_510 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
528
  protected final String TEXT_510 = NL + "\t\t\t\t\t\t\t new Object[] { ";
529
  protected final String TEXT_511 = "\", getObjectLabel(";
529
  protected final String TEXT_511 = " }," + 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";
530
  protected final String TEXT_512 = ", ";
530
  protected final String TEXT_512 = ".add" + NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
531
  protected final String TEXT_513 = ") }),";
531
  protected final String TEXT_513 = ".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\",";
532
  protected final String TEXT_514 = NL + "\t\t\t\t\t\t new Object[] { ";
532
  protected final String TEXT_514 = NL + "\t\t\t\t\t\t new Object[] { \"";
533
  protected final String TEXT_515 = " }));";
533
  protected final String TEXT_515 = "\", getValueLabel(";
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 = ", ";
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 = NL + "\t\t\t\t\t\t new Object[] { ";
539
  protected final String TEXT_521 = ", ";
539
  protected final String TEXT_521 = " }," + NL + "\t\t\t\t\t\t context));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
540
  protected final String TEXT_522 = ");";
540
  protected final String TEXT_522 = 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 (";
541
  protected final String TEXT_523 = NL + "\t\treturn ";
541
  protected final String TEXT_523 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
542
  protected final String TEXT_524 = ".";
542
  protected final String TEXT_524 = ".add";
543
  protected final String TEXT_525 = "(";
543
  protected final String TEXT_525 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
544
  protected final String TEXT_526 = ", ";
544
  protected final String TEXT_526 = ".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\",";
545
  protected final String TEXT_527 = ");";
545
  protected final String TEXT_527 = NL + "\t\t\t\t\t\t new Object[] { \"";
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 = "\", getValueLabel(";
547
  protected final String TEXT_529 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
547
  protected final String TEXT_529 = ", ";
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 = NL + "\t\t\t\t\t\t new Object[] { ";
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 context));";
552
  protected final String TEXT_534 = "\", getObjectLabel(";
552
  protected final String TEXT_534 = NL + "\t\t\t\t\t(new ";
553
  protected final String TEXT_535 = ", ";
553
  protected final String TEXT_535 = NL + "\t\t\t\t\t\t(";
554
  protected final String TEXT_536 = ") },";
554
  protected final String TEXT_536 = ".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 ";
555
  protected final String TEXT_537 = NL + "\t\t\t\t\t\t new Object[] { ";
555
  protected final String TEXT_537 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
556
  protected final String TEXT_538 = " }," + NL + "\t\t\t\t\t\t context));";
556
  protected final String TEXT_538 = "\", getValueLabel(";
557
  protected final String TEXT_539 = NL + "\t\t\t\t\t(new ";
557
  protected final String TEXT_539 = ", ";
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 = NL + "\t\t\t\t\t\t new Object[] { ";
561
  protected final String TEXT_543 = "\", getObjectLabel(";
561
  protected final String TEXT_543 = " }));";
562
  protected final String TEXT_544 = ", ";
562
  protected final String TEXT_544 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
563
  protected final String TEXT_545 = ") }),";
563
  protected final String TEXT_545 = 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 (";
564
  protected final String TEXT_546 = NL + "\t\t\t\t\t\t new Object[] { ";
564
  protected final String TEXT_546 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
565
  protected final String TEXT_547 = " }));";
565
  protected final String TEXT_547 = ".add";
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 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
567
  protected final String TEXT_549 = NL + "\t}" + NL;
567
  protected final String TEXT_549 = ".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\",";
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 = NL + "\t\t\t\t\t\t new Object[] { \"";
569
  protected final String TEXT_551 = NL + "\t@Override";
569
  protected final String TEXT_551 = "\", getObjectLabel(";
570
  protected final String TEXT_552 = NL + "\tpublic ";
570
  protected final String TEXT_552 = ", ";
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 = NL + "\t\t\t\t\t\t new Object[] { ";
573
  protected final String TEXT_555 = ".INSTANCE;";
573
  protected final String TEXT_555 = " }," + NL + "\t\t\t\t\t\t context));";
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(new ";
575
  protected final String TEXT_557 = NL + "\t}" + NL;
575
  protected final String TEXT_557 = NL + "\t\t\t\t\t\t(";
576
  protected final String TEXT_558 = NL + "} //";
576
  protected final String TEXT_558 = ".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 ";
577
  protected final String TEXT_559 = NL;
577
  protected final String TEXT_559 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
578
  protected final String TEXT_560 = "\", getObjectLabel(";
579
  protected final String TEXT_561 = ", ";
580
  protected final String TEXT_562 = ") }),";
581
  protected final String TEXT_563 = NL + "\t\t\t\t\t\t new Object[] { ";
582
  protected final String TEXT_564 = " }));";
583
  protected final String TEXT_565 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn ";
584
  protected final String TEXT_566 = "validate";
585
  protected final String TEXT_567 = "_";
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 = NL + "\t\treturn ";
591
  protected final String TEXT_573 = ".";
592
  protected final String TEXT_574 = "(";
593
  protected final String TEXT_575 = ", ";
594
  protected final String TEXT_576 = ");";
595
  protected final String TEXT_577 = NL + "\t\t";
596
  protected final String TEXT_578 = ".Registry registry = getValidationDelegateRegistry(";
597
  protected final String TEXT_579 = ");" + NL + "\t\t";
598
  protected final String TEXT_580 = " delegate = registry.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 = ")) {" + NL + "\t\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t\t";
607
  protected final String TEXT_589 = ".add" + NL + "\t\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t\t(";
608
  protected final String TEXT_590 = ".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\",";
609
  protected final String TEXT_591 = NL + "\t\t\t\t\t\t\t\t new Object[] { \"";
610
  protected final String TEXT_592 = "\", getObjectLabel(";
611
  protected final String TEXT_593 = ", ";
612
  protected final String TEXT_594 = ") },";
613
  protected final String TEXT_595 = NL + "\t\t\t\t\t\t\t\t new Object[] { ";
614
  protected final String TEXT_596 = " }," + 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 (";
615
  protected final String TEXT_597 = " throwable) {" + NL + "\t\t\t\tif (diagnostics != null) {" + NL + "\t\t\t\t\t";
616
  protected final String TEXT_598 = ".add" + NL + "\t\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t\t(";
617
  protected final String TEXT_599 = ".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\",";
618
  protected final String TEXT_600 = NL + "\t\t\t\t\t\t\t new Object[] { \"";
619
  protected final String TEXT_601 = "\", getObjectLabel(";
620
  protected final String TEXT_602 = ", ";
621
  protected final String TEXT_603 = "), throwable.getLocalizedMessage() },";
622
  protected final String TEXT_604 = NL + "\t\t\t\t\t\t\t new Object[] { ";
623
  protected final String TEXT_605 = " }," + 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";
624
  protected final String TEXT_606 = ".add" + NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
625
  protected final String TEXT_607 = ".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\",";
626
  protected final String TEXT_608 = NL + "\t\t\t\t\t\t new Object[] { \"";
627
  protected final String TEXT_609 = "\", getObjectLabel(";
628
  protected final String TEXT_610 = ", ";
629
  protected final String TEXT_611 = "), \"";
630
  protected final String TEXT_612 = "\" },";
631
  protected final String TEXT_613 = NL + "\t\t\t\t\t\t new Object[] { ";
632
  protected final String TEXT_614 = " }," + NL + "\t\t\t\t\t\t context));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}";
633
  protected final String TEXT_615 = 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 (";
634
  protected final String TEXT_616 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
635
  protected final String TEXT_617 = ".add";
636
  protected final String TEXT_618 = NL + "\t\t\t\t\t(createDiagnostic" + NL + "\t\t\t\t\t\t(";
637
  protected final String TEXT_619 = ".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\",";
638
  protected final String TEXT_620 = NL + "\t\t\t\t\t\t new Object[] { \"";
639
  protected final String TEXT_621 = "\", getObjectLabel(";
640
  protected final String TEXT_622 = ", ";
641
  protected final String TEXT_623 = ") },";
642
  protected final String TEXT_624 = NL + "\t\t\t\t\t\t new Object[] { ";
643
  protected final String TEXT_625 = " }," + NL + "\t\t\t\t\t\t context));";
644
  protected final String TEXT_626 = NL + "\t\t\t\t\t(new ";
645
  protected final String TEXT_627 = NL + "\t\t\t\t\t\t(";
646
  protected final String TEXT_628 = ".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 ";
647
  protected final String TEXT_629 = ".INSTANCE.getString(\"_UI_GenericConstraint_diagnostic\", new Object[] { \"";
648
  protected final String TEXT_630 = "\", getObjectLabel(";
649
  protected final String TEXT_631 = ", ";
650
  protected final String TEXT_632 = ") }),";
651
  protected final String TEXT_633 = NL + "\t\t\t\t\t\t new Object[] { ";
652
  protected final String TEXT_634 = " }));";
653
  protected final String TEXT_635 = NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
654
  protected final String TEXT_636 = NL + "\t}" + NL;
655
  protected final String TEXT_637 = 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 */";
656
  protected final String TEXT_638 = NL + "\t@Override";
657
  protected final String TEXT_639 = NL + "\tpublic ";
658
  protected final String TEXT_640 = " getResourceLocator()" + NL + "\t{";
659
  protected final String TEXT_641 = NL + "\t\treturn ";
660
  protected final String TEXT_642 = ".INSTANCE;";
661
  protected final String TEXT_643 = 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();";
662
  protected final String TEXT_644 = NL + "\t}" + NL;
663
  protected final String TEXT_645 = NL + "} //";
664
  protected final String TEXT_646 = NL;
578
665
579
  public String generate(Object argument)
666
  public String generate(Object argument)
580
  {
667
  {
Lines 583-589 Link Here
583
/**
670
/**
584
 * <copyright>
671
 * <copyright>
585
 *
672
 *
586
 * Copyright (c) 2002-2006 IBM Corporation and others.
673
 * Copyright (c) 2002-2009 IBM Corporation and others.
587
 * All rights reserved.   This program and the accompanying materials
674
 * All rights reserved.   This program and the accompanying materials
588
 * are made available under the terms of the Eclipse Public License v1.0
675
 * are made available under the terms of the Eclipse Public License v1.0
589
 * which accompanies this distribution, and is available at
676
 * which accompanies this distribution, and is available at
Lines 623-628 Link Here
623
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");
710
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");
624
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");
711
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");
625
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");
712
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");
713
    genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.ValidationDelegate");
626
    stringBuffer.append(TEXT_8);
714
    stringBuffer.append(TEXT_8);
627
    stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
715
    stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
628
    stringBuffer.append(TEXT_9);
716
    stringBuffer.append(TEXT_9);
Lines 926-1230 Link Here
926
    stringBuffer.append(TEXT_141);
1014
    stringBuffer.append(TEXT_141);
927
    }
1015
    }
928
    }
1016
    }
1017
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
929
    stringBuffer.append(TEXT_142);
1018
    stringBuffer.append(TEXT_142);
930
    stringBuffer.append(constraint);
1019
    stringBuffer.append(constraint);
931
    stringBuffer.append(TEXT_143);
1020
    stringBuffer.append(TEXT_143);
932
    stringBuffer.append(genClassifier.getFormattedName());
1021
    stringBuffer.append(genClassifier.getFormattedName());
933
    stringBuffer.append(TEXT_144);
1022
    stringBuffer.append(TEXT_144);
934
    stringBuffer.append(genClassifier.getName());
1023
    stringBuffer.append(genModel.getImportedName("java.lang.String"));
935
    stringBuffer.append(TEXT_145);
1024
    stringBuffer.append(TEXT_145);
936
    stringBuffer.append(constraint);
1025
    stringBuffer.append(genClassifier.getClassifierID());
937
    stringBuffer.append(TEXT_146);
1026
    stringBuffer.append(TEXT_146);
938
    stringBuffer.append(genClassifier.getImportedWildcardInstanceClassName());
1027
    stringBuffer.append(CodeGenUtil.upperName(constraint));
939
    stringBuffer.append(TEXT_147);
1028
    stringBuffer.append(TEXT_147);
940
    stringBuffer.append(genClassifier.getSafeUncapName());
1029
    stringBuffer.append(genClassifier.getValidationExpression(constraint, genModel.getIndentation(stringBuffer)));
941
    stringBuffer.append(TEXT_148);
1030
    stringBuffer.append(TEXT_148);
942
    stringBuffer.append(diagnostics);
1031
    stringBuffer.append(genModel.getNonNLS());
943
    stringBuffer.append(TEXT_149);
1032
    stringBuffer.append(TEXT_149);
944
    stringBuffer.append(_Map);
1033
    }
945
    stringBuffer.append(TEXT_150);
1034
    stringBuffer.append(TEXT_150);
946
    stringBuffer.append(context);
1035
    stringBuffer.append(constraint);
947
    stringBuffer.append(TEXT_151);
1036
    stringBuffer.append(TEXT_151);
1037
    stringBuffer.append(genClassifier.getFormattedName());
1038
    stringBuffer.append(TEXT_152);
1039
    stringBuffer.append(genClassifier.getName());
1040
    stringBuffer.append(TEXT_153);
1041
    stringBuffer.append(constraint);
1042
    stringBuffer.append(TEXT_154);
1043
    stringBuffer.append(genClassifier.getImportedWildcardInstanceClassName());
1044
    stringBuffer.append(TEXT_155);
1045
    stringBuffer.append(genClassifier.getSafeUncapName());
1046
    stringBuffer.append(TEXT_156);
1047
    stringBuffer.append(diagnostics);
1048
    stringBuffer.append(TEXT_157);
1049
    stringBuffer.append(_Map);
1050
    stringBuffer.append(TEXT_158);
1051
    stringBuffer.append(context);
1052
    stringBuffer.append(TEXT_159);
948
    if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;
1053
    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.";
1054
    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);
1055
    stringBuffer.append(TEXT_160);
951
    stringBuffer.append(result);
1056
    stringBuffer.append(result);
952
    stringBuffer.append(TEXT_153);
1057
    stringBuffer.append(TEXT_161);
953
    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
1058
    stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
954
    stringBuffer.append(singleWildcard);
1059
    stringBuffer.append(singleWildcard);
955
    stringBuffer.append(TEXT_154);
1060
    stringBuffer.append(TEXT_162);
956
    stringBuffer.append(genClassifier.getSafeUncapName());
1061
    stringBuffer.append(genClassifier.getSafeUncapName());
957
    stringBuffer.append(TEXT_155);
1062
    stringBuffer.append(TEXT_163);
958
    if (itemType.getGenPackage().hasConstraints()) {
1063
    if (itemType.getGenPackage().hasConstraints()) {
959
    stringBuffer.append(TEXT_156);
1064
    stringBuffer.append(TEXT_164);
960
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1065
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
961
    stringBuffer.append(TEXT_157);
1066
    stringBuffer.append(TEXT_165);
962
    stringBuffer.append(itemDelegate);
1067
    stringBuffer.append(itemDelegate);
963
    stringBuffer.append(TEXT_158);
1068
    stringBuffer.append(TEXT_166);
964
    stringBuffer.append(itemType.getName());
1069
    stringBuffer.append(itemType.getName());
965
    stringBuffer.append(TEXT_159);
1070
    stringBuffer.append(TEXT_167);
966
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1071
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
967
    stringBuffer.append(TEXT_160);
1072
    stringBuffer.append(TEXT_168);
968
    }
1073
    }
969
    if (!itemType.isObjectType()) {
1074
    if (!itemType.isObjectType()) {
970
    stringBuffer.append(TEXT_161);
1075
    stringBuffer.append(TEXT_169);
971
    stringBuffer.append(itemType.getObjectInstanceClassName());
1076
    stringBuffer.append(itemType.getObjectInstanceClassName());
972
    stringBuffer.append(TEXT_162);
1077
    stringBuffer.append(TEXT_170);
973
    }
1078
    }
974
    stringBuffer.append(item);
1079
    stringBuffer.append(item);
975
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1080
    if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
976
    stringBuffer.append(TEXT_163);
1081
    stringBuffer.append(TEXT_171);
977
    stringBuffer.append(itemType.getPrimitiveValueFunction());
1082
    stringBuffer.append(itemType.getPrimitiveValueFunction());
978
    stringBuffer.append(TEXT_164);
1083
    stringBuffer.append(TEXT_172);
979
    }
1084
    }
980
    stringBuffer.append(TEXT_165);
1085
    stringBuffer.append(TEXT_173);
981
    stringBuffer.append(diagnostics);
1086
    stringBuffer.append(diagnostics);
982
    stringBuffer.append(TEXT_166);
1087
    stringBuffer.append(TEXT_174);
983
    stringBuffer.append(context);
1088
    stringBuffer.append(context);
984
    stringBuffer.append(TEXT_167);
1089
    stringBuffer.append(TEXT_175);
985
    } else {
1090
    } else {
986
    stringBuffer.append(TEXT_168);
1091
    stringBuffer.append(TEXT_176);
987
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1092
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
988
    stringBuffer.append(TEXT_169);
1093
    stringBuffer.append(TEXT_177);
989
    }
1094
    }
990
    stringBuffer.append(TEXT_170);
1095
    stringBuffer.append(TEXT_178);
991
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
1096
    stringBuffer.append(itemType.getQualifiedClassifierAccessor());
992
    stringBuffer.append(TEXT_171);
1097
    stringBuffer.append(TEXT_179);
993
    stringBuffer.append(diagnostics);
1098
    stringBuffer.append(diagnostics);
994
    stringBuffer.append(TEXT_172);
1099
    stringBuffer.append(TEXT_180);
995
    stringBuffer.append(context);
1100
    stringBuffer.append(context);
996
    stringBuffer.append(TEXT_173);
1101
    stringBuffer.append(TEXT_181);
997
    } else if (constraint.equals("MemberTypes") && !genDataType.getMemberTypes().isEmpty()) {
1102
    } else if (constraint.equals("MemberTypes") && !genDataType.getMemberTypes().isEmpty()) {
998
    stringBuffer.append(TEXT_174);
1103
    stringBuffer.append(TEXT_182);
999
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1104
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1000
    stringBuffer.append(TEXT_175);
1105
    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.";
1106
    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()) {
1107
    if (genDataType.isPrimitiveType()) {
1003
    stringBuffer.append(TEXT_176);
1108
    stringBuffer.append(TEXT_184);
1004
    stringBuffer.append(memberDelegate);
1109
    stringBuffer.append(memberDelegate);
1005
    stringBuffer.append(TEXT_177);
1110
    stringBuffer.append(TEXT_185);
1006
    stringBuffer.append(memberType.getName());
1111
    stringBuffer.append(memberType.getName());
1007
    stringBuffer.append(TEXT_178);
1112
    stringBuffer.append(TEXT_186);
1008
    stringBuffer.append(genClassifier.getSafeUncapName());
1113
    stringBuffer.append(genClassifier.getSafeUncapName());
1009
    stringBuffer.append(TEXT_179);
1114
    stringBuffer.append(TEXT_187);
1010
    stringBuffer.append(context);
1115
    stringBuffer.append(context);
1011
    stringBuffer.append(TEXT_180);
1116
    stringBuffer.append(TEXT_188);
1012
    } else {
1117
    } else {
1013
    stringBuffer.append(TEXT_181);
1118
    stringBuffer.append(TEXT_189);
1014
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1119
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1015
    stringBuffer.append(TEXT_182);
1120
    stringBuffer.append(TEXT_190);
1016
    stringBuffer.append(genClassifier.getSafeUncapName());
1121
    stringBuffer.append(genClassifier.getSafeUncapName());
1017
    stringBuffer.append(TEXT_183);
1122
    stringBuffer.append(TEXT_191);
1018
    if (memberType.getGenPackage().hasConstraints()) {
1123
    if (memberType.getGenPackage().hasConstraints()) {
1019
    stringBuffer.append(TEXT_184);
1124
    stringBuffer.append(TEXT_192);
1020
    stringBuffer.append(memberDelegate);
1125
    stringBuffer.append(memberDelegate);
1021
    stringBuffer.append(TEXT_185);
1126
    stringBuffer.append(TEXT_193);
1022
    stringBuffer.append(memberType.getName());
1127
    stringBuffer.append(memberType.getName());
1023
    stringBuffer.append(TEXT_186);
1128
    stringBuffer.append(TEXT_194);
1024
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1129
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1025
    stringBuffer.append(TEXT_187);
1130
    stringBuffer.append(TEXT_195);
1026
    }
1131
    }
1027
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1132
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1028
    stringBuffer.append(TEXT_188);
1133
    stringBuffer.append(TEXT_196);
1029
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1134
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1030
    stringBuffer.append(TEXT_189);
1135
    stringBuffer.append(TEXT_197);
1031
    }
1136
    }
1032
    stringBuffer.append(genClassifier.getSafeUncapName());
1137
    stringBuffer.append(genClassifier.getSafeUncapName());
1033
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1138
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1034
    stringBuffer.append(TEXT_190);
1139
    stringBuffer.append(TEXT_198);
1035
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1140
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1036
    stringBuffer.append(TEXT_191);
1141
    stringBuffer.append(TEXT_199);
1037
    }
1142
    }
1038
    stringBuffer.append(TEXT_192);
1143
    stringBuffer.append(TEXT_200);
1039
    stringBuffer.append(context);
1144
    stringBuffer.append(context);
1040
    stringBuffer.append(TEXT_193);
1145
    stringBuffer.append(TEXT_201);
1041
    }
1146
    }
1042
    stringBuffer.append(TEXT_194);
1147
    stringBuffer.append(TEXT_202);
1043
    }
1148
    }
1044
    }
1149
    }
1045
    if (genModel.useGenerics()) {
1150
    if (genModel.useGenerics()) {
1046
    stringBuffer.append(TEXT_195);
1151
    stringBuffer.append(TEXT_203);
1047
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1152
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1048
    stringBuffer.append(TEXT_196);
1153
    stringBuffer.append(TEXT_204);
1049
    } else {
1154
    } else {
1050
    stringBuffer.append(TEXT_197);
1155
    stringBuffer.append(TEXT_205);
1051
    stringBuffer.append(genModel.getImportedName("java.util.List"));
1156
    stringBuffer.append(genModel.getImportedName("java.util.List"));
1052
    stringBuffer.append(TEXT_198);
1157
    stringBuffer.append(TEXT_206);
1053
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1158
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1054
    stringBuffer.append(TEXT_199);
1159
    stringBuffer.append(TEXT_207);
1055
    }
1160
    }
1056
    stringBuffer.append(TEXT_200);
1161
    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.";
1162
    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()) {
1163
    if (genDataType.isPrimitiveType()) {
1059
    stringBuffer.append(TEXT_201);
1164
    stringBuffer.append(TEXT_209);
1060
    stringBuffer.append(memberDelegate);
1165
    stringBuffer.append(memberDelegate);
1061
    stringBuffer.append(TEXT_202);
1166
    stringBuffer.append(TEXT_210);
1062
    stringBuffer.append(memberType.getName());
1167
    stringBuffer.append(memberType.getName());
1063
    stringBuffer.append(TEXT_203);
1168
    stringBuffer.append(TEXT_211);
1064
    stringBuffer.append(genClassifier.getSafeUncapName());
1169
    stringBuffer.append(genClassifier.getSafeUncapName());
1065
    stringBuffer.append(TEXT_204);
1170
    stringBuffer.append(TEXT_212);
1066
    stringBuffer.append(context);
1171
    stringBuffer.append(context);
1067
    stringBuffer.append(TEXT_205);
1172
    stringBuffer.append(TEXT_213);
1068
    } else {
1173
    } else {
1069
    stringBuffer.append(TEXT_206);
1174
    stringBuffer.append(TEXT_214);
1070
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1175
    stringBuffer.append(memberType.getQualifiedClassifierAccessor());
1071
    stringBuffer.append(TEXT_207);
1176
    stringBuffer.append(TEXT_215);
1072
    stringBuffer.append(genClassifier.getSafeUncapName());
1177
    stringBuffer.append(genClassifier.getSafeUncapName());
1073
    stringBuffer.append(TEXT_208);
1178
    stringBuffer.append(TEXT_216);
1074
    if (memberType.getGenPackage().hasConstraints()) {
1179
    if (memberType.getGenPackage().hasConstraints()) {
1075
    stringBuffer.append(TEXT_209);
1180
    stringBuffer.append(TEXT_217);
1076
    stringBuffer.append(memberDelegate);
1181
    stringBuffer.append(memberDelegate);
1077
    stringBuffer.append(TEXT_210);
1182
    stringBuffer.append(TEXT_218);
1078
    stringBuffer.append(memberType.getName());
1183
    stringBuffer.append(memberType.getName());
1079
    stringBuffer.append(TEXT_211);
1184
    stringBuffer.append(TEXT_219);
1080
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1185
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1081
    stringBuffer.append(TEXT_212);
1186
    stringBuffer.append(TEXT_220);
1082
    }
1187
    }
1083
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1188
    if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {
1084
    stringBuffer.append(TEXT_213);
1189
    stringBuffer.append(TEXT_221);
1085
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1190
    stringBuffer.append(memberType.getImportedWildcardObjectInstanceClassName());
1086
    stringBuffer.append(TEXT_214);
1191
    stringBuffer.append(TEXT_222);
1087
    }
1192
    }
1088
    stringBuffer.append(genClassifier.getSafeUncapName());
1193
    stringBuffer.append(genClassifier.getSafeUncapName());
1089
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1194
    if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1090
    stringBuffer.append(TEXT_215);
1195
    stringBuffer.append(TEXT_223);
1091
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1196
    stringBuffer.append(memberType.getPrimitiveValueFunction());
1092
    stringBuffer.append(TEXT_216);
1197
    stringBuffer.append(TEXT_224);
1093
    }
1198
    }
1094
    stringBuffer.append(TEXT_217);
1199
    stringBuffer.append(TEXT_225);
1095
    stringBuffer.append(context);
1200
    stringBuffer.append(context);
1096
    stringBuffer.append(TEXT_218);
1201
    stringBuffer.append(TEXT_226);
1097
    }
1202
    }
1098
    stringBuffer.append(TEXT_219);
1203
    stringBuffer.append(TEXT_227);
1099
    }
1204
    }
1100
    }
1205
    }
1101
    stringBuffer.append(TEXT_220);
1206
    stringBuffer.append(TEXT_228);
1102
    } else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {
1207
    } else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {
1103
    stringBuffer.append(TEXT_221);
1208
    stringBuffer.append(TEXT_229);
1104
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1209
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1105
    stringBuffer.append(TEXT_222);
1210
    stringBuffer.append(TEXT_230);
1106
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1211
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1107
    stringBuffer.append(TEXT_223);
1212
    stringBuffer.append(TEXT_231);
1108
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1213
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1109
    stringBuffer.append(TEXT_224);
1214
    stringBuffer.append(TEXT_232);
1110
    }
1215
    }
1111
    stringBuffer.append(genDataType.getSafeUncapName());
1216
    stringBuffer.append(genDataType.getSafeUncapName());
1112
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1217
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1113
    stringBuffer.append(TEXT_225);
1218
    stringBuffer.append(TEXT_233);
1114
    }
1219
    }
1115
    stringBuffer.append(TEXT_226);
1220
    stringBuffer.append(TEXT_234);
1116
    stringBuffer.append(constant);
1221
    stringBuffer.append(constant);
1117
    stringBuffer.append(TEXT_227);
1222
    stringBuffer.append(TEXT_235);
1118
    stringBuffer.append(diagnostics);
1223
    stringBuffer.append(diagnostics);
1119
    stringBuffer.append(TEXT_228);
1224
    stringBuffer.append(TEXT_236);
1120
    stringBuffer.append(context);
1225
    stringBuffer.append(context);
1121
    stringBuffer.append(TEXT_229);
1226
    stringBuffer.append(TEXT_237);
1122
    } else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) { String variable = genDataType.getSafeUncapName();
1227
    } else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) { String variable = genDataType.getSafeUncapName();
1123
    if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) { variable = variable + "Object";
1228
    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);
1229
    stringBuffer.append(TEXT_238);
1141
    stringBuffer.append(result);
1230
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1142
    stringBuffer.append(TEXT_239);
1231
    stringBuffer.append(TEXT_239);
1143
    stringBuffer.append(diagnostics);
1232
    stringBuffer.append(variable);
1144
    stringBuffer.append(TEXT_240);
1233
    stringBuffer.append(TEXT_240);
1145
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1234
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1146
    stringBuffer.append(TEXT_241);
1235
    stringBuffer.append(TEXT_241);
1147
    stringBuffer.append(variable);
1236
    stringBuffer.append(genDataType.getSafeUncapName());
1148
    stringBuffer.append(TEXT_242);
1237
    stringBuffer.append(TEXT_242);
1149
    stringBuffer.append(constant);
1238
    }
1150
    stringBuffer.append(TEXT_243);
1239
    stringBuffer.append(TEXT_243);
1151
    stringBuffer.append(diagnostics);
1240
    stringBuffer.append(result);
1152
    stringBuffer.append(TEXT_244);
1241
    stringBuffer.append(TEXT_244);
1153
    stringBuffer.append(context);
1242
    stringBuffer.append(constant);
1154
    stringBuffer.append(TEXT_245);
1243
    stringBuffer.append(TEXT_245);
1155
    stringBuffer.append(result);
1244
    stringBuffer.append(variable);
1156
    stringBuffer.append(TEXT_246);
1245
    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);
1246
    stringBuffer.append(result);
1247
    stringBuffer.append(TEXT_247);
1248
    stringBuffer.append(diagnostics);
1161
    stringBuffer.append(TEXT_248);
1249
    stringBuffer.append(TEXT_248);
1162
    stringBuffer.append(genDataType.getSafeUncapName());
1250
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1163
    stringBuffer.append(TEXT_249);
1251
    stringBuffer.append(TEXT_249);
1164
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1252
    stringBuffer.append(variable);
1165
    stringBuffer.append(TEXT_250);
1253
    stringBuffer.append(TEXT_250);
1166
    stringBuffer.append(constant);
1254
    stringBuffer.append(constant);
1167
    stringBuffer.append(TEXT_251);
1255
    stringBuffer.append(TEXT_251);
1168
    stringBuffer.append(result);
1169
    stringBuffer.append(TEXT_252);
1170
    stringBuffer.append(diagnostics);
1256
    stringBuffer.append(diagnostics);
1257
    stringBuffer.append(TEXT_252);
1258
    stringBuffer.append(context);
1171
    stringBuffer.append(TEXT_253);
1259
    stringBuffer.append(TEXT_253);
1172
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1260
    stringBuffer.append(result);
1173
    stringBuffer.append(TEXT_254);
1261
    stringBuffer.append(TEXT_254);
1174
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1262
    } else if (constraint.equals("Min") && genDataType.getMinLiteral() != null) {
1263
    if (genDataType.isPrimitiveType()) {
1175
    stringBuffer.append(TEXT_255);
1264
    stringBuffer.append(TEXT_255);
1176
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1265
    stringBuffer.append(result);
1177
    stringBuffer.append(TEXT_256);
1266
    stringBuffer.append(TEXT_256);
1178
    stringBuffer.append(genDataType.getSafeUncapName());
1267
    stringBuffer.append(genDataType.getSafeUncapName());
1179
    stringBuffer.append(TEXT_257);
1268
    stringBuffer.append(TEXT_257);
1180
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1269
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1181
    stringBuffer.append(TEXT_258);
1270
    stringBuffer.append(TEXT_258);
1182
    stringBuffer.append(constant);
1271
    stringBuffer.append(constant);
1183
    stringBuffer.append(TEXT_259);
1272
    stringBuffer.append(TEXT_259);
1184
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1273
    stringBuffer.append(result);
1185
    stringBuffer.append(TEXT_260);
1274
    stringBuffer.append(TEXT_260);
1186
    stringBuffer.append(diagnostics);
1275
    stringBuffer.append(diagnostics);
1187
    stringBuffer.append(TEXT_261);
1276
    stringBuffer.append(TEXT_261);
1188
    stringBuffer.append(context);
1277
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1189
    stringBuffer.append(TEXT_262);
1278
    stringBuffer.append(TEXT_262);
1190
    } else {
1191
    stringBuffer.append(TEXT_263);
1192
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1279
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1280
    stringBuffer.append(TEXT_263);
1281
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1193
    stringBuffer.append(TEXT_264);
1282
    stringBuffer.append(TEXT_264);
1194
    stringBuffer.append(genDataType.getSafeUncapName());
1283
    stringBuffer.append(genDataType.getSafeUncapName());
1195
    stringBuffer.append(TEXT_265);
1284
    stringBuffer.append(TEXT_265);
1196
    stringBuffer.append(constant);
1285
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1197
    stringBuffer.append(TEXT_266);
1286
    stringBuffer.append(TEXT_266);
1198
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1287
    stringBuffer.append(constant);
1199
    stringBuffer.append(TEXT_267);
1288
    stringBuffer.append(TEXT_267);
1200
    stringBuffer.append(diagnostics);
1289
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1201
    stringBuffer.append(TEXT_268);
1290
    stringBuffer.append(TEXT_268);
1202
    stringBuffer.append(context);
1291
    stringBuffer.append(diagnostics);
1203
    stringBuffer.append(TEXT_269);
1292
    stringBuffer.append(TEXT_269);
1204
    }
1293
    stringBuffer.append(context);
1205
    stringBuffer.append(TEXT_270);
1294
    stringBuffer.append(TEXT_270);
1206
    stringBuffer.append(result);
1295
    } else {
1207
    stringBuffer.append(TEXT_271);
1296
    stringBuffer.append(TEXT_271);
1208
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1297
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1209
    if (genDataType.isXMLCalendar()) {
1210
    stringBuffer.append(TEXT_272);
1298
    stringBuffer.append(TEXT_272);
1211
    stringBuffer.append(comparison);
1299
    stringBuffer.append(genDataType.getSafeUncapName());
1212
    stringBuffer.append(TEXT_273);
1300
    stringBuffer.append(TEXT_273);
1213
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1301
    stringBuffer.append(constant);
1214
    stringBuffer.append(TEXT_274);
1302
    stringBuffer.append(TEXT_274);
1215
    stringBuffer.append(genDataType.getSafeUncapName());
1303
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1216
    stringBuffer.append(TEXT_275);
1304
    stringBuffer.append(TEXT_275);
1217
    stringBuffer.append(constant);
1305
    stringBuffer.append(diagnostics);
1218
    stringBuffer.append(TEXT_276);
1306
    stringBuffer.append(TEXT_276);
1219
    stringBuffer.append(result);
1307
    stringBuffer.append(context);
1220
    stringBuffer.append(TEXT_277);
1308
    stringBuffer.append(TEXT_277);
1221
    if (genDataType.isMinInclusive()) {
1222
    stringBuffer.append(comparison);
1223
    stringBuffer.append(TEXT_278);
1224
    }
1309
    }
1225
    stringBuffer.append(comparison);
1310
    stringBuffer.append(TEXT_278);
1311
    stringBuffer.append(result);
1226
    stringBuffer.append(TEXT_279);
1312
    stringBuffer.append(TEXT_279);
1227
    } else if (genDataType.isXMLDuration()) {
1313
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1314
    if (genDataType.isXMLCalendar()) {
1228
    stringBuffer.append(TEXT_280);
1315
    stringBuffer.append(TEXT_280);
1229
    stringBuffer.append(comparison);
1316
    stringBuffer.append(comparison);
1230
    stringBuffer.append(TEXT_281);
1317
    stringBuffer.append(TEXT_281);
Lines 1242-1349 Link Here
1242
    }
1329
    }
1243
    stringBuffer.append(comparison);
1330
    stringBuffer.append(comparison);
1244
    stringBuffer.append(TEXT_287);
1331
    stringBuffer.append(TEXT_287);
1245
    } else {
1332
    } else if (genDataType.isXMLDuration()) {
1246
    stringBuffer.append(TEXT_288);
1333
    stringBuffer.append(TEXT_288);
1247
    stringBuffer.append(result);
1334
    stringBuffer.append(comparison);
1248
    stringBuffer.append(TEXT_289);
1335
    stringBuffer.append(TEXT_289);
1249
    stringBuffer.append(genDataType.getSafeUncapName());
1336
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1250
    stringBuffer.append(TEXT_290);
1337
    stringBuffer.append(TEXT_290);
1251
    stringBuffer.append(constant);
1338
    stringBuffer.append(genDataType.getSafeUncapName());
1252
    stringBuffer.append(TEXT_291);
1339
    stringBuffer.append(TEXT_291);
1253
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1340
    stringBuffer.append(constant);
1254
    stringBuffer.append(TEXT_292);
1341
    stringBuffer.append(TEXT_292);
1255
    }
1256
    stringBuffer.append(TEXT_293);
1257
    stringBuffer.append(result);
1342
    stringBuffer.append(result);
1343
    stringBuffer.append(TEXT_293);
1344
    if (genDataType.isMinInclusive()) {
1345
    stringBuffer.append(comparison);
1258
    stringBuffer.append(TEXT_294);
1346
    stringBuffer.append(TEXT_294);
1259
    stringBuffer.append(diagnostics);
1347
    }
1348
    stringBuffer.append(comparison);
1260
    stringBuffer.append(TEXT_295);
1349
    stringBuffer.append(TEXT_295);
1261
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1350
    } else {
1262
    stringBuffer.append(TEXT_296);
1351
    stringBuffer.append(TEXT_296);
1263
    stringBuffer.append(genDataType.getSafeUncapName());
1352
    stringBuffer.append(result);
1264
    stringBuffer.append(TEXT_297);
1353
    stringBuffer.append(TEXT_297);
1265
    stringBuffer.append(constant);
1354
    stringBuffer.append(genDataType.getSafeUncapName());
1266
    stringBuffer.append(TEXT_298);
1355
    stringBuffer.append(TEXT_298);
1267
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1356
    stringBuffer.append(constant);
1268
    stringBuffer.append(TEXT_299);
1357
    stringBuffer.append(TEXT_299);
1269
    stringBuffer.append(diagnostics);
1358
    stringBuffer.append(genDataType.isMinInclusive() ? ">=" : ">");
1270
    stringBuffer.append(TEXT_300);
1359
    stringBuffer.append(TEXT_300);
1271
    stringBuffer.append(context);
1360
    }
1272
    stringBuffer.append(TEXT_301);
1361
    stringBuffer.append(TEXT_301);
1273
    stringBuffer.append(result);
1362
    stringBuffer.append(result);
1274
    stringBuffer.append(TEXT_302);
1363
    stringBuffer.append(TEXT_302);
1275
    }
1364
    stringBuffer.append(diagnostics);
1276
    } else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {
1277
    if (genDataType.isPrimitiveType()) {
1278
    stringBuffer.append(TEXT_303);
1365
    stringBuffer.append(TEXT_303);
1279
    stringBuffer.append(result);
1366
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1280
    stringBuffer.append(TEXT_304);
1367
    stringBuffer.append(TEXT_304);
1281
    stringBuffer.append(genDataType.getSafeUncapName());
1368
    stringBuffer.append(genDataType.getSafeUncapName());
1282
    stringBuffer.append(TEXT_305);
1369
    stringBuffer.append(TEXT_305);
1283
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1284
    stringBuffer.append(TEXT_306);
1285
    stringBuffer.append(constant);
1370
    stringBuffer.append(constant);
1371
    stringBuffer.append(TEXT_306);
1372
    stringBuffer.append(genDataType.isMinInclusive() ? "true" : "false");
1286
    stringBuffer.append(TEXT_307);
1373
    stringBuffer.append(TEXT_307);
1287
    stringBuffer.append(result);
1288
    stringBuffer.append(TEXT_308);
1289
    stringBuffer.append(diagnostics);
1374
    stringBuffer.append(diagnostics);
1375
    stringBuffer.append(TEXT_308);
1376
    stringBuffer.append(context);
1290
    stringBuffer.append(TEXT_309);
1377
    stringBuffer.append(TEXT_309);
1291
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1378
    stringBuffer.append(result);
1292
    stringBuffer.append(TEXT_310);
1379
    stringBuffer.append(TEXT_310);
1293
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1380
    }
1381
    } else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {
1382
    if (genDataType.isPrimitiveType()) {
1294
    stringBuffer.append(TEXT_311);
1383
    stringBuffer.append(TEXT_311);
1295
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1384
    stringBuffer.append(result);
1296
    stringBuffer.append(TEXT_312);
1385
    stringBuffer.append(TEXT_312);
1297
    stringBuffer.append(genDataType.getSafeUncapName());
1386
    stringBuffer.append(genDataType.getSafeUncapName());
1298
    stringBuffer.append(TEXT_313);
1387
    stringBuffer.append(TEXT_313);
1299
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1388
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1300
    stringBuffer.append(TEXT_314);
1389
    stringBuffer.append(TEXT_314);
1301
    stringBuffer.append(constant);
1390
    stringBuffer.append(constant);
1302
    stringBuffer.append(TEXT_315);
1391
    stringBuffer.append(TEXT_315);
1303
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1392
    stringBuffer.append(result);
1304
    stringBuffer.append(TEXT_316);
1393
    stringBuffer.append(TEXT_316);
1305
    stringBuffer.append(diagnostics);
1394
    stringBuffer.append(diagnostics);
1306
    stringBuffer.append(TEXT_317);
1395
    stringBuffer.append(TEXT_317);
1307
    stringBuffer.append(context);
1396
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1308
    stringBuffer.append(TEXT_318);
1397
    stringBuffer.append(TEXT_318);
1309
    } else {
1310
    stringBuffer.append(TEXT_319);
1311
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1398
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1399
    stringBuffer.append(TEXT_319);
1400
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1312
    stringBuffer.append(TEXT_320);
1401
    stringBuffer.append(TEXT_320);
1313
    stringBuffer.append(genDataType.getSafeUncapName());
1402
    stringBuffer.append(genDataType.getSafeUncapName());
1314
    stringBuffer.append(TEXT_321);
1403
    stringBuffer.append(TEXT_321);
1315
    stringBuffer.append(constant);
1404
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1316
    stringBuffer.append(TEXT_322);
1405
    stringBuffer.append(TEXT_322);
1317
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1406
    stringBuffer.append(constant);
1318
    stringBuffer.append(TEXT_323);
1407
    stringBuffer.append(TEXT_323);
1319
    stringBuffer.append(diagnostics);
1408
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1320
    stringBuffer.append(TEXT_324);
1409
    stringBuffer.append(TEXT_324);
1321
    stringBuffer.append(context);
1410
    stringBuffer.append(diagnostics);
1322
    stringBuffer.append(TEXT_325);
1411
    stringBuffer.append(TEXT_325);
1323
    }
1412
    stringBuffer.append(context);
1324
    stringBuffer.append(TEXT_326);
1413
    stringBuffer.append(TEXT_326);
1325
    stringBuffer.append(result);
1414
    } else {
1326
    stringBuffer.append(TEXT_327);
1415
    stringBuffer.append(TEXT_327);
1327
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1416
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1328
    if (genDataType.isXMLCalendar()) {
1329
    stringBuffer.append(TEXT_328);
1417
    stringBuffer.append(TEXT_328);
1330
    stringBuffer.append(comparison);
1418
    stringBuffer.append(genDataType.getSafeUncapName());
1331
    stringBuffer.append(TEXT_329);
1419
    stringBuffer.append(TEXT_329);
1332
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1420
    stringBuffer.append(constant);
1333
    stringBuffer.append(TEXT_330);
1421
    stringBuffer.append(TEXT_330);
1334
    stringBuffer.append(genDataType.getSafeUncapName());
1422
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1335
    stringBuffer.append(TEXT_331);
1423
    stringBuffer.append(TEXT_331);
1336
    stringBuffer.append(constant);
1424
    stringBuffer.append(diagnostics);
1337
    stringBuffer.append(TEXT_332);
1425
    stringBuffer.append(TEXT_332);
1338
    stringBuffer.append(result);
1426
    stringBuffer.append(context);
1339
    stringBuffer.append(TEXT_333);
1427
    stringBuffer.append(TEXT_333);
1340
    if (genDataType.isMaxInclusive()) {
1341
    stringBuffer.append(comparison);
1342
    stringBuffer.append(TEXT_334);
1343
    }
1428
    }
1344
    stringBuffer.append(comparison);
1429
    stringBuffer.append(TEXT_334);
1430
    stringBuffer.append(result);
1345
    stringBuffer.append(TEXT_335);
1431
    stringBuffer.append(TEXT_335);
1346
    } else if (genDataType.isXMLDuration()) {
1432
    } else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";
1433
    if (genDataType.isXMLCalendar()) {
1347
    stringBuffer.append(TEXT_336);
1434
    stringBuffer.append(TEXT_336);
1348
    stringBuffer.append(comparison);
1435
    stringBuffer.append(comparison);
1349
    stringBuffer.append(TEXT_337);
1436
    stringBuffer.append(TEXT_337);
Lines 1361-1811 Link Here
1361
    }
1448
    }
1362
    stringBuffer.append(comparison);
1449
    stringBuffer.append(comparison);
1363
    stringBuffer.append(TEXT_343);
1450
    stringBuffer.append(TEXT_343);
1364
    } else {
1451
    } else if (genDataType.isXMLDuration()) {
1365
    stringBuffer.append(TEXT_344);
1452
    stringBuffer.append(TEXT_344);
1366
    stringBuffer.append(result);
1453
    stringBuffer.append(comparison);
1367
    stringBuffer.append(TEXT_345);
1454
    stringBuffer.append(TEXT_345);
1368
    stringBuffer.append(genDataType.getSafeUncapName());
1455
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil"));
1369
    stringBuffer.append(TEXT_346);
1456
    stringBuffer.append(TEXT_346);
1370
    stringBuffer.append(constant);
1457
    stringBuffer.append(genDataType.getSafeUncapName());
1371
    stringBuffer.append(TEXT_347);
1458
    stringBuffer.append(TEXT_347);
1372
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1459
    stringBuffer.append(constant);
1373
    stringBuffer.append(TEXT_348);
1460
    stringBuffer.append(TEXT_348);
1374
    }
1375
    stringBuffer.append(TEXT_349);
1376
    stringBuffer.append(result);
1461
    stringBuffer.append(result);
1462
    stringBuffer.append(TEXT_349);
1463
    if (genDataType.isMaxInclusive()) {
1464
    stringBuffer.append(comparison);
1377
    stringBuffer.append(TEXT_350);
1465
    stringBuffer.append(TEXT_350);
1378
    stringBuffer.append(diagnostics);
1466
    }
1467
    stringBuffer.append(comparison);
1379
    stringBuffer.append(TEXT_351);
1468
    stringBuffer.append(TEXT_351);
1380
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1469
    } else {
1381
    stringBuffer.append(TEXT_352);
1470
    stringBuffer.append(TEXT_352);
1382
    stringBuffer.append(genDataType.getSafeUncapName());
1471
    stringBuffer.append(result);
1383
    stringBuffer.append(TEXT_353);
1472
    stringBuffer.append(TEXT_353);
1384
    stringBuffer.append(constant);
1473
    stringBuffer.append(genDataType.getSafeUncapName());
1385
    stringBuffer.append(TEXT_354);
1474
    stringBuffer.append(TEXT_354);
1386
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1475
    stringBuffer.append(constant);
1387
    stringBuffer.append(TEXT_355);
1476
    stringBuffer.append(TEXT_355);
1388
    stringBuffer.append(diagnostics);
1477
    stringBuffer.append(genDataType.isMaxInclusive() ? "<=" : "<");
1389
    stringBuffer.append(TEXT_356);
1478
    stringBuffer.append(TEXT_356);
1390
    stringBuffer.append(context);
1479
    }
1391
    stringBuffer.append(TEXT_357);
1480
    stringBuffer.append(TEXT_357);
1392
    stringBuffer.append(result);
1481
    stringBuffer.append(result);
1393
    stringBuffer.append(TEXT_358);
1482
    stringBuffer.append(TEXT_358);
1394
    }
1483
    stringBuffer.append(diagnostics);
1395
    } else if (constraint.equals("MinLength") && genDataType.getMinLength() != -1) {
1396
    stringBuffer.append(TEXT_359);
1484
    stringBuffer.append(TEXT_359);
1397
    stringBuffer.append(genDataType.getSafeUncapName());
1485
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1398
    stringBuffer.append(TEXT_360);
1486
    stringBuffer.append(TEXT_360);
1399
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1487
    stringBuffer.append(genDataType.getSafeUncapName());
1400
    stringBuffer.append(TEXT_361);
1488
    stringBuffer.append(TEXT_361);
1401
    stringBuffer.append(result);
1489
    stringBuffer.append(constant);
1402
    stringBuffer.append(TEXT_362);
1490
    stringBuffer.append(TEXT_362);
1403
    stringBuffer.append(genDataType.getMinLength());
1491
    stringBuffer.append(genDataType.isMaxInclusive() ? "true" : "false");
1404
    stringBuffer.append(TEXT_363);
1492
    stringBuffer.append(TEXT_363);
1405
    stringBuffer.append(result);
1406
    stringBuffer.append(TEXT_364);
1407
    stringBuffer.append(diagnostics);
1493
    stringBuffer.append(diagnostics);
1494
    stringBuffer.append(TEXT_364);
1495
    stringBuffer.append(context);
1408
    stringBuffer.append(TEXT_365);
1496
    stringBuffer.append(TEXT_365);
1409
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1497
    stringBuffer.append(result);
1410
    stringBuffer.append(TEXT_366);
1498
    stringBuffer.append(TEXT_366);
1411
    stringBuffer.append(genDataType.getSafeUncapName());
1499
    }
1500
    } else if (constraint.equals("MinLength") && genDataType.getMinLength() != -1) {
1412
    stringBuffer.append(TEXT_367);
1501
    stringBuffer.append(TEXT_367);
1413
    stringBuffer.append(genDataType.getMinLength());
1502
    stringBuffer.append(genDataType.getSafeUncapName());
1414
    stringBuffer.append(TEXT_368);
1503
    stringBuffer.append(TEXT_368);
1415
    stringBuffer.append(diagnostics);
1504
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1416
    stringBuffer.append(TEXT_369);
1505
    stringBuffer.append(TEXT_369);
1417
    stringBuffer.append(context);
1418
    stringBuffer.append(TEXT_370);
1419
    stringBuffer.append(result);
1506
    stringBuffer.append(result);
1507
    stringBuffer.append(TEXT_370);
1508
    stringBuffer.append(genDataType.getMinLength());
1420
    stringBuffer.append(TEXT_371);
1509
    stringBuffer.append(TEXT_371);
1421
    } else if (constraint.equals("MaxLength") && genDataType.getMaxLength() != -1) {
1510
    stringBuffer.append(result);
1422
    stringBuffer.append(TEXT_372);
1511
    stringBuffer.append(TEXT_372);
1423
    stringBuffer.append(genDataType.getSafeUncapName());
1512
    stringBuffer.append(diagnostics);
1424
    stringBuffer.append(TEXT_373);
1513
    stringBuffer.append(TEXT_373);
1425
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1514
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1426
    stringBuffer.append(TEXT_374);
1515
    stringBuffer.append(TEXT_374);
1427
    stringBuffer.append(result);
1516
    stringBuffer.append(genDataType.getSafeUncapName());
1428
    stringBuffer.append(TEXT_375);
1517
    stringBuffer.append(TEXT_375);
1429
    stringBuffer.append(genDataType.getMaxLength());
1518
    stringBuffer.append(genDataType.getMinLength());
1430
    stringBuffer.append(TEXT_376);
1519
    stringBuffer.append(TEXT_376);
1431
    stringBuffer.append(result);
1432
    stringBuffer.append(TEXT_377);
1433
    stringBuffer.append(diagnostics);
1520
    stringBuffer.append(diagnostics);
1521
    stringBuffer.append(TEXT_377);
1522
    stringBuffer.append(context);
1434
    stringBuffer.append(TEXT_378);
1523
    stringBuffer.append(TEXT_378);
1435
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1524
    stringBuffer.append(result);
1436
    stringBuffer.append(TEXT_379);
1525
    stringBuffer.append(TEXT_379);
1437
    stringBuffer.append(genDataType.getSafeUncapName());
1526
    } else if (constraint.equals("MaxLength") && genDataType.getMaxLength() != -1) {
1438
    stringBuffer.append(TEXT_380);
1527
    stringBuffer.append(TEXT_380);
1439
    stringBuffer.append(genDataType.getMaxLength());
1528
    stringBuffer.append(genDataType.getSafeUncapName());
1440
    stringBuffer.append(TEXT_381);
1529
    stringBuffer.append(TEXT_381);
1441
    stringBuffer.append(diagnostics);
1530
    stringBuffer.append(genDataType.getLengthAccessorFunction());
1442
    stringBuffer.append(TEXT_382);
1531
    stringBuffer.append(TEXT_382);
1443
    stringBuffer.append(context);
1444
    stringBuffer.append(TEXT_383);
1445
    stringBuffer.append(result);
1532
    stringBuffer.append(result);
1533
    stringBuffer.append(TEXT_383);
1534
    stringBuffer.append(genDataType.getMaxLength());
1446
    stringBuffer.append(TEXT_384);
1535
    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);
1536
    stringBuffer.append(result);
1537
    stringBuffer.append(TEXT_385);
1538
    stringBuffer.append(diagnostics);
1451
    stringBuffer.append(TEXT_386);
1539
    stringBuffer.append(TEXT_386);
1452
    stringBuffer.append(genDataType.getSafeUncapName());
1540
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1453
    stringBuffer.append(TEXT_387);
1541
    stringBuffer.append(TEXT_387);
1454
    stringBuffer.append(constant);
1455
    stringBuffer.append(TEXT_388);
1456
    stringBuffer.append(genDataType.getSafeUncapName());
1542
    stringBuffer.append(genDataType.getSafeUncapName());
1543
    stringBuffer.append(TEXT_388);
1544
    stringBuffer.append(genDataType.getMaxLength());
1457
    stringBuffer.append(TEXT_389);
1545
    stringBuffer.append(TEXT_389);
1458
    stringBuffer.append(constant);
1546
    stringBuffer.append(diagnostics);
1459
    stringBuffer.append(TEXT_390);
1547
    stringBuffer.append(TEXT_390);
1460
    stringBuffer.append(result);
1548
    stringBuffer.append(context);
1461
    stringBuffer.append(TEXT_391);
1549
    stringBuffer.append(TEXT_391);
1462
    stringBuffer.append(diagnostics);
1550
    stringBuffer.append(result);
1463
    stringBuffer.append(TEXT_392);
1551
    stringBuffer.append(TEXT_392);
1464
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1552
    } else if (constraint.equals("TotalDigits") && genDataType.getTotalDigits() != -1) {
1553
    if (genDataType.isPrimitiveType()) {
1465
    stringBuffer.append(TEXT_393);
1554
    stringBuffer.append(TEXT_393);
1466
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1555
    stringBuffer.append(result);
1467
    stringBuffer.append(TEXT_394);
1556
    stringBuffer.append(TEXT_394);
1468
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1469
    stringBuffer.append(TEXT_395);
1470
    stringBuffer.append(genDataType.getSafeUncapName());
1557
    stringBuffer.append(genDataType.getSafeUncapName());
1558
    stringBuffer.append(TEXT_395);
1559
    stringBuffer.append(constant);
1471
    stringBuffer.append(TEXT_396);
1560
    stringBuffer.append(TEXT_396);
1472
    stringBuffer.append(genDataType.getTotalDigits());
1561
    stringBuffer.append(genDataType.getSafeUncapName());
1473
    stringBuffer.append(TEXT_397);
1562
    stringBuffer.append(TEXT_397);
1474
    stringBuffer.append(diagnostics);
1563
    stringBuffer.append(constant);
1475
    stringBuffer.append(TEXT_398);
1564
    stringBuffer.append(TEXT_398);
1476
    stringBuffer.append(context);
1565
    stringBuffer.append(result);
1477
    stringBuffer.append(TEXT_399);
1566
    stringBuffer.append(TEXT_399);
1478
    } else {
1567
    stringBuffer.append(diagnostics);
1479
    stringBuffer.append(TEXT_400);
1568
    stringBuffer.append(TEXT_400);
1480
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1569
    if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {
1481
    stringBuffer.append(TEXT_401);
1570
    stringBuffer.append(TEXT_401);
1482
    stringBuffer.append(genDataType.getSafeUncapName());
1571
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1483
    stringBuffer.append(TEXT_402);
1572
    stringBuffer.append(TEXT_402);
1484
    stringBuffer.append(genDataType.getTotalDigits());
1573
    stringBuffer.append(genDataType.getObjectInstanceClassName());
1485
    stringBuffer.append(TEXT_403);
1574
    stringBuffer.append(TEXT_403);
1486
    stringBuffer.append(diagnostics);
1575
    stringBuffer.append(genDataType.getSafeUncapName());
1487
    stringBuffer.append(TEXT_404);
1576
    stringBuffer.append(TEXT_404);
1488
    stringBuffer.append(context);
1577
    stringBuffer.append(genDataType.getTotalDigits());
1489
    stringBuffer.append(TEXT_405);
1578
    stringBuffer.append(TEXT_405);
1490
    }
1579
    stringBuffer.append(diagnostics);
1491
    } else if ("java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1492
    stringBuffer.append(TEXT_406);
1580
    stringBuffer.append(TEXT_406);
1493
    stringBuffer.append(result);
1581
    stringBuffer.append(context);
1494
    stringBuffer.append(TEXT_407);
1582
    stringBuffer.append(TEXT_407);
1495
    stringBuffer.append(genDataType.getSafeUncapName());
1583
    } else {
1496
    stringBuffer.append(TEXT_408);
1584
    stringBuffer.append(TEXT_408);
1497
    stringBuffer.append(genDataType.getTotalDigits());
1585
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1498
    stringBuffer.append(TEXT_409);
1586
    stringBuffer.append(TEXT_409);
1499
    stringBuffer.append(result);
1587
    stringBuffer.append(genDataType.getSafeUncapName());
1500
    stringBuffer.append(TEXT_410);
1588
    stringBuffer.append(TEXT_410);
1501
    stringBuffer.append(diagnostics);
1589
    stringBuffer.append(genDataType.getTotalDigits());
1502
    stringBuffer.append(TEXT_411);
1590
    stringBuffer.append(TEXT_411);
1503
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1591
    stringBuffer.append(diagnostics);
1504
    stringBuffer.append(TEXT_412);
1592
    stringBuffer.append(TEXT_412);
1505
    stringBuffer.append(genDataType.getSafeUncapName());
1593
    stringBuffer.append(context);
1506
    stringBuffer.append(TEXT_413);
1594
    stringBuffer.append(TEXT_413);
1507
    stringBuffer.append(genDataType.getTotalDigits());
1595
    }
1596
    } else if ("java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1508
    stringBuffer.append(TEXT_414);
1597
    stringBuffer.append(TEXT_414);
1509
    stringBuffer.append(diagnostics);
1598
    stringBuffer.append(result);
1510
    stringBuffer.append(TEXT_415);
1599
    stringBuffer.append(TEXT_415);
1511
    stringBuffer.append(context);
1600
    stringBuffer.append(genDataType.getSafeUncapName());
1512
    stringBuffer.append(TEXT_416);
1601
    stringBuffer.append(TEXT_416);
1513
    } else {
1602
    stringBuffer.append(genDataType.getTotalDigits());
1514
    stringBuffer.append(TEXT_417);
1603
    stringBuffer.append(TEXT_417);
1515
    stringBuffer.append(result);
1604
    stringBuffer.append(result);
1516
    stringBuffer.append(TEXT_418);
1605
    stringBuffer.append(TEXT_418);
1517
    stringBuffer.append(genDataType.getSafeUncapName());
1606
    stringBuffer.append(diagnostics);
1518
    stringBuffer.append(TEXT_419);
1607
    stringBuffer.append(TEXT_419);
1519
    stringBuffer.append(constant);
1608
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1520
    stringBuffer.append(TEXT_420);
1609
    stringBuffer.append(TEXT_420);
1521
    stringBuffer.append(genDataType.getSafeUncapName());
1610
    stringBuffer.append(genDataType.getSafeUncapName());
1522
    stringBuffer.append(TEXT_421);
1611
    stringBuffer.append(TEXT_421);
1523
    stringBuffer.append(constant);
1612
    stringBuffer.append(genDataType.getTotalDigits());
1524
    stringBuffer.append(TEXT_422);
1613
    stringBuffer.append(TEXT_422);
1525
    stringBuffer.append(result);
1526
    stringBuffer.append(TEXT_423);
1527
    stringBuffer.append(diagnostics);
1614
    stringBuffer.append(diagnostics);
1615
    stringBuffer.append(TEXT_423);
1616
    stringBuffer.append(context);
1528
    stringBuffer.append(TEXT_424);
1617
    stringBuffer.append(TEXT_424);
1529
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1618
    } else {
1530
    stringBuffer.append(TEXT_425);
1619
    stringBuffer.append(TEXT_425);
1531
    stringBuffer.append(genDataType.getSafeUncapName());
1620
    stringBuffer.append(result);
1532
    stringBuffer.append(TEXT_426);
1621
    stringBuffer.append(TEXT_426);
1533
    stringBuffer.append(genDataType.getTotalDigits());
1622
    stringBuffer.append(genDataType.getSafeUncapName());
1534
    stringBuffer.append(TEXT_427);
1623
    stringBuffer.append(TEXT_427);
1535
    stringBuffer.append(diagnostics);
1624
    stringBuffer.append(constant);
1536
    stringBuffer.append(TEXT_428);
1625
    stringBuffer.append(TEXT_428);
1537
    stringBuffer.append(context);
1626
    stringBuffer.append(genDataType.getSafeUncapName());
1538
    stringBuffer.append(TEXT_429);
1627
    stringBuffer.append(TEXT_429);
1539
    }
1628
    stringBuffer.append(constant);
1540
    stringBuffer.append(TEXT_430);
1629
    stringBuffer.append(TEXT_430);
1541
    stringBuffer.append(result);
1630
    stringBuffer.append(result);
1542
    stringBuffer.append(TEXT_431);
1631
    stringBuffer.append(TEXT_431);
1543
    } else if (constraint.equals("FractionDigits") && genDataType.getFractionDigits() != -1 && "java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1632
    stringBuffer.append(diagnostics);
1544
    stringBuffer.append(TEXT_432);
1633
    stringBuffer.append(TEXT_432);
1545
    stringBuffer.append(result);
1634
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1546
    stringBuffer.append(TEXT_433);
1635
    stringBuffer.append(TEXT_433);
1547
    stringBuffer.append(genDataType.getSafeUncapName());
1636
    stringBuffer.append(genDataType.getSafeUncapName());
1548
    stringBuffer.append(TEXT_434);
1637
    stringBuffer.append(TEXT_434);
1549
    stringBuffer.append(genDataType.getFractionDigits());
1638
    stringBuffer.append(genDataType.getTotalDigits());
1550
    stringBuffer.append(TEXT_435);
1639
    stringBuffer.append(TEXT_435);
1551
    stringBuffer.append(result);
1552
    stringBuffer.append(TEXT_436);
1553
    stringBuffer.append(diagnostics);
1640
    stringBuffer.append(diagnostics);
1641
    stringBuffer.append(TEXT_436);
1642
    stringBuffer.append(context);
1554
    stringBuffer.append(TEXT_437);
1643
    stringBuffer.append(TEXT_437);
1555
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1644
    }
1556
    stringBuffer.append(TEXT_438);
1645
    stringBuffer.append(TEXT_438);
1557
    stringBuffer.append(genDataType.getSafeUncapName());
1646
    stringBuffer.append(result);
1558
    stringBuffer.append(TEXT_439);
1647
    stringBuffer.append(TEXT_439);
1559
    stringBuffer.append(genDataType.getFractionDigits());
1648
    } else if (constraint.equals("FractionDigits") && genDataType.getFractionDigits() != -1 && "java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {
1560
    stringBuffer.append(TEXT_440);
1649
    stringBuffer.append(TEXT_440);
1561
    stringBuffer.append(diagnostics);
1650
    stringBuffer.append(result);
1562
    stringBuffer.append(TEXT_441);
1651
    stringBuffer.append(TEXT_441);
1563
    stringBuffer.append(context);
1652
    stringBuffer.append(genDataType.getSafeUncapName());
1564
    stringBuffer.append(TEXT_442);
1653
    stringBuffer.append(TEXT_442);
1565
    stringBuffer.append(result);
1654
    stringBuffer.append(genDataType.getFractionDigits());
1566
    stringBuffer.append(TEXT_443);
1655
    stringBuffer.append(TEXT_443);
1567
    } else if (constraintDelegate != null) {
1656
    stringBuffer.append(result);
1568
    stringBuffer.append(TEXT_444);
1657
    stringBuffer.append(TEXT_444);
1569
    stringBuffer.append(diagnostics);
1658
    stringBuffer.append(diagnostics);
1570
    stringBuffer.append(TEXT_445);
1659
    stringBuffer.append(TEXT_445);
1571
    stringBuffer.append(diagnostics);
1660
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1572
    stringBuffer.append(TEXT_446);
1661
    stringBuffer.append(TEXT_446);
1573
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1662
    stringBuffer.append(genDataType.getSafeUncapName());
1574
    stringBuffer.append(TEXT_447);
1663
    stringBuffer.append(TEXT_447);
1575
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1664
    stringBuffer.append(genDataType.getFractionDigits());
1576
    stringBuffer.append(TEXT_448);
1665
    stringBuffer.append(TEXT_448);
1577
    stringBuffer.append(genModel.getNonNLS());
1666
    stringBuffer.append(diagnostics);
1578
    stringBuffer.append(TEXT_449);
1667
    stringBuffer.append(TEXT_449);
1579
    stringBuffer.append(constraint);
1668
    stringBuffer.append(context);
1580
    stringBuffer.append(TEXT_450);
1669
    stringBuffer.append(TEXT_450);
1581
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1670
    stringBuffer.append(result);
1582
    stringBuffer.append(TEXT_451);
1671
    stringBuffer.append(TEXT_451);
1583
    stringBuffer.append(genClassifier.getSafeUncapName());
1672
    } else if (constraintDelegate != null) {
1584
    stringBuffer.append(TEXT_452);
1673
    stringBuffer.append(TEXT_452);
1585
    stringBuffer.append(context);
1674
    stringBuffer.append(diagnostics);
1586
    stringBuffer.append(TEXT_453);
1675
    stringBuffer.append(TEXT_453);
1587
    stringBuffer.append(genModel.getNonNLS());
1676
    stringBuffer.append(diagnostics);
1588
    stringBuffer.append(TEXT_454);
1677
    stringBuffer.append(TEXT_454);
1589
    stringBuffer.append(genClassifier.getSafeUncapName());
1678
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1590
    stringBuffer.append(TEXT_455);
1679
    stringBuffer.append(TEXT_455);
1591
    } else {
1680
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1592
    stringBuffer.append(TEXT_456);
1681
    stringBuffer.append(TEXT_456);
1593
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1682
    stringBuffer.append(genModel.getNonNLS());
1594
    stringBuffer.append(TEXT_457);
1683
    stringBuffer.append(TEXT_457);
1595
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1684
    stringBuffer.append(constraint);
1596
    stringBuffer.append(TEXT_458);
1685
    stringBuffer.append(TEXT_458);
1597
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1686
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1598
    stringBuffer.append(TEXT_459);
1687
    stringBuffer.append(TEXT_459);
1599
    stringBuffer.append(constraint);
1688
    stringBuffer.append(genClassifier.getSafeUncapName());
1600
    stringBuffer.append(TEXT_460);
1689
    stringBuffer.append(TEXT_460);
1601
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1690
    stringBuffer.append(context);
1602
    stringBuffer.append(TEXT_461);
1691
    stringBuffer.append(TEXT_461);
1603
    stringBuffer.append(genClassifier.getSafeUncapName());
1692
    stringBuffer.append(genModel.getNonNLS());
1604
    stringBuffer.append(TEXT_462);
1693
    stringBuffer.append(TEXT_462);
1605
    stringBuffer.append(context);
1694
    stringBuffer.append(genClassifier.getSafeUncapName());
1606
    stringBuffer.append(TEXT_463);
1695
    stringBuffer.append(TEXT_463);
1607
    stringBuffer.append(genModel.getNonNLS());
1696
    } else {
1608
    stringBuffer.append(genModel.getNonNLS(2));
1609
    stringBuffer.append(TEXT_464);
1697
    stringBuffer.append(TEXT_464);
1610
    stringBuffer.append(genClassifier.getSafeUncapName());
1698
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1611
    stringBuffer.append(TEXT_465);
1699
    stringBuffer.append(TEXT_465);
1612
    }
1700
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1613
    stringBuffer.append(TEXT_466);
1701
    stringBuffer.append(TEXT_466);
1614
    stringBuffer.append(delegate);
1702
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1615
    stringBuffer.append(TEXT_467);
1703
    stringBuffer.append(TEXT_467);
1616
    stringBuffer.append(constraintDelegate.getName());
1617
    stringBuffer.append(TEXT_468);
1618
    stringBuffer.append(constraint);
1704
    stringBuffer.append(constraint);
1705
    stringBuffer.append(TEXT_468);
1706
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1619
    stringBuffer.append(TEXT_469);
1707
    stringBuffer.append(TEXT_469);
1620
    stringBuffer.append(genClassifier.getSafeUncapName());
1708
    stringBuffer.append(genClassifier.getSafeUncapName());
1621
    stringBuffer.append(accessor);
1622
    stringBuffer.append(TEXT_470);
1709
    stringBuffer.append(TEXT_470);
1623
    stringBuffer.append(diagnostics);
1624
    stringBuffer.append(TEXT_471);
1625
    stringBuffer.append(context);
1710
    stringBuffer.append(context);
1711
    stringBuffer.append(TEXT_471);
1712
    stringBuffer.append(genModel.getNonNLS());
1713
    stringBuffer.append(genModel.getNonNLS(2));
1626
    stringBuffer.append(TEXT_472);
1714
    stringBuffer.append(TEXT_472);
1627
    } else {
1715
    stringBuffer.append(genClassifier.getSafeUncapName());
1628
    stringBuffer.append(TEXT_473);
1716
    stringBuffer.append(TEXT_473);
1629
    stringBuffer.append(diagnostics);
1717
    }
1630
    stringBuffer.append(TEXT_474);
1718
    stringBuffer.append(TEXT_474);
1631
    stringBuffer.append(diagnostics);
1719
    stringBuffer.append(delegate);
1632
    stringBuffer.append(TEXT_475);
1720
    stringBuffer.append(TEXT_475);
1633
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1721
    stringBuffer.append(constraintDelegate.getName());
1634
    stringBuffer.append(TEXT_476);
1722
    stringBuffer.append(TEXT_476);
1635
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1723
    stringBuffer.append(constraint);
1636
    stringBuffer.append(TEXT_477);
1724
    stringBuffer.append(TEXT_477);
1637
    stringBuffer.append(genModel.getNonNLS());
1725
    stringBuffer.append(genClassifier.getSafeUncapName());
1726
    stringBuffer.append(accessor);
1638
    stringBuffer.append(TEXT_478);
1727
    stringBuffer.append(TEXT_478);
1639
    stringBuffer.append(constraint);
1728
    stringBuffer.append(diagnostics);
1640
    stringBuffer.append(TEXT_479);
1729
    stringBuffer.append(TEXT_479);
1641
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1730
    stringBuffer.append(context);
1642
    stringBuffer.append(TEXT_480);
1731
    stringBuffer.append(TEXT_480);
1643
    stringBuffer.append(genClassifier.getSafeUncapName());
1732
    } else {
1733
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
1644
    stringBuffer.append(TEXT_481);
1734
    stringBuffer.append(TEXT_481);
1645
    stringBuffer.append(context);
1735
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1646
    stringBuffer.append(TEXT_482);
1736
    stringBuffer.append(TEXT_482);
1647
    stringBuffer.append(genModel.getNonNLS());
1737
    stringBuffer.append(context);
1648
    stringBuffer.append(TEXT_483);
1738
    stringBuffer.append(TEXT_483);
1649
    stringBuffer.append(genClassifier.getSafeUncapName());
1739
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1650
    stringBuffer.append(TEXT_484);
1740
    stringBuffer.append(TEXT_484);
1651
    } else {
1741
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
1652
    stringBuffer.append(TEXT_485);
1742
    stringBuffer.append(TEXT_485);
1653
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1743
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1654
    stringBuffer.append(TEXT_486);
1744
    stringBuffer.append(TEXT_486);
1655
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1745
    stringBuffer.append(genModel.getNonNLS());
1656
    stringBuffer.append(TEXT_487);
1746
    stringBuffer.append(TEXT_487);
1657
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1747
    stringBuffer.append(genClassifier.getClassifierID());
1658
    stringBuffer.append(TEXT_488);
1748
    stringBuffer.append(TEXT_488);
1659
    stringBuffer.append(constraint);
1749
    stringBuffer.append(CodeGenUtil.upperName(constraint));
1660
    stringBuffer.append(TEXT_489);
1750
    stringBuffer.append(TEXT_489);
1661
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1751
    stringBuffer.append(genClassifier.getQualifiedClassifierAccessor());
1662
    stringBuffer.append(TEXT_490);
1752
    stringBuffer.append(TEXT_490);
1663
    stringBuffer.append(genClassifier.getSafeUncapName());
1753
    stringBuffer.append(genClassifier.getSafeUncapName());
1664
    stringBuffer.append(TEXT_491);
1754
    stringBuffer.append(TEXT_491);
1665
    stringBuffer.append(context);
1755
    stringBuffer.append(context);
1666
    stringBuffer.append(TEXT_492);
1756
    stringBuffer.append(TEXT_492);
1757
    stringBuffer.append(diagnostics);
1758
    stringBuffer.append(TEXT_493);
1759
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1760
    stringBuffer.append(TEXT_494);
1761
    stringBuffer.append(genModel.getNonNLS());
1762
    stringBuffer.append(TEXT_495);
1763
    stringBuffer.append(constraint);
1764
    stringBuffer.append(TEXT_496);
1765
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1766
    stringBuffer.append(TEXT_497);
1767
    stringBuffer.append(genClassifier.getSafeUncapName());
1768
    stringBuffer.append(TEXT_498);
1769
    stringBuffer.append(context);
1770
    stringBuffer.append(TEXT_499);
1771
    stringBuffer.append(genModel.getNonNLS());
1772
    stringBuffer.append(TEXT_500);
1773
    stringBuffer.append(genClassifier.getSafeUncapName());
1774
    stringBuffer.append(TEXT_501);
1775
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
1776
    stringBuffer.append(TEXT_502);
1777
    stringBuffer.append(diagnostics);
1778
    stringBuffer.append(TEXT_503);
1779
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1780
    stringBuffer.append(TEXT_504);
1781
    stringBuffer.append(genModel.getNonNLS());
1782
    stringBuffer.append(TEXT_505);
1783
    stringBuffer.append(constraint);
1784
    stringBuffer.append(TEXT_506);
1785
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1786
    stringBuffer.append(TEXT_507);
1787
    stringBuffer.append(genClassifier.getSafeUncapName());
1788
    stringBuffer.append(TEXT_508);
1789
    stringBuffer.append(context);
1790
    stringBuffer.append(TEXT_509);
1791
    stringBuffer.append(genModel.getNonNLS());
1792
    stringBuffer.append(TEXT_510);
1793
    stringBuffer.append(genClassifier.getSafeUncapName());
1794
    stringBuffer.append(TEXT_511);
1795
    stringBuffer.append(diagnostics);
1796
    stringBuffer.append(TEXT_512);
1797
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1798
    stringBuffer.append(TEXT_513);
1799
    stringBuffer.append(genModel.getNonNLS());
1800
    stringBuffer.append(TEXT_514);
1801
    stringBuffer.append(constraint);
1802
    stringBuffer.append(TEXT_515);
1803
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1804
    stringBuffer.append(TEXT_516);
1805
    stringBuffer.append(genClassifier.getSafeUncapName());
1806
    stringBuffer.append(TEXT_517);
1807
    stringBuffer.append(context);
1808
    stringBuffer.append(TEXT_518);
1809
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1810
    stringBuffer.append(TEXT_519);
1667
    stringBuffer.append(genModel.getNonNLS());
1811
    stringBuffer.append(genModel.getNonNLS());
1668
    stringBuffer.append(genModel.getNonNLS(2));
1812
    stringBuffer.append(genModel.getNonNLS(2));
1669
    stringBuffer.append(TEXT_493);
1813
    stringBuffer.append(TEXT_520);
1670
    stringBuffer.append(genClassifier.getSafeUncapName());
1814
    stringBuffer.append(genClassifier.getSafeUncapName());
1671
    stringBuffer.append(TEXT_494);
1815
    stringBuffer.append(TEXT_521);
1816
    } else {
1817
    stringBuffer.append(TEXT_522);
1818
    stringBuffer.append(diagnostics);
1819
    stringBuffer.append(TEXT_523);
1820
    stringBuffer.append(diagnostics);
1821
    stringBuffer.append(TEXT_524);
1822
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1823
    stringBuffer.append(TEXT_525);
1824
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1825
    stringBuffer.append(TEXT_526);
1826
    stringBuffer.append(genModel.getNonNLS());
1827
    stringBuffer.append(TEXT_527);
1828
    stringBuffer.append(constraint);
1829
    stringBuffer.append(TEXT_528);
1830
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1831
    stringBuffer.append(TEXT_529);
1832
    stringBuffer.append(genClassifier.getSafeUncapName());
1833
    stringBuffer.append(TEXT_530);
1834
    stringBuffer.append(context);
1835
    stringBuffer.append(TEXT_531);
1836
    stringBuffer.append(genModel.getNonNLS());
1837
    stringBuffer.append(TEXT_532);
1838
    stringBuffer.append(genClassifier.getSafeUncapName());
1839
    stringBuffer.append(TEXT_533);
1840
    } else {
1841
    stringBuffer.append(TEXT_534);
1842
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1843
    stringBuffer.append(TEXT_535);
1844
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1845
    stringBuffer.append(TEXT_536);
1846
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1847
    stringBuffer.append(TEXT_537);
1848
    stringBuffer.append(constraint);
1849
    stringBuffer.append(TEXT_538);
1850
    stringBuffer.append(genDataType.getQualifiedClassifierAccessor());
1851
    stringBuffer.append(TEXT_539);
1852
    stringBuffer.append(genClassifier.getSafeUncapName());
1853
    stringBuffer.append(TEXT_540);
1854
    stringBuffer.append(context);
1855
    stringBuffer.append(TEXT_541);
1856
    stringBuffer.append(genModel.getNonNLS());
1857
    stringBuffer.append(genModel.getNonNLS(2));
1858
    stringBuffer.append(TEXT_542);
1859
    stringBuffer.append(genClassifier.getSafeUncapName());
1860
    stringBuffer.append(TEXT_543);
1861
    }
1862
    stringBuffer.append(TEXT_544);
1672
    }
1863
    }
1673
    stringBuffer.append(TEXT_495);
1674
    }
1864
    }
1675
    } else if (constraintDelegate != null) {
1865
    } else if (constraintDelegate != null) {
1676
    stringBuffer.append(TEXT_496);
1866
    stringBuffer.append(TEXT_545);
1677
    stringBuffer.append(diagnostics);
1867
    stringBuffer.append(diagnostics);
1678
    stringBuffer.append(TEXT_497);
1868
    stringBuffer.append(TEXT_546);
1679
    stringBuffer.append(diagnostics);
1869
    stringBuffer.append(diagnostics);
1680
    stringBuffer.append(TEXT_498);
1870
    stringBuffer.append(TEXT_547);
1681
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1871
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1682
    stringBuffer.append(TEXT_499);
1872
    stringBuffer.append(TEXT_548);
1683
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1873
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1684
    stringBuffer.append(TEXT_500);
1874
    stringBuffer.append(TEXT_549);
1685
    stringBuffer.append(genModel.getNonNLS());
1875
    stringBuffer.append(genModel.getNonNLS());
1686
    stringBuffer.append(TEXT_501);
1876
    stringBuffer.append(TEXT_550);
1687
    stringBuffer.append(constraint);
1877
    stringBuffer.append(constraint);
1688
    stringBuffer.append(TEXT_502);
1878
    stringBuffer.append(TEXT_551);
1689
    stringBuffer.append(genClassifier.getSafeUncapName());
1879
    stringBuffer.append(genClassifier.getSafeUncapName());
1690
    stringBuffer.append(TEXT_503);
1880
    stringBuffer.append(TEXT_552);
1691
    stringBuffer.append(context);
1881
    stringBuffer.append(context);
1692
    stringBuffer.append(TEXT_504);
1882
    stringBuffer.append(TEXT_553);
1693
    stringBuffer.append(genModel.getNonNLS());
1883
    stringBuffer.append(genModel.getNonNLS());
1694
    stringBuffer.append(TEXT_505);
1884
    stringBuffer.append(TEXT_554);
1695
    stringBuffer.append(genClassifier.getSafeUncapName());
1885
    stringBuffer.append(genClassifier.getSafeUncapName());
1696
    stringBuffer.append(TEXT_506);
1886
    stringBuffer.append(TEXT_555);
1697
    } else {
1887
    } else {
1698
    stringBuffer.append(TEXT_507);
1888
    stringBuffer.append(TEXT_556);
1699
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1889
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1700
    stringBuffer.append(TEXT_508);
1890
    stringBuffer.append(TEXT_557);
1701
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1891
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1702
    stringBuffer.append(TEXT_509);
1892
    stringBuffer.append(TEXT_558);
1703
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1893
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1704
    stringBuffer.append(TEXT_510);
1894
    stringBuffer.append(TEXT_559);
1705
    stringBuffer.append(constraint);
1895
    stringBuffer.append(constraint);
1706
    stringBuffer.append(TEXT_511);
1896
    stringBuffer.append(TEXT_560);
1707
    stringBuffer.append(genClassifier.getSafeUncapName());
1897
    stringBuffer.append(genClassifier.getSafeUncapName());
1708
    stringBuffer.append(TEXT_512);
1898
    stringBuffer.append(TEXT_561);
1709
    stringBuffer.append(context);
1899
    stringBuffer.append(context);
1710
    stringBuffer.append(TEXT_513);
1900
    stringBuffer.append(TEXT_562);
1711
    stringBuffer.append(genModel.getNonNLS());
1901
    stringBuffer.append(genModel.getNonNLS());
1712
    stringBuffer.append(genModel.getNonNLS(2));
1902
    stringBuffer.append(genModel.getNonNLS(2));
1713
    stringBuffer.append(TEXT_514);
1903
    stringBuffer.append(TEXT_563);
1714
    stringBuffer.append(genClassifier.getSafeUncapName());
1904
    stringBuffer.append(genClassifier.getSafeUncapName());
1715
    stringBuffer.append(TEXT_515);
1905
    stringBuffer.append(TEXT_564);
1716
    }
1906
    }
1717
    stringBuffer.append(TEXT_516);
1907
    stringBuffer.append(TEXT_565);
1718
    stringBuffer.append(delegate);
1908
    stringBuffer.append(delegate);
1719
    stringBuffer.append(TEXT_517);
1909
    stringBuffer.append(TEXT_566);
1720
    stringBuffer.append(constraintDelegate.getName());
1910
    stringBuffer.append(constraintDelegate.getName());
1721
    stringBuffer.append(TEXT_518);
1911
    stringBuffer.append(TEXT_567);
1722
    stringBuffer.append(constraint);
1912
    stringBuffer.append(constraint);
1723
    stringBuffer.append(TEXT_519);
1913
    stringBuffer.append(TEXT_568);
1724
    stringBuffer.append(cast);
1914
    stringBuffer.append(cast);
1725
    stringBuffer.append(genClassifier.getSafeUncapName());
1915
    stringBuffer.append(genClassifier.getSafeUncapName());
1726
    stringBuffer.append(TEXT_520);
1916
    stringBuffer.append(TEXT_569);
1727
    stringBuffer.append(diagnostics);
1917
    stringBuffer.append(diagnostics);
1728
    stringBuffer.append(TEXT_521);
1918
    stringBuffer.append(TEXT_570);
1729
    stringBuffer.append(context);
1919
    stringBuffer.append(context);
1730
    stringBuffer.append(TEXT_522);
1920
    stringBuffer.append(TEXT_571);
1731
    } else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {
1921
    } else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {
1732
    stringBuffer.append(TEXT_523);
1922
    stringBuffer.append(TEXT_572);
1733
    stringBuffer.append(genClassifier.getSafeUncapName());
1923
    stringBuffer.append(genClassifier.getSafeUncapName());
1734
    stringBuffer.append(TEXT_524);
1924
    stringBuffer.append(TEXT_573);
1735
    stringBuffer.append(constraint);
1925
    stringBuffer.append(constraint);
1736
    stringBuffer.append(TEXT_525);
1926
    stringBuffer.append(TEXT_574);
1737
    stringBuffer.append(diagnostics);
1927
    stringBuffer.append(diagnostics);
1738
    stringBuffer.append(TEXT_526);
1928
    stringBuffer.append(TEXT_575);
1739
    stringBuffer.append(context);
1929
    stringBuffer.append(context);
1740
    stringBuffer.append(TEXT_527);
1930
    stringBuffer.append(TEXT_576);
1741
    } else {
1931
    } else {
1742
    stringBuffer.append(TEXT_528);
1932
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF26_VALUE && genClassifier.hasValidationExpression(constraint)) {
1933
    stringBuffer.append(TEXT_577);
1934
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1935
    stringBuffer.append(TEXT_578);
1936
    stringBuffer.append(context);
1937
    stringBuffer.append(TEXT_579);
1938
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EValidator.ValidationDelegate"));
1939
    stringBuffer.append(TEXT_580);
1940
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.URI"));
1941
    stringBuffer.append(TEXT_581);
1942
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
1943
    stringBuffer.append(TEXT_582);
1944
    stringBuffer.append(genModel.getNonNLS());
1945
    stringBuffer.append(TEXT_583);
1946
    stringBuffer.append(genClassifier.getClassifierID());
1947
    stringBuffer.append(TEXT_584);
1948
    stringBuffer.append(CodeGenUtil.upperName(constraint));
1949
    stringBuffer.append(TEXT_585);
1950
    stringBuffer.append(genClassifier.getQualifiedClassifierAccessor());
1951
    stringBuffer.append(TEXT_586);
1952
    stringBuffer.append(genClassifier.getSafeUncapName());
1953
    stringBuffer.append(TEXT_587);
1954
    stringBuffer.append(context);
1955
    stringBuffer.append(TEXT_588);
1743
    stringBuffer.append(diagnostics);
1956
    stringBuffer.append(diagnostics);
1744
    stringBuffer.append(TEXT_529);
1957
    stringBuffer.append(TEXT_589);
1958
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1959
    stringBuffer.append(TEXT_590);
1960
    stringBuffer.append(genModel.getNonNLS());
1961
    stringBuffer.append(TEXT_591);
1962
    stringBuffer.append(constraint);
1963
    stringBuffer.append(TEXT_592);
1964
    stringBuffer.append(genClassifier.getSafeUncapName());
1965
    stringBuffer.append(TEXT_593);
1966
    stringBuffer.append(context);
1967
    stringBuffer.append(TEXT_594);
1968
    stringBuffer.append(genModel.getNonNLS());
1969
    stringBuffer.append(TEXT_595);
1970
    stringBuffer.append(genClassifier.getSafeUncapName());
1971
    stringBuffer.append(TEXT_596);
1972
    stringBuffer.append(genModel.getImportedName("java.lang.Throwable"));
1973
    stringBuffer.append(TEXT_597);
1745
    stringBuffer.append(diagnostics);
1974
    stringBuffer.append(diagnostics);
1746
    stringBuffer.append(TEXT_530);
1975
    stringBuffer.append(TEXT_598);
1976
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1977
    stringBuffer.append(TEXT_599);
1978
    stringBuffer.append(genModel.getNonNLS());
1979
    stringBuffer.append(TEXT_600);
1980
    stringBuffer.append(constraint);
1981
    stringBuffer.append(TEXT_601);
1982
    stringBuffer.append(genClassifier.getSafeUncapName());
1983
    stringBuffer.append(TEXT_602);
1984
    stringBuffer.append(context);
1985
    stringBuffer.append(TEXT_603);
1986
    stringBuffer.append(genModel.getNonNLS());
1987
    stringBuffer.append(TEXT_604);
1988
    stringBuffer.append(genClassifier.getSafeUncapName());
1989
    stringBuffer.append(TEXT_605);
1990
    stringBuffer.append(diagnostics);
1991
    stringBuffer.append(TEXT_606);
1992
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1993
    stringBuffer.append(TEXT_607);
1994
    stringBuffer.append(genModel.getNonNLS());
1995
    stringBuffer.append(TEXT_608);
1996
    stringBuffer.append(constraint);
1997
    stringBuffer.append(TEXT_609);
1998
    stringBuffer.append(genClassifier.getSafeUncapName());
1999
    stringBuffer.append(TEXT_610);
2000
    stringBuffer.append(context);
2001
    stringBuffer.append(TEXT_611);
2002
    stringBuffer.append(genClassifier.getValidationDelegate(constraint));
2003
    stringBuffer.append(TEXT_612);
2004
    stringBuffer.append(genModel.getNonNLS());
2005
    stringBuffer.append(genModel.getNonNLS(2));
2006
    stringBuffer.append(TEXT_613);
2007
    stringBuffer.append(genClassifier.getSafeUncapName());
2008
    stringBuffer.append(TEXT_614);
2009
    } else {
2010
    stringBuffer.append(TEXT_615);
2011
    stringBuffer.append(diagnostics);
2012
    stringBuffer.append(TEXT_616);
2013
    stringBuffer.append(diagnostics);
2014
    stringBuffer.append(TEXT_617);
1747
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
2015
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1748
    stringBuffer.append(TEXT_531);
2016
    stringBuffer.append(TEXT_618);
1749
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
2017
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1750
    stringBuffer.append(TEXT_532);
2018
    stringBuffer.append(TEXT_619);
1751
    stringBuffer.append(genModel.getNonNLS());
2019
    stringBuffer.append(genModel.getNonNLS());
1752
    stringBuffer.append(TEXT_533);
2020
    stringBuffer.append(TEXT_620);
1753
    stringBuffer.append(constraint);
2021
    stringBuffer.append(constraint);
1754
    stringBuffer.append(TEXT_534);
2022
    stringBuffer.append(TEXT_621);
1755
    stringBuffer.append(genClassifier.getSafeUncapName());
2023
    stringBuffer.append(genClassifier.getSafeUncapName());
1756
    stringBuffer.append(TEXT_535);
2024
    stringBuffer.append(TEXT_622);
1757
    stringBuffer.append(context);
2025
    stringBuffer.append(context);
1758
    stringBuffer.append(TEXT_536);
2026
    stringBuffer.append(TEXT_623);
1759
    stringBuffer.append(genModel.getNonNLS());
2027
    stringBuffer.append(genModel.getNonNLS());
1760
    stringBuffer.append(TEXT_537);
2028
    stringBuffer.append(TEXT_624);
1761
    stringBuffer.append(genClassifier.getSafeUncapName());
2029
    stringBuffer.append(genClassifier.getSafeUncapName());
1762
    stringBuffer.append(TEXT_538);
2030
    stringBuffer.append(TEXT_625);
1763
    } else {
2031
    } else {
1764
    stringBuffer.append(TEXT_539);
2032
    stringBuffer.append(TEXT_626);
1765
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
2033
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
1766
    stringBuffer.append(TEXT_540);
2034
    stringBuffer.append(TEXT_627);
1767
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
2035
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
1768
    stringBuffer.append(TEXT_541);
2036
    stringBuffer.append(TEXT_628);
1769
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
2037
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
1770
    stringBuffer.append(TEXT_542);
2038
    stringBuffer.append(TEXT_629);
1771
    stringBuffer.append(constraint);
2039
    stringBuffer.append(constraint);
1772
    stringBuffer.append(TEXT_543);
2040
    stringBuffer.append(TEXT_630);
1773
    stringBuffer.append(genClassifier.getSafeUncapName());
2041
    stringBuffer.append(genClassifier.getSafeUncapName());
1774
    stringBuffer.append(TEXT_544);
2042
    stringBuffer.append(TEXT_631);
1775
    stringBuffer.append(context);
2043
    stringBuffer.append(context);
1776
    stringBuffer.append(TEXT_545);
2044
    stringBuffer.append(TEXT_632);
1777
    stringBuffer.append(genModel.getNonNLS());
2045
    stringBuffer.append(genModel.getNonNLS());
1778
    stringBuffer.append(genModel.getNonNLS(2));
2046
    stringBuffer.append(genModel.getNonNLS(2));
1779
    stringBuffer.append(TEXT_546);
2047
    stringBuffer.append(TEXT_633);
1780
    stringBuffer.append(genClassifier.getSafeUncapName());
2048
    stringBuffer.append(genClassifier.getSafeUncapName());
1781
    stringBuffer.append(TEXT_547);
2049
    stringBuffer.append(TEXT_634);
2050
    }
2051
    stringBuffer.append(TEXT_635);
1782
    }
2052
    }
1783
    stringBuffer.append(TEXT_548);
1784
    }}
2053
    }}
1785
    stringBuffer.append(TEXT_549);
2054
    stringBuffer.append(TEXT_636);
1786
    }
2055
    }
1787
    }
2056
    }
1788
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
2057
    if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {
1789
    stringBuffer.append(TEXT_550);
2058
    stringBuffer.append(TEXT_637);
1790
    if (genModel.useClassOverrideAnnotation()) {
2059
    if (genModel.useClassOverrideAnnotation()) {
1791
    stringBuffer.append(TEXT_551);
2060
    stringBuffer.append(TEXT_638);
1792
    }
2061
    }
1793
    stringBuffer.append(TEXT_552);
2062
    stringBuffer.append(TEXT_639);
1794
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator"));
2063
    stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator"));
1795
    stringBuffer.append(TEXT_553);
2064
    stringBuffer.append(TEXT_640);
1796
    if (genModel.hasModelPluginClass()) {
2065
    if (genModel.hasModelPluginClass()) {
1797
    stringBuffer.append(TEXT_554);
2066
    stringBuffer.append(TEXT_641);
1798
    stringBuffer.append(genModel.getImportedName(genModel.getQualifiedModelPluginClassName()));
2067
    stringBuffer.append(genModel.getImportedName(genModel.getQualifiedModelPluginClassName()));
1799
    stringBuffer.append(TEXT_555);
2068
    stringBuffer.append(TEXT_642);
1800
    } else {
2069
    } else {
1801
    stringBuffer.append(TEXT_556);
2070
    stringBuffer.append(TEXT_643);
1802
    }
2071
    }
1803
    stringBuffer.append(TEXT_557);
2072
    stringBuffer.append(TEXT_644);
1804
    }
2073
    }
1805
    stringBuffer.append(TEXT_558);
2074
    stringBuffer.append(TEXT_645);
1806
    stringBuffer.append(genPackage.getValidatorClassName());
2075
    stringBuffer.append(genPackage.getValidatorClassName());
1807
    genModel.emitSortedImports();
2076
    genModel.emitSortedImports();
1808
    stringBuffer.append(TEXT_559);
2077
    stringBuffer.append(TEXT_646);
1809
    return stringBuffer.toString();
2078
    return stringBuffer.toString();
1810
  }
2079
  }
1811
}
2080
}
(-)plugin.properties (-1 / +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 385-390 Link Here
385
_UI_GenRuntimeVersion_EMF23_literal = 2.3
385
_UI_GenRuntimeVersion_EMF23_literal = 2.3
386
_UI_GenRuntimeVersion_EMF24_literal = 2.4
386
_UI_GenRuntimeVersion_EMF24_literal = 2.4
387
_UI_GenRuntimeVersion_EMF25_literal = 2.5
387
_UI_GenRuntimeVersion_EMF25_literal = 2.5
388
_UI_GenRuntimeVersion_EMF26_literal = 2.6
388
_UI_GenPackage_contentTypeIdentifier_feature = Content Type Identifier
389
_UI_GenPackage_contentTypeIdentifier_feature = Content Type Identifier
389
_UI_GenPackage_contentTypeIdentifier_description = A content type identifier against which to register this model's resource factory
390
_UI_GenPackage_contentTypeIdentifier_description = A content type identifier against which to register this model's resource factory
390
_UI_GenPackage_fileExtensions_feature = File Extensions
391
_UI_GenPackage_fileExtensions_feature = File Extensions
(-)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, 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, 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, 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 / +51 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 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, EClass eClass, EObject eObject, Map<Object, Object> context);
160
161
    /**
162
     * Evaluates the expression against the value 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, EDataType eDataType, Object value, Map<Object, Object> context);
167
  }
168
169
  /**
120
   * Validates the object in the given context, optionally producing diagnostics.
170
   * 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.
171
   * @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.
172
   * @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