Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2014-09-02 13:39:21 +0000
committerSebastian Struckmann2014-09-02 13:39:21 +0000
commitf88f26655268b203ce56dd230b62dc513a928b63 (patch)
tree80ed2e78815e5a9a3e7a2f9b3fdcad2bd2d781e8
parent59d389fb10f681eb5e1f7978d32d643143592e4c (diff)
downloadorg.eclipse.jubula.core-f88f26655268b203ce56dd230b62dc513a928b63.tar.gz
org.eclipse.jubula.core-f88f26655268b203ce56dd230b62dc513a928b63.tar.xz
org.eclipse.jubula.core-f88f26655268b203ce56dd230b62dc513a928b63.zip
Sprint task - Prepared use of JET for Java RC API generation
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/.gitignore1
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/.project2
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF26
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/build.properties6
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/gen.api.xml13
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/pom.xml93
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/src-gen/.gitignore1
-rw-r--r--org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet48
8 files changed, 184 insertions, 6 deletions
diff --git a/org.eclipse.jubula.toolkit.api.gen/.gitignore b/org.eclipse.jubula.toolkit.api.gen/.gitignore
index 934e0e06f..faff91363 100644
--- a/org.eclipse.jubula.toolkit.api.gen/.gitignore
+++ b/org.eclipse.jubula.toolkit.api.gen/.gitignore
@@ -1,2 +1,3 @@
/bin
/target
+/workspace
diff --git a/org.eclipse.jubula.toolkit.api.gen/.project b/org.eclipse.jubula.toolkit.api.gen/.project
index 592393735..060dbcd51 100644
--- a/org.eclipse.jubula.toolkit.api.gen/.project
+++ b/org.eclipse.jubula.toolkit.api.gen/.project
@@ -35,7 +35,7 @@
<link>
<name>.settings</name>
<type>2</type>
- <locationURI>PARENT-1-PROJECT_LOC/org.eclipse.jubula.project.configuration/settings/1.6</locationURI>
+ <locationURI>PARENT-1-PROJECT_LOC/org.eclipse.jubula.project.configuration/settings/1.7</locationURI>
</link>
</linkedResources>
<filteredResources>
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 b9685e5cf..3fb248e9c 100644
--- a/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.toolkit.api.gen/META-INF/MANIFEST.MF
@@ -7,3 +7,29 @@ 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)",
+ 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 24e18439c..6c35bc414 100644
--- a/org.eclipse.jubula.toolkit.api.gen/build.properties
+++ b/org.eclipse.jubula.toolkit.api.gen/build.properties
@@ -12,7 +12,7 @@ jars.compile.order = .
bin.includes = about.html,\
META-INF/,\
.
-javacSource = 1.6
-javacTarget = 1.6
+javacSource = 1.7
+javacTarget = 1.7
javacErrors.. = -assertIdentifier
-jre.compilation.profile = JavaSE-1.6
+jre.compilation.profile = JavaSE-1.7
diff --git a/org.eclipse.jubula.toolkit.api.gen/gen.api.xml b/org.eclipse.jubula.toolkit.api.gen/gen.api.xml
new file mode 100644
index 000000000..c6dcdd57d
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/gen.api.xml
@@ -0,0 +1,13 @@
+<!--
+ 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
+ -->
+<project name="org.eclipse.jubula.toolkit.base.provider" default="gen">
+ <target name="gen">
+ <emf.JETCompiler templateFile="./templates/compGen.javajet"
+ sourceDirectory="src-gen"/>
+ </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 81d07067c..534038727 100644
--- a/org.eclipse.jubula.toolkit.api.gen/pom.xml
+++ b/org.eclipse.jubula.toolkit.api.gen/pom.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.jubula.releng.client</artifactId>
@@ -11,4 +12,92 @@
<artifactId>org.eclipse.jubula.toolkit.api.gen</artifactId>
<packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <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>
+ <configuration>
+ <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile gen.api.xml</appArgLine>
+ <dependencies>
+ <!-- list of bundles that we need -->
+ <dependency>
+ <artifactId>org.eclipse.ant.core</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.apache.ant</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.pde.api.tools</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.pde.build</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.pde.core</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.equinox.launcher</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.emf.ant</artifactId>
+ <type>eclipse-plugin</type>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>eclipse-juno</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/releases/juno</url>
+ </repository>
+ </repositories>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-run</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/org.eclipse.jubula.toolkit.api.gen/src-gen/.gitignore b/org.eclipse.jubula.toolkit.api.gen/src-gen/.gitignore
new file mode 100644
index 000000000..571ee510a
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/src-gen/.gitignore
@@ -0,0 +1 @@
+/org
diff --git a/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet b/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet
new file mode 100644
index 000000000..84220b517
--- /dev/null
+++ b/org.eclipse.jubula.toolkit.api.gen/templates/compGen.javajet
@@ -0,0 +1,48 @@
+<%@ 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

Back to the top