diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java')
-rw-r--r-- | plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java | 67 |
1 files changed, 2 insertions, 65 deletions
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java index 1e5657ed4..efc544c98 100644 --- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java +++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/ITranslationProvider.java @@ -14,17 +14,12 @@ package org.eclipse.etrice.generator.base; import java.util.ArrayList; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.etrice.core.room.ActorClass; import org.eclipse.etrice.core.room.Attribute; -import org.eclipse.etrice.core.room.DataClass; -import org.eclipse.etrice.core.fsm.fSM.DetailCode; import org.eclipse.etrice.core.room.EnumLiteral; import org.eclipse.etrice.core.room.InterfaceItem; import org.eclipse.etrice.core.room.Message; import org.eclipse.etrice.core.room.Operation; -import org.eclipse.etrice.core.room.PortClass; -import org.eclipse.etrice.core.room.ProtocolClass; +import org.eclipse.etrice.generator.fsm.base.IFSMTranslationProvider; /** * This interface is used by the detail code parser to replace @@ -45,35 +40,7 @@ import org.eclipse.etrice.core.room.ProtocolClass; * * @author Henrik Rentz-Reichert */ -public interface ITranslationProvider { - - /** - * start sequence for tags to be translated - */ - public static final String TAG_START = "<|"; - /** - * end sequence for tags to be translated - */ - public static final String TAG_END = "|>"; - - /** - * the container class for which translations have to be provided. - * This can be either of - * <ul> - * <li>{@link ActorClass}</li> - * <li>{@link DataClass}</li> - * <li>{@link ProtocolClass}</li> - * <li>{@link PortClass}</li> - * </ul> - * - * @param container - */ - void setContainerClass(EObject container); - - /** - * @return true if translation should be applied to members (attributes, operations and port.msg - */ - boolean translateMembers(); +public interface ITranslationProvider extends IFSMTranslationProvider { /** * yield text to read an attribute (array index may be null). Is called whenever <i>attribute</i> @@ -112,21 +79,6 @@ public interface ITranslationProvider { String getOperationText(Operation op, ArrayList<String> args, String orig); /** - * yield a sequence that sends a message through an interface item (port or SAP). - * Is called whenever <i>port</i>.<i>msg</i>(<i>args</i>) - * or <i>port</i>[<i>index</i>].<i>msg</i>(<i>args</i>) is found in the detail code - * - * @param item the interface item - * @param msg the message to send - * @param args the message data - * @param index array index for replicated ports, should be null for simple ports - * and may be null for broadcast through replicated port - * @param orig the original text - * @return the translation - */ - String getInterfaceItemMessageText(InterfaceItem item, Message msg, ArrayList<String> args, String index, String orig); - - /** * yields a sequence that reads data from a <b>data driven</b> port. * Is called whenever <i>port</i>.<i>msg</i> or <i>port</i>[<i>index</i>].<i>msg</i> * is found in the detail code @@ -137,21 +89,6 @@ public interface ITranslationProvider { * @return the translation */ String getInterfaceItemMessageValue(InterfaceItem item, Message msg, String orig); - - /** - * @return true if translations are provided for tags - */ - boolean translateTags(); - - /** - * yield a replacement for a tag. Is called whenever <|<i>tag</i>|> - * is found in the detail code - * - * @param tag the tag name - * @param code the detail code containing the tag - * @return the translated tag - */ - String translateTag(String tag, DetailCode code); /** * @return true if translations are provided for enumerations |