Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9a96a43ddab38b6df52945c786664996ec9c99c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*****************************************************************************
 * Copyright (c) 2015 Christian W. Damus and others.
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   Christian W. Damus - Initial API and implementation
 *   
 *****************************************************************************/

package org.eclipse.papyrus.dev.assistants.codegen.generator;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
import org.eclipse.papyrus.uml.profile.assistants.generator.ModelingAssistantProviderRule;
import org.eclipse.papyrus.uml.profile.types.generator.Identifiers;
import org.eclipse.papyrus.uml.profile.types.generator.InputModel;

/**
 * The Guice injector module for the Element Types to Modeling Assistants transformation.
 */
public class GeneratorModule extends org.eclipse.papyrus.uml.profile.assistants.generator.GeneratorModule {
	public GeneratorModule() {
		this(new Identifiers());
	}

	public GeneratorModule(Identifiers identifiers) {
		super(identifiers);
	}

	@Override
	protected void configure() {
		super.configure();

		bindElementTypeToAssistantRule();
	}

	protected void bindElementTypeToAssistantRule() {
		// Pass
	}

	@Override
	protected void bindInputType() {
		bind(EClass.class).annotatedWith(InputModel.class).toInstance(ElementTypesConfigurationsPackage.Literals.ELEMENT_TYPE_SET_CONFIGURATION);
	}

	@Override
	protected void bindModelingAssistantProviderRule() {
		bind(ModelingAssistantProviderRule.class).to(org.eclipse.papyrus.dev.assistants.codegen.generator.ModelingAssistantProviderRule.class);
	}
}

Back to the top