blob: 23cce2843a6dba3e3505dc66ee311f1b6463ba9b [file] [log] [blame]
Ed Willink17785c52014-05-20 12:29:51 +01001/*******************************************************************************
Ed Willink52e3d062015-05-19 10:14:44 +01002 * Copyright (c) 2013 Willink Transformations and others.
Ed.Willink20f0de42013-06-08 17:13:33 +01003 * All rights reserved. This program and the accompanying materials
Ed Willink2b4d8be2018-06-13 11:53:02 +01004 * are made available under the terms of the Eclipse Public License v2.0
Ed.Willink20f0de42013-06-08 17:13:33 +01005 * which accompanies this distribution, and is available at
Ed Willink2b4d8be2018-06-13 11:53:02 +01006 * http://www.eclipse.org/legal/epl-v20.html
Ed.Willink20f0de42013-06-08 17:13:33 +01007 *
8 * Contributors:
9 * E.D.Willink - initial API and implementation
Ed Willink17785c52014-05-20 12:29:51 +010010 *******************************************************************************/
Ed.Willink20f0de42013-06-08 17:13:33 +010011package org.eclipse.ocl.examples.build.xtend
12
13import org.eclipse.emf.ecore.EPackage
Ed Willink1637f092014-12-28 15:54:52 +000014import org.eclipse.ocl.pivot.internal.resource.ASSaver
Ed Willink6ab6d0f2014-12-28 10:59:38 +000015import org.eclipse.ocl.pivot.internal.utilities.AS2Moniker
Ed Willinkfff02f62018-04-03 21:08:12 +010016//import org.eclipse.ocl.pivot.internal.utilities.AS2XMIid
Ed Willink881d0332013-09-17 15:43:01 +010017import org.eclipse.emf.codegen.ecore.genmodel.GenPackage
Ed Willinkfc3d1982015-11-23 11:26:40 +000018import org.eclipse.ocl.pivot.internal.utilities.EnvironmentFactoryInternal
Ed Willinkdaed9682019-02-23 22:16:31 +000019import org.eclipse.ocl.pivot.internal.manager.FlowAnalysis
Ed Willinka3f916b2022-08-24 07:39:49 +010020import org.eclipse.ocl.pivot.internal.resource.AbstractASSaver
Ed.Willink20f0de42013-06-08 17:13:33 +010021
Ed Willinkdaed9682019-02-23 22:16:31 +000022class GenerateASVisitors extends GenerateVisitorsXtend
Ed.Willink20f0de42013-06-08 17:13:33 +010023{
Ed Willink70051092015-12-23 19:11:07 +000024 override void generateVisitors(/*@NonNull*/ GenPackage genPackage) {
Ed Willink881d0332013-09-17 15:43:01 +010025 var EPackage ePackage = genPackage.getEcorePackage();
Ed Willink8a7a54b2013-07-11 11:50:57 +010026 if (!isDerived()) {
Ed Willink82adc702014-12-10 14:46:20 +000027 genPackage.generateVisitableInterface();
Ed.Willink20f0de42013-06-08 17:13:33 +010028 }
Ed Willink82adc702014-12-10 14:46:20 +000029 genPackage.generateVisitorInterface();
Ed.Willink20f0de42013-06-08 17:13:33 +010030 ePackage.generateAbstractVisitor();
31 ePackage.generateAbstractNullVisitor();
Ed.Willinkf1ec73c2013-07-10 11:36:49 +010032 ePackage.generateAbstractDelegatingVisitor();
33 ePackage.generateAbstractExtendingVisitor();
Ed Willink0100b5f2015-06-13 17:41:07 +010034 ePackage.generateAbstractMergedVisitor();
Ed Willink28812522013-11-23 12:57:41 +000035 ePackage.generateAbstractWrappingVisitor();
Ed.Willink9ad6ca72013-08-24 14:21:42 +010036 if (isDerived()) {
Ed Willinkfff02f62018-04-03 21:08:12 +010037// ePackage.generateAbstractGenericVisitor("AS2XMIid", typeof(Boolean), typeof(AS2XMIid));
Ed.Willink9ad6ca72013-08-24 14:21:42 +010038 ePackage.generateAbstractGenericVisitor("AS2Moniker", typeof(Object), typeof(AS2Moniker));
Ed.Willinkcb4556a2013-08-27 18:28:21 +010039 ePackage.generateAbstractGenericVisitor("ASSaverLocate", typeof(Object), typeof(ASSaver));
Ed Willinka3f916b2022-08-24 07:39:49 +010040 ePackage.generateAbstractGenericVisitor("ASSaverNormalize", typeof(Object), typeof(AbstractASSaver));
Ed.Willinkcb4556a2013-08-27 18:28:21 +010041 ePackage.generateAbstractGenericVisitor("ASSaverResolve", typeof(Object), typeof(ASSaver));
Ed Willinkfc3d1982015-11-23 11:26:40 +000042 ePackage.generateAbstractTemplateParameterSubstitutionVisitor("TemplateParameterSubstitution", typeof(Object), typeof(EnvironmentFactoryInternal));
Ed Willinkdaed9682019-02-23 22:16:31 +000043 ePackage.generateAbstractFlowAnalysisDeducerVisitor("FlowAnalysisDeducerFromFalse", typeof(Boolean), typeof(FlowAnalysis), false);
44 ePackage.generateAbstractFlowAnalysisDeducerVisitor("FlowAnalysisDeducerFromNull", typeof(Boolean), typeof(FlowAnalysis), true);
45 ePackage.generateAbstractFlowAnalysisDeducerVisitor("FlowAnalysisDeducerFromTrue", typeof(Boolean), typeof(FlowAnalysis), false);
Ed Willink25a14712014-05-06 21:07:10 +010046// ePackage.generateAbstractGenericVisitor("Stepper", typeof(IStepper), typeof(Object));
Ed.Willink9ad6ca72013-08-24 14:21:42 +010047 }
Ed Willink26704252014-12-05 17:14:01 +000048 /* ePackage.generateDecorableVisitorInterface("org.eclipse.ocl.pivot.util.Visitor"); */
Ed.Willink20f0de42013-06-08 17:13:33 +010049 }
50}