Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-11-12 10:41:37 +0000
committerMarkus Tiede2014-11-12 10:45:31 +0000
commiteceedd8e89a7be44240ea7130dcf489e14f930c2 (patch)
treecb80052dd264f2545ec280496f15f13dd4a79c90 /org.eclipse.jubula.toolkit.api.gen
parent5e826fd70140dd7fa5bc0d9dc69fc7c55215f59e (diff)
downloadorg.eclipse.jubula.core-eceedd8e89a7be44240ea7130dcf489e14f930c2.tar.gz
org.eclipse.jubula.core-eceedd8e89a7be44240ea7130dcf489e14f930c2.tar.xz
org.eclipse.jubula.core-eceedd8e89a7be44240ea7130dcf489e14f930c2.zip
Non-sprint task - replace tabs with spaces in javajet templates
Diffstat (limited to 'org.eclipse.jubula.toolkit.api.gen')
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet328
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/FactoryGenerator.javajet80
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/ToolkitInfoGenerator.javajet98
3 files changed, 253 insertions, 253 deletions
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
index cd06ce758..181ca12b8 100644
--- a/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/ClassGenerator.javajet
@@ -1,76 +1,76 @@
<%@ jet
package="org.eclipse.jubula.toolkit.api.gen"
imports="java.util.*
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.ComponentGenInfo
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
- org.eclipse.jubula.toolkit.api.gen.internal.utils.NameLoader
- org.eclipse.jubula.toolkit.enums.LiteralProvider
- org.eclipse.jubula.tools.internal.xml.businessmodell.Action
- org.eclipse.jubula.tools.internal.xml.businessmodell.Component
- org.eclipse.jubula.tools.internal.xml.businessmodell.ConcreteComponent
- org.eclipse.jubula.tools.internal.xml.businessmodell.Param"
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.ComponentGenInfo
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
+ org.eclipse.jubula.toolkit.api.gen.internal.utils.NameLoader
+ org.eclipse.jubula.toolkit.enums.LiteralProvider
+ org.eclipse.jubula.tools.internal.xml.businessmodell.Action
+ org.eclipse.jubula.tools.internal.xml.businessmodell.Component
+ org.eclipse.jubula.tools.internal.xml.businessmodell.ConcreteComponent
+ org.eclipse.jubula.tools.internal.xml.businessmodell.Param"
class="ClassGenerator"%>
<%
CommonGenInfo genInfo = (CommonGenInfo)argument;
Object specInfo = genInfo.getSpecificInformation();
if (specInfo instanceof ComponentGenInfo) {
- ComponentGenInfo compGenInfo = (ComponentGenInfo) specInfo;
- String toolkitName = genInfo.getToolkitName();
- String className = genInfo.getClassName();
- Component component = compGenInfo.getComponent();
- Boolean genInterface = compGenInfo.generatesInterface();
- Boolean hasDefaultMapping = compGenInfo.hasDefaultMapping();
- Map<String, String> compNameMap = compGenInfo.getCompNameMap();
- String packageName = null;
- if (genInterface) {
- packageName = compGenInfo.getInterfacePackageName();
- compNameMap.put("interfacePackageName", packageName);
- compNameMap.put("componentTypeName", className);
+ ComponentGenInfo compGenInfo = (ComponentGenInfo) specInfo;
+ String toolkitName = genInfo.getToolkitName();
+ String className = genInfo.getClassName();
+ Component component = compGenInfo.getComponent();
+ Boolean genInterface = compGenInfo.generatesInterface();
+ Boolean hasDefaultMapping = compGenInfo.hasDefaultMapping();
+ Map<String, String> compNameMap = compGenInfo.getCompNameMap();
+ String packageName = null;
+ if (genInterface) {
+ packageName = compGenInfo.getInterfacePackageName();
+ compNameMap.put("interfacePackageName", packageName);
+ compNameMap.put("componentTypeName", className);
compNameMap.put("hasDefaultMapping", hasDefaultMapping.toString());
- CommonGenInfo faketory =
+ CommonGenInfo faketory =
new CommonGenInfo(component.getToolkitDesriptor(), false);
compNameMap.put("factoryName", faketory.getFqClassName());
- } else {
- packageName = genInfo.getClassPackageName();
- compNameMap.put("implClassPackageName", packageName);
- }
- String implementedTypeFqn = compGenInfo.getFqInterfaceName();
-
- NameLoader nameLoader = NameLoader.getInstance();
- List<Action> actions = new ArrayList<>(component.getActions());
- List<Component> realized = component.getRealized();
- Component realizedComponent = realized.size() > 0 ? realized.get(0) : null;
- Boolean hasRealizedType = (realizedComponent != null);
- String realizedType = null;
- CommonGenInfo superInfo = null;
- List<Action> superActions = null;
- String realizedTypeFqn = null;
- if (hasRealizedType) {
- realizedType = realizedComponent.getType();
- superInfo = new CommonGenInfo(realizedComponent);
- superActions = realizedComponent.getActions();
- if (genInterface) {
- ComponentGenInfo superCompGenInfo = new ComponentGenInfo(
- realizedComponent, true, superInfo.getToolkitName(),
- superInfo.getClassName(), null);
- realizedTypeFqn = superCompGenInfo.getFqInterfaceName();
- compNameMap.put("superComp", realizedComponent.getType());
- } else {
- realizedTypeFqn = superInfo.getFqClassName();
- }
- }
- String testerClass = "";
- String componentClassName = "";
- Boolean hasComponentClass = false;
- if (component instanceof ConcreteComponent) {
- ConcreteComponent concreteComponent = (ConcreteComponent)component;
- testerClass = concreteComponent.getTesterClass();
- componentClassName = concreteComponent.getComponentClass().getName();
- if (!componentClassName.isEmpty()) {
- hasComponentClass = true;
- }
- }
- %>
+ } else {
+ packageName = genInfo.getClassPackageName();
+ compNameMap.put("implClassPackageName", packageName);
+ }
+ String implementedTypeFqn = compGenInfo.getFqInterfaceName();
+
+ NameLoader nameLoader = NameLoader.getInstance();
+ List<Action> actions = new ArrayList<>(component.getActions());
+ List<Component> realized = component.getRealized();
+ Component realizedComponent = realized.size() > 0 ? realized.get(0) : null;
+ Boolean hasRealizedType = (realizedComponent != null);
+ String realizedType = null;
+ CommonGenInfo superInfo = null;
+ List<Action> superActions = null;
+ String realizedTypeFqn = null;
+ if (hasRealizedType) {
+ realizedType = realizedComponent.getType();
+ superInfo = new CommonGenInfo(realizedComponent);
+ superActions = realizedComponent.getActions();
+ if (genInterface) {
+ ComponentGenInfo superCompGenInfo = new ComponentGenInfo(
+ realizedComponent, true, superInfo.getToolkitName(),
+ superInfo.getClassName(), null);
+ realizedTypeFqn = superCompGenInfo.getFqInterfaceName();
+ compNameMap.put("superComp", realizedComponent.getType());
+ } else {
+ realizedTypeFqn = superInfo.getFqClassName();
+ }
+ }
+ String testerClass = "";
+ String componentClassName = "";
+ Boolean hasComponentClass = false;
+ if (component instanceof ConcreteComponent) {
+ ConcreteComponent concreteComponent = (ConcreteComponent)component;
+ testerClass = concreteComponent.getTesterClass();
+ componentClassName = concreteComponent.getComponentClass().getName();
+ if (!componentClassName.isEmpty()) {
+ hasComponentClass = true;
+ }
+ }
+ %>
/*******************************************************************************
* Copyright (c) 2014 BREDEX GmbH.
* All rights reserved. This program and the accompanying materials
@@ -109,107 +109,107 @@ import org.eclipse.jubula.toolkit.internal.annotations.TesterClass;
@TesterClass(testerClass="<%=testerClass%>")<%}%>
<%}%>
public <%if (genInterface) {%>interface<%} else {%>class<%}%> <%=className%>
- <%if (hasRealizedType) {%>extends <%=realizedTypeFqn%><%}%>
- <%if (!genInterface) {%>implements <%=implementedTypeFqn%><%}%> {
- <%// generate constructor only for implementation classes%>
- <%if (!genInterface) {%>
- <%/* check whether constructor should call super
- and whether constructor needs an object mapping */%>
- <%if (hasRealizedType) {%>
- <%if (hasDefaultMapping) {%>
- public <%=className%>() {
- super();
- }<%} else {%>
- public <%=className%>(@NonNull ComponentIdentifier componentIdentifier) {
- super(componentIdentifier);
- }<%}%>
- <%} else {%>
- <%if (hasDefaultMapping) {%>
- public <%=className%>() {
- super();
- }<%} else {%>
- @NonNull protected IComponentIdentifier m_componentIdentifier;
- public <%=className%>(@NonNull ComponentIdentifier componentIdentifier) {
- super();
- Validate.isTrue(componentIdentifier instanceof IComponentIdentifier);
- m_componentIdentifier = (IComponentIdentifier) componentIdentifier;
- }<%}%>
- <%}%>
- <%}%>
-
- <%if (!genInterface && hasDefaultMapping) {%>
- protected IComponentIdentifier getPseudoComponentIdentifier() {
- <%if (hasComponentClass) {%>
- org.eclipse.jubula.tools.internal.objects.ComponentIdentifier pseudoIdentifier =
- new org.eclipse.jubula.tools.internal.objects.ComponentIdentifier();
- pseudoIdentifier.setComponentClassName("<%=componentClassName%>"); //$NON-NLS-1$
- return pseudoIdentifier;
- <%} else {%>
- return null;
- <%}%>
- }<%}%>
-
- <%
- if (superActions != null) {
- // generate only methods for non-inherited actions
- actions.removeAll(superActions);
- }
- // generate method for each action
- Iterator<Action> actionsIterator = actions.iterator();
- while (actionsIterator.hasNext()) {
- Action action = actionsIterator.next();
- if (action.isITEInvolved()) {
- continue;
- }
- String methodName = nameLoader.translateFromCompSystem(action.getName());
- compNameMap.put(action.getName(), methodName);
- List<Param> params = action.getParams();
- if (!params.isEmpty()) {
- %>
- /**
- * @throws IllegalArgumentException Throws an IllegalArgumentException if one of the parameters is null.
- */<%}%>
- <%if (action.isDeprecated()) {%>@Deprecated<%}%>
- @NonNull public CAP <%=methodName%>(
- <%
- // add parameters to method
- Map<String, String> paramMap = new HashMap<String, String>();// with enums
- Map<String, String> paramTypeMap = new HashMap<String, String>();// only "simple" types
- Iterator<Param> paramIterator = params.iterator();
- while (paramIterator.hasNext()) {
- Param param = paramIterator.next();
- String type = param.getType();
- String name = param.getName();
- String paramType = nameLoader.findTypeForParameter(type, name);
- String paramName = nameLoader.translateFromCompSystem(name);
- String fixedType = nameLoader.getRealTypeForParameter(type, name);
- paramMap.put(name, paramType);
- paramTypeMap.put(name, fixedType);
- %>
- @NonNull <%=paramType%> <%=paramName%><%if(paramIterator.hasNext()){%>,<%}%>
- <%}%>
- ) <%if (!params.isEmpty()) {%>throws IllegalArgumentException<%} if (genInterface) {%>;<%} else {%> {
- MessageCap messageCap = new MessageCap();
- messageCap.setMethod("<%=action.getMethod()%>"); //$NON-NLS-1$
- messageCap.sethasDefaultMapping(<%=hasDefaultMapping%>);
- <%if (!hasDefaultMapping) {%>
- messageCap.setCi(m_componentIdentifier);
- <%} else {%>
- messageCap.setCi(getPseudoComponentIdentifier());<%}%>
- <%for (Param parameter : params) {
- String paramName = parameter.getName();%>
- <%String translatedParamName = nameLoader.translateFromCompSystem(paramName);%>
- Validate.notNull(<%=translatedParamName%>, "Argument '<%=translatedParamName%>' must not be null"); //$NON-NLS-1$
- <%String paramEnumType = paramMap.get(paramName);%>
- <%String paramType = paramTypeMap.get(paramName);%>
- <%if (nameLoader.isInEnumMap(paramEnumType)) {%>
- messageCap.addMessageParam(new MessageParam(<%=translatedParamName%>.rcValue(), "<%=paramType%>")); //$NON-NLS-1$
- <%} else {%>
- messageCap.addMessageParam(new MessageParam(<%=translatedParamName%>.toString(), "<%=paramType%>")); //$NON-NLS-1$
- <%}%>
- <%}%>
- return messageCap;
- }<%}%>
- <%}%>
+ <%if (hasRealizedType) {%>extends <%=realizedTypeFqn%><%}%>
+ <%if (!genInterface) {%>implements <%=implementedTypeFqn%><%}%> {
+ <%// generate constructor only for implementation classes%>
+ <%if (!genInterface) {%>
+ <%/* check whether constructor should call super
+ and whether constructor needs an object mapping */%>
+ <%if (hasRealizedType) {%>
+ <%if (hasDefaultMapping) {%>
+ public <%=className%>() {
+ super();
+ }<%} else {%>
+ public <%=className%>(@NonNull ComponentIdentifier componentIdentifier) {
+ super(componentIdentifier);
+ }<%}%>
+ <%} else {%>
+ <%if (hasDefaultMapping) {%>
+ public <%=className%>() {
+ super();
+ }<%} else {%>
+ @NonNull protected IComponentIdentifier m_componentIdentifier;
+ public <%=className%>(@NonNull ComponentIdentifier componentIdentifier) {
+ super();
+ Validate.isTrue(componentIdentifier instanceof IComponentIdentifier);
+ m_componentIdentifier = (IComponentIdentifier) componentIdentifier;
+ }<%}%>
+ <%}%>
+ <%}%>
+
+ <%if (!genInterface && hasDefaultMapping) {%>
+ protected IComponentIdentifier getPseudoComponentIdentifier() {
+ <%if (hasComponentClass) {%>
+ org.eclipse.jubula.tools.internal.objects.ComponentIdentifier pseudoIdentifier =
+ new org.eclipse.jubula.tools.internal.objects.ComponentIdentifier();
+ pseudoIdentifier.setComponentClassName("<%=componentClassName%>"); //$NON-NLS-1$
+ return pseudoIdentifier;
+ <%} else {%>
+ return null;
+ <%}%>
+ }<%}%>
+
+ <%
+ if (superActions != null) {
+ // generate only methods for non-inherited actions
+ actions.removeAll(superActions);
+ }
+ // generate method for each action
+ Iterator<Action> actionsIterator = actions.iterator();
+ while (actionsIterator.hasNext()) {
+ Action action = actionsIterator.next();
+ if (action.isITEInvolved()) {
+ continue;
+ }
+ String methodName = nameLoader.translateFromCompSystem(action.getName());
+ compNameMap.put(action.getName(), methodName);
+ List<Param> params = action.getParams();
+ if (!params.isEmpty()) {
+ %>
+ /**
+ * @throws IllegalArgumentException Throws an IllegalArgumentException if one of the parameters is null.
+ */<%}%>
+ <%if (action.isDeprecated()) {%>@Deprecated<%}%>
+ @NonNull public CAP <%=methodName%>(
+ <%
+ // add parameters to method
+ Map<String, String> paramMap = new HashMap<String, String>();// with enums
+ Map<String, String> paramTypeMap = new HashMap<String, String>();// only "simple" types
+ Iterator<Param> paramIterator = params.iterator();
+ while (paramIterator.hasNext()) {
+ Param param = paramIterator.next();
+ String type = param.getType();
+ String name = param.getName();
+ String paramType = nameLoader.findTypeForParameter(type, name);
+ String paramName = nameLoader.translateFromCompSystem(name);
+ String fixedType = nameLoader.getRealTypeForParameter(type, name);
+ paramMap.put(name, paramType);
+ paramTypeMap.put(name, fixedType);
+ %>
+ @NonNull <%=paramType%> <%=paramName%><%if(paramIterator.hasNext()){%>,<%}%>
+ <%}%>
+ ) <%if (!params.isEmpty()) {%>throws IllegalArgumentException<%} if (genInterface) {%>;<%} else {%> {
+ MessageCap messageCap = new MessageCap();
+ messageCap.setMethod("<%=action.getMethod()%>"); //$NON-NLS-1$
+ messageCap.sethasDefaultMapping(<%=hasDefaultMapping%>);
+ <%if (!hasDefaultMapping) {%>
+ messageCap.setCi(m_componentIdentifier);
+ <%} else {%>
+ messageCap.setCi(getPseudoComponentIdentifier());<%}%>
+ <%for (Param parameter : params) {
+ String paramName = parameter.getName();%>
+ <%String translatedParamName = nameLoader.translateFromCompSystem(paramName);%>
+ Validate.notNull(<%=translatedParamName%>, "Argument '<%=translatedParamName%>' must not be null"); //$NON-NLS-1$
+ <%String paramEnumType = paramMap.get(paramName);%>
+ <%String paramType = paramTypeMap.get(paramName);%>
+ <%if (nameLoader.isInEnumMap(paramEnumType)) {%>
+ messageCap.addMessageParam(new MessageParam(<%=translatedParamName%>.rcValue(), "<%=paramType%>")); //$NON-NLS-1$
+ <%} else {%>
+ messageCap.addMessageParam(new MessageParam(<%=translatedParamName%>.toString(), "<%=paramType%>")); //$NON-NLS-1$
+ <%}%>
+ <%}%>
+ return messageCap;
+ }<%}%>
+ <%}%>
}
<%}%> \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/FactoryGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/FactoryGenerator.javajet
index a60db0ea8..8203a46c9 100644
--- a/org.eclipse.jubula.toolkit.api.gen/templates/FactoryGenerator.javajet
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/FactoryGenerator.javajet
@@ -1,10 +1,10 @@
<%@ jet
package="org.eclipse.jubula.toolkit.api.gen"
imports="java.util.*
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.FactoryGenInfo
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CompInfoForFactoryGen
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
- org.eclipse.jubula.tools.internal.xml.businessmodell.ComponentClass"
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.FactoryGenInfo
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CompInfoForFactoryGen
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
+ org.eclipse.jubula.tools.internal.xml.businessmodell.ComponentClass"
class="FactoryGenerator"%>
<%
CommonGenInfo genInfo = (CommonGenInfo)argument;
@@ -12,10 +12,10 @@ String factoryName = genInfo.getClassName();
String packageName = genInfo.getClassPackageName();
Object specInfo = genInfo.getSpecificInformation();
if (specInfo instanceof FactoryGenInfo) {
- FactoryGenInfo factoryInfo = (FactoryGenInfo) specInfo;
- List<CompInfoForFactoryGen> compInfoList = factoryInfo.getCompInformation();
- String toolkitInfoName = factoryInfo.getToolkitInfoName();
- String toolkitInfoFqName = factoryInfo.getToolkitInfoFqName();
+ FactoryGenInfo factoryInfo = (FactoryGenInfo) specInfo;
+ List<CompInfoForFactoryGen> compInfoList = factoryInfo.getCompInformation();
+ String toolkitInfoName = factoryInfo.getToolkitInfoName();
+ String toolkitInfoFqName = factoryInfo.getToolkitInfoFqName();
%>
/*******************************************************************************
* Copyright (c) 2014 BREDEX GmbH.
@@ -41,41 +41,41 @@ import org.eclipse.jubula.toolkit.ToolkitInfo;
* @noextend This class is not intended to be extended by clients.
*/
public final class <%=factoryName%> {
-
- <%if (toolkitInfoName != null) {%>
- @NonNull private final static ToolkitInfo m_toolkitInformation = new <%=toolkitInfoName%>();<%}%>
+
+ <%if (toolkitInfoName != null) {%>
+ @NonNull private final static ToolkitInfo m_toolkitInformation = new <%=toolkitInfoName%>();<%}%>
- private <%=factoryName%>() {
- super();
- }
-
- <%if (toolkitInfoName != null) {%>
- @NonNull public static ToolkitInfo getToolkitInformation() {
- return m_toolkitInformation;
- }<%}%>
+ private <%=factoryName%>() {
+ super();
+ }
+
+ <%if (toolkitInfoName != null) {%>
+ @NonNull public static ToolkitInfo getToolkitInformation() {
+ return m_toolkitInformation;
+ }<%}%>
<%for (CompInfoForFactoryGen compInfo : compInfoList) {
- String componentName = compInfo.getComponentName();
- String implClassName = compInfo.getClassName();
- ComponentClass componentClass = compInfo.getComponentClass();
- String componentClassName = "";
- boolean hasComponentClass = false;
- if (componentClass != null && !componentClass.getName().isEmpty()) {
- componentClassName = componentClass.getName();
- hasComponentClass = true;
- }
- String returnType = compInfo.getMostSpecificVisibleSuperTypeName();
- Boolean hasDefaultMapping = compInfo.hasDefaultMapping();%>
- <%if (hasDefaultMapping) {%>
- /** create a new representative for a {@link <%=componentName%>} component.*/
- @NonNull public static <%=returnType%> create<%=componentName%> () {
- return new <%=implClassName%>();
- }<%} else {%>
- /** create a new representative for a <%if (hasComponentClass) {%>{@link <%=componentClassName%>}<%} else {%><%=componentName%><%}%> UI component.*/
- @NonNull public static <%=returnType%> create<%=componentName%> (@NonNull ComponentIdentifier componentIdentifier) {
- Validate.notNull(componentIdentifier);
- return new <%=implClassName%>(componentIdentifier);
- }<%}%>
+ String componentName = compInfo.getComponentName();
+ String implClassName = compInfo.getClassName();
+ ComponentClass componentClass = compInfo.getComponentClass();
+ String componentClassName = "";
+ boolean hasComponentClass = false;
+ if (componentClass != null && !componentClass.getName().isEmpty()) {
+ componentClassName = componentClass.getName();
+ hasComponentClass = true;
+ }
+ String returnType = compInfo.getMostSpecificVisibleSuperTypeName();
+ Boolean hasDefaultMapping = compInfo.hasDefaultMapping();%>
+ <%if (hasDefaultMapping) {%>
+ /** create a new representative for a {@link <%=componentName%>} component.*/
+ @NonNull public static <%=returnType%> create<%=componentName%> () {
+ return new <%=implClassName%>();
+ }<%} else {%>
+ /** create a new representative for a <%if (hasComponentClass) {%>{@link <%=componentClassName%>}<%} else {%><%=componentName%><%}%> UI component.*/
+ @NonNull public static <%=returnType%> create<%=componentName%> (@NonNull ComponentIdentifier componentIdentifier) {
+ Validate.notNull(componentIdentifier);
+ return new <%=implClassName%>(componentIdentifier);
+ }<%}%>
<%}%>
}
<%}%> \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/ToolkitInfoGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/ToolkitInfoGenerator.javajet
index e642815a1..dba365d88 100644
--- a/org.eclipse.jubula.toolkit.api.gen/templates/ToolkitInfoGenerator.javajet
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/ToolkitInfoGenerator.javajet
@@ -1,11 +1,11 @@
<%@ jet
package="org.eclipse.jubula.toolkit.api.gen"
imports="java.util.*
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CompInfoForToolkitGen
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
- org.eclipse.jubula.toolkit.api.gen.internal.genmodel.ToolkitGenInfo
- org.eclipse.jubula.tools.internal.xml.businessmodell.ComponentClass
- org.eclipse.jubula.tools.internal.xml.businessmodell.Property"
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CompInfoForToolkitGen
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.CommonGenInfo
+ org.eclipse.jubula.toolkit.api.gen.internal.genmodel.ToolkitGenInfo
+ org.eclipse.jubula.tools.internal.xml.businessmodell.ComponentClass
+ org.eclipse.jubula.tools.internal.xml.businessmodell.Property"
class="ToolkitInfoGenerator"%>
<%
CommonGenInfo genInfo = (CommonGenInfo)argument;
@@ -13,8 +13,8 @@ String className = genInfo.getClassName();
String packageName = genInfo.getClassPackageName();
Object specInfo = genInfo.getSpecificInformation();
if (specInfo instanceof ToolkitGenInfo) {
- ToolkitGenInfo toolkitInfo = (ToolkitGenInfo) specInfo;
- List<CompInfoForToolkitGen> compInfoList = toolkitInfo.getCompInformation();
+ ToolkitGenInfo toolkitInfo = (ToolkitGenInfo) specInfo;
+ List<CompInfoForToolkitGen> compInfoList = toolkitInfo.getCompInformation();
%>
/*******************************************************************************
* Copyright (c) 2014 BREDEX GmbH.
@@ -43,48 +43,48 @@ import org.eclipse.jubula.tools.internal.xml.businessmodell.Property;
*/
public final class <%=className%> extends AbstractToolkitInfo {
- @NonNull private Map<ComponentClass, String> m_map = new HashMap<ComponentClass, String>();
+ @NonNull private Map<ComponentClass, String> m_map = new HashMap<ComponentClass, String>();
- /**
- * Constructor
- */
- public <%=className%>() {
- <%int i = 1;%>
- <%for (CompInfoForToolkitGen compInfo : compInfoList) {
- ComponentClass componentClass = compInfo.getComponentClass();
- String testerClass = compInfo.getTesterClass();
- if (componentClass != null && testerClass != null) {%>
- ComponentClass newComponentClass<%=i%> = new ComponentClass("<%=componentClass.getName()%>"); //$NON-NLS-1$
- <%List properties = componentClass.getProperties();%>
- <%if (!properties.isEmpty()) {%>
- List<Property> newProperties<%=i%> = new ArrayList<Property>();
- <%int j = 1;%>
- <%for (Object obj : properties) {%>
- <%if (obj instanceof Property) {
- Property property = (Property) obj;%>
- Property newProperty<%=i%>_<%=j%> = new Property();
- newProperty<%=i%>_<%=j%>.setName("<%=property.getName()%>"); //$NON-NLS-1$
- newProperty<%=i%>_<%=j%>.setValue("<%=property.getValue()%>"); //$NON-NLS-1$
- newProperties<%=i%>.add(newProperty<%=i%>_<%=j%>);
- <%}%>
- <%j++;%>
- <%}%>
- newComponentClass<%=i%>.setProperties(newProperties<%=i%>);
- <%}%>
- m_map.put(newComponentClass<%=i%>,"<%=testerClass%>"); //$NON-NLS-1$
- <%}%>
- <%i++;%>
- <%}%>
- }
-
- /** {@inheritDoc} */
- @NonNull public Map<ComponentClass, String> getTypeMapping() {
- return m_map;
- }
-
- /** {@inheritDoc} */
- @NonNull public String getToolkitID() {
- return "<%=genInfo.getToolkitID()%>"; //$NON-NLS-1$
- }
+ /**
+ * Constructor
+ */
+ public <%=className%>() {
+ <%int i = 1;%>
+ <%for (CompInfoForToolkitGen compInfo : compInfoList) {
+ ComponentClass componentClass = compInfo.getComponentClass();
+ String testerClass = compInfo.getTesterClass();
+ if (componentClass != null && testerClass != null) {%>
+ ComponentClass newComponentClass<%=i%> = new ComponentClass("<%=componentClass.getName()%>"); //$NON-NLS-1$
+ <%List properties = componentClass.getProperties();%>
+ <%if (!properties.isEmpty()) {%>
+ List<Property> newProperties<%=i%> = new ArrayList<Property>();
+ <%int j = 1;%>
+ <%for (Object obj : properties) {%>
+ <%if (obj instanceof Property) {
+ Property property = (Property) obj;%>
+ Property newProperty<%=i%>_<%=j%> = new Property();
+ newProperty<%=i%>_<%=j%>.setName("<%=property.getName()%>"); //$NON-NLS-1$
+ newProperty<%=i%>_<%=j%>.setValue("<%=property.getValue()%>"); //$NON-NLS-1$
+ newProperties<%=i%>.add(newProperty<%=i%>_<%=j%>);
+ <%}%>
+ <%j++;%>
+ <%}%>
+ newComponentClass<%=i%>.setProperties(newProperties<%=i%>);
+ <%}%>
+ m_map.put(newComponentClass<%=i%>,"<%=testerClass%>"); //$NON-NLS-1$
+ <%}%>
+ <%i++;%>
+ <%}%>
+ }
+
+ /** {@inheritDoc} */
+ @NonNull public Map<ComponentClass, String> getTypeMapping() {
+ return m_map;
+ }
+
+ /** {@inheritDoc} */
+ @NonNull public String getToolkitID() {
+ return "<%=genInfo.getToolkitID()%>"; //$NON-NLS-1$
+ }
}
<%}%> \ No newline at end of file

Back to the top