Skip to main content
summaryrefslogtreecommitdiffstats
blob: 48311b750c2eea04287c872a04240b520f0fcd7e (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*******************************************************************************
 * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * CONTRIBUTORS:
 * 		Henrik Rentz-Reichert (initial contribution)
 * 
 *******************************************************************************/

package org.eclipse.etrice.generator.fsm.base;

import java.util.ArrayList;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
import org.eclipse.etrice.core.fsm.fSM.DetailCode;
import org.eclipse.etrice.core.fsm.naming.FSMNameProvider;
import org.eclipse.etrice.core.fsm.util.FSMHelpers;
import org.eclipse.etrice.core.genmodel.fsm.ILogger;

import com.google.inject.Inject;

/**
 * @author Henrik Rentz-Reichert
 *
 */
public class DefaultFSMTranslationProvider implements IFSMTranslationProvider {

	/**
	 * the logger used for issuing informations
	 */
	@Inject
	protected ILogger logger;
	
	/**
	 * the name provider for model objects
	 */
	@Inject
	protected FSMNameProvider fsmNameProvider;
	
	/**
	 * utility methods
	 */
	@Inject
	protected FSMHelpers fsmHelpers;

	/**
	 * @return <code>false</code>
	 * @see org.eclipse.etrice.generator.base.ITranslationProvider#translateMembers()
	 */
	@Override
	public boolean translateMembers() {
		return false;
	}

	/**
	 * @return the original String
	 * @see org.eclipse.etrice.generator.base.ITranslationProvider#getInterfaceItemMessageText(org.eclipse.etrice.core.room.InterfaceItem, org.eclipse.etrice.core.room.Message, java.util.ArrayList, java.lang.String, java.lang.String)
	 */
	@Override
	public String getInterfaceItemMessageText(AbstractInterfaceItem item, EObject msg,
			ArrayList<String> args, String index, String orig) {
				return orig;
			}

	/**
	 * @return <code>false</code>
	 * @see org.eclipse.etrice.generator.base.ITranslationProvider#translateTags()
	 */
	@Override
	public boolean translateTags() {
		return false;
	}

	/**
	 * translates only the tag <code>MODEL_LOCATION</code> and returns the location of the
	 * detail code <code>code</code> in the model.
	 * 
	 * <p>
	 * Issues an information and returns <code><|?<i>tag</i>?|><code>.
	 * </p>
	 * @see org.eclipse.etrice.generator.base.ITranslationProvider#translateTag(java.lang.String, org.eclipse.etrice.core.room.DetailCode)
	 */
	@Override
	public String translateTag(String tag, DetailCode code) {
		return TAG_START+"?"+tag+"?"+TAG_END;
	}

	@Override
	public void setContainerClass(EObject container) {
	}

}

Back to the top