Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/build.properties3
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/gen.api.xml2
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/generateClasses.xml15
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/pom.xml62
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/resources/apigen.properties18
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/resources/nameMappings.properties9
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/.keep0
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ClassGenerator.java99
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ConfigLoader.java139
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/NameMappingLoader.java81
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet48
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/componentGenerator.javajet71
-rw-r--r--org.eclipse.jubula.toolkit.api/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.jubula.toolkit.api/src/org/eclipse/jubula/toolkit/api/datatype/Variable.java18
-rw-r--r--org.eclipse.jubula.toolkit.base.api/.gitignore1
-rw-r--r--org.eclipse.jubula.toolkit.base.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/RealizedType.java29
-rw-r--r--org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/TesterClass.java29
-rw-r--r--org.eclipse.jubula.toolkit.concrete.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.html.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.javafx.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.mobile.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.mobile.ios.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.rcp.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.rcp.gef.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.swing.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.swt.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.swt.provider/src/org/eclipse/jubula/toolkit/swt/provider/I18nStrings.properties16
-rw-r--r--org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.toolkit.win.apps.api/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/CompSystemProcessor.java13
32 files changed, 596 insertions, 100 deletions
diff --git a/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF
index 3fb248e9c..b874e95c5 100644
--- a/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF
@@ -7,29 +7,19 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.jubula.tools;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.base.api;bundle-version="[2.4.0,2.5.0)",
+Require-Bundle: org.apache.commons.logging;bundle-version="[1.0.0,2.0.0)",
+ org.apache.commons.lang;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.jubula.tools;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.base.provider;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.common;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.concrete.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.concrete.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.html.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.html.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.javafx.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.javafx.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.mobile.api;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.mobile.ios.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.mobile.ios.provider;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.mobile.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.rcp.api;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.rcp.gef.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.rcp.gef.provider;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.rcp.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.swing.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.swing.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.swt.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.swt.provider;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.win.api;bundle-version="[2.4.0,2.5.0)",
- org.eclipse.jubula.toolkit.win.apps.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.win.apps.provider;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.toolkit.win.provider;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.api.gen/build.properties b/org.eclipse.jubula.toolkit.api.gen/build.properties
index 6c35bc414..000f317bd 100644
--- a/org.eclipse.jubula.toolkit.api.gen/build.properties
+++ b/org.eclipse.jubula.toolkit.api.gen/build.properties
@@ -11,7 +11,8 @@ output.. = bin/
jars.compile.order = .
bin.includes = about.html,\
META-INF/,\
- .
+ .,\
+ resources/
javacSource = 1.7
javacTarget = 1.7
javacErrors.. = -assertIdentifier
diff --git a/org.eclipse.jubula.toolkit.api.gen/gen.api.xml b/org.eclipse.jubula.toolkit.api.gen/gen.api.xml
index c6dcdd57d..a39d0be2c 100644
--- a/org.eclipse.jubula.toolkit.api.gen/gen.api.xml
+++ b/org.eclipse.jubula.toolkit.api.gen/gen.api.xml
@@ -7,7 +7,7 @@
-->
<project name="org.eclipse.jubula.toolkit.base.provider" default="gen">
<target name="gen">
- <emf.JETCompiler templateFile="./templates/compGen.javajet"
+ <emf.JETCompiler templateFile="./templates/componentGenerator.javajet"
sourceDirectory="src-gen"/>
</target>
</project> \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/generateClasses.xml b/org.eclipse.jubula.toolkit.api.gen/generateClasses.xml
new file mode 100644
index 000000000..008d9f9db
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/generateClasses.xml
@@ -0,0 +1,15 @@
+<project name="generateClasses" default="execute">
+ <property name="lib.dir" value="target" />
+
+ <target name="execute">
+ <java classname="org.eclipse.jubula.toolkit.api.gen.internal.ClassGenerator" failonerror="true">
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="org.eclipse.jubula.toolkit.api*.jar" />
+ <include name="dependent-libs/**/*.jar" />
+ </fileset>
+ </classpath>
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/pom.xml b/org.eclipse.jubula.toolkit.api.gen/pom.xml
index 534038727..1db7e2500 100644
--- a/org.eclipse.jubula.toolkit.api.gen/pom.xml
+++ b/org.eclipse.jubula.toolkit.api.gen/pom.xml
@@ -22,28 +22,6 @@
<extensions>true</extensions>
</plugin>
<plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <dependency-resolution>
- <extraRequirements>
- <!-- prefer RCP to RAP for compilation -->
- <requirement>
- <type>eclipse-plugin</type>
- <id>org.eclipse.swt</id>
- <versionRange>[3.6,4.0)</versionRange>
- </requirement>
- <requirement>
- <type>eclipse-plugin</type>
- <id>org.eclipse.ui</id>
- <versionRange>[3.6,4.0)</versionRange>
- </requirement>
- </extraRequirements>
- </dependency-resolution>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
@@ -97,7 +75,45 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>lib</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/dependent-libs</outputDirectory>
+ <overWriteReleases>true</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <excludeTransitive>false</excludeTransitive>
+ <stripVersion>true</stripVersion>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>gen-classes</id>
+ <phase>verify</phase>
+ <configuration>
+ <target>
+ <ant antfile="generateClasses.xml" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
-
+
</project>
diff --git a/org.eclipse.jubula.toolkit.api.gen/resources/apigen.properties b/org.eclipse.jubula.toolkit.api.gen/resources/apigen.properties
new file mode 100644
index 000000000..790944a25
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/resources/apigen.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2014 BREDEX GmbH.
+# 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
+###############################################################################
+# Comma-separated list of toolkits to generate
+api.gen.toolkit.names=base, concrete, swing, swt, rcp, rcp.gef, html, javafx
+api.gen.toolkit.name.scheme=../org.eclipse.jubula.toolkit.{0}.provider
+# name of the xml file used to describe a toolkit
+api.gen.toolkit.xml.conf=resources/xml/ComponentConfiguration.xml
+# name of the (base) file containing the resource bundle for each toolkit
+api.gen.toolkit.resourcebundle.path=src
+# fully-qualified name of resource bundle
+api.gen.toolkit.resourcebundle.fqn=org.eclipse.jubula.toolkit.{0}.provider.I18nStrings
+api.gen.toolkit.output={0}
+api.gen.toolkit.generation.dir=../org.eclipse.jubula.toolkit.base.api/src-gen/org/eclipse/jubula/toolkit/base/internal/
diff --git a/org.eclipse.jubula.toolkit.api.gen/resources/nameMappings.properties b/org.eclipse.jubula.toolkit.api.gen/resources/nameMappings.properties
new file mode 100644
index 000000000..ed2ceb067
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/resources/nameMappings.properties
@@ -0,0 +1,9 @@
+###############################################################################
+# Copyright (c) 2014 BREDEX GmbH.
+# 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
+###############################################################################
+# Comma-separated list of toolkits to generate
+guidancer.datatype.Variable=org.eclipse.jubula.toolkit.api.datatype.Variable
diff --git a/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/.keep b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/.keep
deleted file mode 100644
index e69de29bb..000000000
--- a/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/.keep
+++ /dev/null
diff --git a/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ClassGenerator.java b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ClassGenerator.java
new file mode 100644
index 000000000..f62cf615b
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ClassGenerator.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.api.gen.internal;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.jubula.toolkit.api.gen.ComponentGenerator;
+import org.eclipse.jubula.tools.constants.StringConstants;
+import org.eclipse.jubula.tools.utils.generator.CompSystemProcessor;
+import org.eclipse.jubula.tools.utils.generator.ComponentInfo;
+import org.eclipse.jubula.tools.utils.generator.ToolkitConfig;
+import org.eclipse.jubula.tools.xml.businessmodell.Component;
+
+/**
+ * Generates classes for components from comp system
+ */
+public class ClassGenerator {
+
+ /** component generator */
+ private static ComponentGenerator componentGenerator =
+ new ComponentGenerator();
+
+ /**
+ * Constructor
+ */
+ private ClassGenerator() {
+
+ }
+
+ /**
+ * main
+ * @param args args
+ */
+ public static void main(String[] args) {
+ ConfigLoader loader = ConfigLoader.getInstance();
+ String generationDir = loader.getGenerationDir();
+ ToolkitConfig config = loader.getToolkitConfig();
+ CompSystemProcessor processor = new CompSystemProcessor(config);
+
+ List<ComponentInfo> compInfos = processor.getCompInfos(false);
+ for (ComponentInfo compInfo : compInfos) {
+ createClass(compInfo.getComponent(), generationDir);
+ }
+ }
+
+ /**
+ * creates class for component
+ * @param component the component
+ * @param generationDir directory for generation
+ */
+ private static void createClass(Component component, String generationDir) {
+ NameMappingLoader nameLoader = NameMappingLoader.getInstance();
+ String[] splitName = splitName(component.getType());
+ String path = nameLoader.getDesiredName(splitName[0]
+ .replace(StringConstants.DOT, StringConstants.SLASH));
+ String className = nameLoader.getDesiredName(splitName[1]);
+ File dir = new File(generationDir + path);
+ File file = new File(dir, className + ".java"); //$NON-NLS-1$
+ String content = componentGenerator.generate(component);
+
+ if (!file.exists()) {
+ try {
+ dir.mkdirs();
+ file.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ try {
+ FileOutputStream fop = new FileOutputStream(file);
+ byte[] contentInBytes = content.getBytes();
+ fop.write(contentInBytes);
+ fop.flush();
+ fop.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * splits the class name of the full qualified name
+ * @param fullQualifiedName the full qualified name
+ * @return the class name
+ */
+ public static String[] splitName(String fullQualifiedName) {
+ return fullQualifiedName.split("\\.(?=[^\\.]+$)"); //$NON-NLS-1$
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ConfigLoader.java b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ConfigLoader.java
new file mode 100644
index 000000000..9fbd8a33a
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/ConfigLoader.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.api.gen.internal;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jubula.tools.utils.generator.ToolkitConfig;
+
+
+/**
+ * Loads the configuration for the API generation from the properties file. It
+ * is expected that the properties reside in
+ * <code>resources/apigen.properties</code>.
+ *
+ * @author BREDEX GmbH
+ * @created 16.09.2005
+ * @version $Revision: 12986 $
+ */
+public class ConfigLoader {
+ /**
+ * <code>TOOLKIT_LOCATIONS</code>
+ */
+ private static final String TOOLKIT_NAMES =
+ "api.gen.toolkit.names"; //$NON-NLS-1$
+ /**
+ * <code>RESOURCES_APIGEN_PROPERTIES</code>
+ */
+ private static final String RESOURCES_APIGEN_PROPERTIES =
+ "resources/apigen.properties"; //$NON-NLS-1$
+ /**
+ * <code>XML_FILENAME</code>
+ */
+ private static final String XML_PATH =
+ "api.gen.toolkit.xml.conf"; //$NON-NLS-1$
+ /**
+ * <code>RESOURCE_BUNDLE_FILENAME</code>
+ */
+ private static final String RESOURCE_BUNDLE_PATH =
+ "api.gen.toolkit.resourcebundle.path"; //$NON-NLS-1$
+ /**
+ * <code>RESOURCE_BUNDLE_FQN</code>
+ */
+ private static final String RESOURCE_BUNDLE_FQN =
+ "api.gen.toolkit.resourcebundle.fqn"; //$NON-NLS-1$
+ /**
+ * <code>BASEDIR</code>
+ */
+ private static final String BASEDIR = "api.gen.toolkit.name.scheme"; //$NON-NLS-1$
+ /**
+ * <code>OUTPUTDIR</code>
+ */
+ private static final String OUTPUTDIR = "api.gen.toolkit.output"; //$NON-NLS-1$
+ /**
+ * <code>OUTPUTDIR</code>
+ */
+ private static final String GENERATIONDIR = "api.gen.toolkit.generation.dir"; //$NON-NLS-1$
+ /**
+ * <code>instance</code> the singleton instance
+ */
+ private static ConfigLoader instance = null;
+ /**
+ * toolkit filename and path information
+ */
+ private ToolkitConfig m_toolkitConfig;
+ /**
+ * directory for the generation
+ */
+ private String m_generationDir;
+ /**
+ * The constructor.
+ */
+ private ConfigLoader() {
+ try {
+ URL resourceURL = ConfigLoader.class.getClassLoader()
+ .getResource(RESOURCES_APIGEN_PROPERTIES);
+
+ Properties p = new Properties();
+ p.load(resourceURL.openStream());
+
+ String toolkitIDs = p.getProperty(TOOLKIT_NAMES);
+
+ List<String> toolkitIDList = new ArrayList<String>(
+ Arrays.asList(StringUtils.stripAll(
+ StringUtils.split(toolkitIDs, ','))));
+
+ m_toolkitConfig = new ToolkitConfig(
+ p.getProperty(BASEDIR),
+ p.getProperty(XML_PATH),
+ p.getProperty(RESOURCE_BUNDLE_PATH),
+ p.getProperty(RESOURCE_BUNDLE_FQN),
+ p.getProperty(OUTPUTDIR),
+ toolkitIDList);
+
+ m_generationDir = p.getProperty(GENERATIONDIR);
+
+ } catch (IOException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ /**
+ * @return the singleton instance
+ */
+ public static ConfigLoader getInstance() {
+ if (instance == null) {
+ instance = new ConfigLoader();
+ }
+ return instance;
+ }
+
+ /**
+ *
+ * @return a list of toolkit plugin names
+ */
+ public ToolkitConfig getToolkitConfig() {
+ return m_toolkitConfig;
+ }
+
+ /**
+ * @return the generationDir
+ */
+ public String getGenerationDir() {
+ return m_generationDir;
+ }
+}
diff --git a/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/NameMappingLoader.java b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/NameMappingLoader.java
new file mode 100644
index 000000000..a025e739e
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/src/org/eclipse/jubula/toolkit/api/gen/internal/NameMappingLoader.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.api.gen.internal;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+
+
+/**
+ * Loads the configuration for the API generation from the properties file. It
+ * is expected that the properties reside in
+ * <code>resources/apigen.properties</code>.
+ *
+ * @author BREDEX GmbH
+ * @created 16.09.2005
+ * @version $Revision: 12986 $
+ */
+public class NameMappingLoader {
+ /**
+ * <code>RESOURCES_APIGEN_PROPERTIES</code>
+ */
+ private static final String RESOURCES_NAMEMAPPINGS_PROPERTIES =
+ "resources/nameMappings.properties"; //$NON-NLS-1$
+ /**
+ * <code>instance</code> the singleton instance
+ */
+ private static NameMappingLoader instance = null;
+ /**
+ * the mapping properties
+ */
+ private Properties m_mappingProperties;
+
+ /**
+ * The constructor.
+ */
+ private NameMappingLoader() {
+ try {
+ URL resourceURL = NameMappingLoader.class.getClassLoader()
+ .getResource(RESOURCES_NAMEMAPPINGS_PROPERTIES);
+
+ m_mappingProperties = new Properties();
+ m_mappingProperties.load(resourceURL.openStream());
+ } catch (IOException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ /**
+ * @return the singleton instance
+ */
+ public static NameMappingLoader getInstance() {
+ if (instance == null) {
+ instance = new NameMappingLoader();
+ }
+ return instance;
+ }
+
+ /**
+ * Checks in the name mappings property file whether there is a mapping for a
+ * given string and returns it and if not, returns the original string
+ * @param name original name
+ * @return the name which should be used in api
+ */
+ public String getDesiredName(String name) {
+ String mapEntry = m_mappingProperties.getProperty(name);
+ if (mapEntry != null) {
+ return mapEntry;
+ }
+ String desiredName = name.replace("abstract", "base");
+ return desiredName;
+ }
+}
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet
deleted file mode 100644
index 84220b517..000000000
--- a/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet
+++ /dev/null
@@ -1,48 +0,0 @@
-<%@ jet
-package="org.eclipse.jubula.toolkit.api.gen"
-imports="java.util.*
- org.eclipse.jubula.tools.xml.businessmodell.*"
-class="ComponentGenerator"%>
-<%
- Component component = (Component)argument;
- String name = component.getType();
- List<Action> actions = component.getActions();
- %>
-/**
- * Copyright (c) 2014 BREDEX GmbH.
- * All rights reserved.
- */
-package <%="org.eclipse.jubula.toolkit.base"%>;
-
-public class <%=name%> extends {
- Object m_component;
-
- public <%=name%>(Object component) {
- m_component = component;
- }
- <%
- Iterator<Action> actionsIterator = actions.iterator();
- while (actionsIterator.hasNext()) {
- Action action = actionsIterator.next();
- String actionName = action.getName();
- List<Param> params = action.getParams();
- %>
- public void rc<%=actionName%>(
- <%
- Iterator<Param> paramIterator = params.iterator();
- while (paramIterator.hasNext()) {
- Param param = paramIterator.next();
- String paramType = param.getType();
- String paramName = param.getName();
- %>
- <%=paramType%> <%=paramName%><%if(paramIterator.hasNext()){%>,<%}%>
- <%
- }
- %>
- ) {
-
- }
- <%
- }
- %>
-} \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/componentGenerator.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/componentGenerator.javajet
new file mode 100644
index 000000000..49addf3a9
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/componentGenerator.javajet
@@ -0,0 +1,71 @@
+<%@ jet
+package="org.eclipse.jubula.toolkit.api.gen"
+imports="java.util.*
+ org.eclipse.jubula.toolkit.api.gen.internal.ClassGenerator
+ org.eclipse.jubula.toolkit.api.gen.internal.NameMappingLoader
+ org.eclipse.jubula.tools.xml.businessmodell.*"
+class="ComponentGenerator"%>
+<%
+ Component component = (Component)argument;
+ NameMappingLoader nameLoader = NameMappingLoader.getInstance();
+ List<Action> actions = component.getActions();
+ String[] splitName = ClassGenerator.splitName(component.getType());
+ String path = nameLoader.getDesiredName(splitName[0]);
+ String name = nameLoader.getDesiredName(splitName[1]);
+ List<String> realizedTypes = component.getRealizedTypes();
+ String realizedType = realizedTypes.size() > 0 ? realizedTypes.get(0) : null;
+ String testerClass = "";
+ if (component instanceof ConcreteComponent) {
+ testerClass = ((ConcreteComponent)component).getTesterClass();
+ }
+ %>
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package <%="org.eclipse.jubula.toolkit.base.internal." + path%>;
+
+import org.eclipse.jubula.toolkit.base.api.internal.annotations.RealizedType;
+import org.eclipse.jubula.toolkit.base.api.internal.annotations.TesterClass;
+
+@RealizedType(realizedType="<%=realizedType%>")
+@TesterClass(testerClass="<%=testerClass%>")
+public class <%=name%> {
+ Object m_component;
+
+ public <%=name%>(Object component) {
+ m_component = component;
+ }
+ <%
+ Iterator<Action> actionsIterator = actions.iterator();
+ while (actionsIterator.hasNext()) {
+ Action action = actionsIterator.next();
+ String actionName = nameLoader.getDesiredName(action.getMethod());
+ List<Param> params = action.getParams();
+ %>
+ <%if (action.isDeprecated()) {%>@Deprecated<%}%>
+ public void <%=actionName%>(
+ <%
+ Iterator<Param> paramIterator = params.iterator();
+ while (paramIterator.hasNext()) {
+ Param param = paramIterator.next();
+ String paramType = nameLoader.getDesiredName(param.getType());
+ String paramName = nameLoader.getDesiredName(param.getName().replace(".",""));
+ %>
+ <%=paramType%> <%=paramName%><%if(paramIterator.hasNext()){%>,<%}%>
+ <%
+ }
+ %>
+ ) {
+
+ }
+ <%
+ }
+ %>
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.toolkit.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.api/META-INF/MANIFEST.MF
index ddc796372..9d8839fa1 100644
--- a/org.eclipse.jubula.toolkit.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.api/META-INF/MANIFEST.MF
@@ -7,4 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Export-Package: org.eclipse.jubula.toolkit.enums
+Export-Package: org.eclipse.jubula.toolkit.api.datatype,
+ org.eclipse.jubula.toolkit.enums
diff --git a/org.eclipse.jubula.toolkit.api/src/org/eclipse/jubula/toolkit/api/datatype/Variable.java b/org.eclipse.jubula.toolkit.api/src/org/eclipse/jubula/toolkit/api/datatype/Variable.java
new file mode 100644
index 000000000..d2de8bcf8
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api/src/org/eclipse/jubula/toolkit/api/datatype/Variable.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.api.datatype;
+
+/**
+ * @author BREDEX GmbH
+ */
+public class Variable {
+
+}
diff --git a/org.eclipse.jubula.toolkit.base.api/.gitignore b/org.eclipse.jubula.toolkit.base.api/.gitignore
index 934e0e06f..9d12075e6 100644
--- a/org.eclipse.jubula.toolkit.base.api/.gitignore
+++ b/org.eclipse.jubula.toolkit.base.api/.gitignore
@@ -1,2 +1,3 @@
/bin
/target
+/src-gen
diff --git a/org.eclipse.jubula.toolkit.base.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.base.api/META-INF/MANIFEST.MF
index f9d36a255..68cc7424a 100644
--- a/org.eclipse.jubula.toolkit.base.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.base.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/RealizedType.java b/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/RealizedType.java
new file mode 100644
index 000000000..fced99027
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/RealizedType.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.base.api.internal.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author BREDEX GmbH
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface RealizedType {
+
+ /**
+ * returns the realized type of a component
+ */
+ String realizedType();
+}
diff --git a/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/TesterClass.java b/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/TesterClass.java
new file mode 100644
index 000000000..7ea3b14bd
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.base.api/src/org/eclipse/jubula/toolkit/base/api/internal/annotations/TesterClass.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2014 BREDEX GmbH.
+ * 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:
+ * BREDEX GmbH - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.jubula.toolkit.base.api.internal.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author BREDEX GmbH
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface TesterClass {
+
+ /**
+ * returns the realized type of a component
+ */
+ String testerClass();
+}
diff --git a/org.eclipse.jubula.toolkit.concrete.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.concrete.api/META-INF/MANIFEST.MF
index e92f4426c..cec1a01ce 100644
--- a/org.eclipse.jubula.toolkit.concrete.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.concrete.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.html.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.html.api/META-INF/MANIFEST.MF
index ab50a3636..9bdb6bf9f 100644
--- a/org.eclipse.jubula.toolkit.html.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.html.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.javafx.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.javafx.api/META-INF/MANIFEST.MF
index 80ce338d1..22aa04c7e 100644
--- a/org.eclipse.jubula.toolkit.javafx.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.javafx.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.mobile.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.mobile.api/META-INF/MANIFEST.MF
index feafb5f43..ebec09780 100644
--- a/org.eclipse.jubula.toolkit.mobile.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.mobile.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.mobile.ios.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.mobile.ios.api/META-INF/MANIFEST.MF
index 294db7a3e..a67eb50fd 100644
--- a/org.eclipse.jubula.toolkit.mobile.ios.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.mobile.ios.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.rcp.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.rcp.api/META-INF/MANIFEST.MF
index 01f43d310..a48a37061 100644
--- a/org.eclipse.jubula.toolkit.rcp.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.rcp.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.rcp.gef.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.rcp.gef.api/META-INF/MANIFEST.MF
index d29edfb3d..6066cc6ab 100644
--- a/org.eclipse.jubula.toolkit.rcp.gef.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.rcp.gef.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.swing.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.swing.api/META-INF/MANIFEST.MF
index ca7b25e64..1463fc28f 100644
--- a/org.eclipse.jubula.toolkit.swing.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.swing.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.swt.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.swt.api/META-INF/MANIFEST.MF
index d2ae8c3c9..47f314de4 100644
--- a/org.eclipse.jubula.toolkit.swt.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.swt.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.swt.provider/src/org/eclipse/jubula/toolkit/swt/provider/I18nStrings.properties b/org.eclipse.jubula.toolkit.swt.provider/src/org/eclipse/jubula/toolkit/swt/provider/I18nStrings.properties
index 60e57e5e1..7c539f47f 100644
--- a/org.eclipse.jubula.toolkit.swt.provider/src/org/eclipse/jubula/toolkit/swt/provider/I18nStrings.properties
+++ b/org.eclipse.jubula.toolkit.swt.provider/src/org/eclipse/jubula/toolkit/swt/provider/I18nStrings.properties
@@ -5,23 +5,23 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################
-org.eclipse.swt.custom.CCombo=(SWT) CCombo Box
+org.eclipse.swt.custom.CCombo=(SWT) CCombo
org.eclipse.swt.custom.CLabel=(SWT) CLabel
-org.eclipse.swt.custom.CTabFolder=(SWT) CTabbed Pane
-org.eclipse.swt.custom.StyledText=(SWT) Text Field/Text Area/Editor Pane/Text Pane
-org.eclipse.swt.widgets.Combo=(SWT) Combo Box
+org.eclipse.swt.custom.CTabFolder=(SWT) CTab Folder
+org.eclipse.swt.custom.StyledText=(SWT) Styled Text
+org.eclipse.swt.widgets.Combo=(SWT) Combo
org.eclipse.swt.GraphicApplication=(SWT) Application
org.eclipse.swt.widgets.Button=(SWT) Button/Check Box/Radio Button
org.eclipse.swt.widgets.Label=(SWT) Label
org.eclipse.swt.widgets.List=(SWT) List
org.eclipse.swt.widgets.Menu=(SWT) Menu
-org.eclipse.swt.widgets.TabFolder=(SWT) Tabbed Pane
+org.eclipse.swt.widgets.TabFolder=(SWT) Tab Folder
org.eclipse.swt.widgets.Table=(SWT) Table
-org.eclipse.swt.widgets.Text=(SWT) Text Field/Text Area/Editor Pane/Text Pane
-org.eclipse.swt.widgets.ToolItem=Toolbar Item
+org.eclipse.swt.widgets.Text=(SWT) Text
+org.eclipse.swt.widgets.ToolItem=(SWT) Tool Item
org.eclipse.swt.widgets.Tree=(SWT) Tree
guidancer.abstract.SwtButton=(SWT) Button/Check Box/Radio Button
-guidancer.abstract.SwtCombo=(SWT) Combo Box
+guidancer.abstract.SwtCombo=(SWT) Combo Component
guidancer.abstract.SwtLabel=(SWT) Label
guidancer.abstract.SwtItem=(SWT) Item
guidancer.abstract.SwtTabFolder=(SWT) Tabbed Pane
diff --git a/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF
index fb98e6b1d..afe075fb5 100644
--- a/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.win.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.toolkit.win.apps.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.toolkit.win.apps.api/META-INF/MANIFEST.MF
index 7541e6d46..353117cf5 100644
--- a/org.eclipse.jubula.toolkit.win.apps.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.win.apps.api/META-INF/MANIFEST.MF
@@ -7,3 +7,5 @@ Bundle-Vendor: Eclipse Jubula
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
+Require-Bundle: org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api.gen;resolution:=optional;bundle-version="[2.4.0,2.5.0)"
diff --git a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/CompSystemProcessor.java b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/CompSystemProcessor.java
index c65db877e..efc3373c7 100644
--- a/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/CompSystemProcessor.java
+++ b/org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/CompSystemProcessor.java
@@ -89,19 +89,22 @@ public class CompSystemProcessor implements IProcessor {
}
/**
+ * @param showOnlyVisible if true, then only visible components will be returned;
+ * if false, then all components will be returned
* @return A list of all components encapsulated in infos
*/
- public List<ComponentInfo> getCompInfos() {
+ public List<ComponentInfo> getCompInfos(boolean showOnlyVisible) {
List<ComponentInfo> infos = new ArrayList<ComponentInfo>();
for (Iterator it = m_compSystem.getComponents().iterator(); it
.hasNext();) {
Component component = (Component)it.next();
- if (component.isVisible()) {
- ToolkitInfo tkInfo = getToolkitInfo(component
- .getToolkitDesriptor());
- infos.add(new ComponentInfo(component, tkInfo));
+ if (showOnlyVisible && !component.isVisible()) {
+ continue;
}
+ ToolkitInfo tkInfo = getToolkitInfo(component
+ .getToolkitDesriptor());
+ infos.add(new ComponentInfo(component, tkInfo));
}
return infos;
}

Back to the top