Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2014-04-09 08:25:52 -0400
committerSebastian Struckmann2014-04-09 08:27:47 -0400
commitbf8797c2c3da7100b9e26e1263be705182891daf (patch)
treed1d2ce19e494e0e47e3fe60d8103dd4544849ad7
parent0caf770a3e9a11b440fc362b761534ded8f7be64 (diff)
downloadorg.eclipse.jubula.core-bf8797c2c3da7100b9e26e1263be705182891daf.tar.gz
org.eclipse.jubula.core-bf8797c2c3da7100b9e26e1263be705182891daf.tar.xz
org.eclipse.jubula.core-bf8797c2c3da7100b9e26e1263be705182891daf.zip
Sprint task - Added an Jubula extension example for JavaFX.
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.feature/.gitignore3
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.feature/.project17
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.feature/build.properties3
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.feature/feature.properties127
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.feature/feature.xml42
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/.classpath7
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/.gitignore3
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/.project28
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/META-INF/MANIFEST.MF7
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/build.properties6
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/common/adapter/JavaFXExtensionExampleAdapterFactory.java42
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/javafx/tester/PieChartTester.java49
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/.classpath7
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/.gitignore3
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/.project28
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/META-INF/MANIFEST.MF14
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/build.properties6
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/plugin.xml26
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/resources/xml/ComponentConfiguration.xml30
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/Activator.java60
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/i18n/i18n.properties10
-rw-r--r--org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/provider/MyToolKitProvider.java34
24 files changed, 571 insertions, 0 deletions
diff --git a/org.eclipse.jubula.examples.extension.javafx.feature/.gitignore b/org.eclipse.jubula.examples.extension.javafx.feature/.gitignore
new file mode 100644
index 000000000..64af1f50f
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.feature/.gitignore
@@ -0,0 +1,3 @@
+/build
+/bin
+/target
diff --git a/org.eclipse.jubula.examples.extension.javafx.feature/.project b/org.eclipse.jubula.examples.extension.javafx.feature/.project
new file mode 100644
index 000000000..d9240762c
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.examples.extension.javafx.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.examples.extension.javafx.feature/build.properties b/org.eclipse.jubula.examples.extension.javafx.feature/build.properties
new file mode 100644
index 000000000..d7e8b823c
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.feature/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ feature.properties
+ feature.properties
diff --git a/org.eclipse.jubula.examples.extension.javafx.feature/feature.properties b/org.eclipse.jubula.examples.extension.javafx.feature/feature.properties
new file mode 100644
index 000000000..7229d05d8
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.feature/feature.properties
@@ -0,0 +1,127 @@
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/org.eclipse.jubula.examples.extension.javafx.feature/feature.xml b/org.eclipse.jubula.examples.extension.javafx.feature/feature.xml
new file mode 100644
index 000000000..70d2e690b
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.feature/feature.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.jubula.examples.extension.javafx.feature"
+ label="Jubula Example - Toolkit Extension - JavaFX"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Jubula">
+
+ <description url="http://www.eclipse.org/jubula">
+ Example Jubula Toolkit Extension - JavaFX
+ </description>
+
+ <copyright url="http://www.eclipse.org/jubula">
+ 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
+ </copyright>
+
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.jubula.examples.extension.javafx.rc"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jubula.examples.extension.javafx.toolkit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/.classpath b/org.eclipse.jubula.examples.extension.javafx.rc/.classpath
new file mode 100644
index 000000000..8e71068ea
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0x"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/.gitignore b/org.eclipse.jubula.examples.extension.javafx.rc/.gitignore
new file mode 100644
index 000000000..64af1f50f
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/.gitignore
@@ -0,0 +1,3 @@
+/build
+/bin
+/target
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/.project b/org.eclipse.jubula.examples.extension.javafx.rc/.project
new file mode 100644
index 000000000..924e27f59
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.examples.extension.javafx.rc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jubula.examples.extension.javafx.rc/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..a698e5967
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/META-INF/MANIFEST.MF b/org.eclipse.jubula.examples.extension.javafx.rc/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..61b2dada4
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jubula Extension Example - JavaFX - RC
+Bundle-SymbolicName: org.eclipse.jubula.examples.extension.javafx.rc
+Bundle-Version: 2.3.0.qualifier
+Fragment-Host: org.eclipse.jubula.rc.javafx;bundle-version="2.3.0"
+Bundle-Vendor: Eclipse Jubula
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/build.properties b/org.eclipse.jubula.examples.extension.javafx.rc/build.properties
new file mode 100644
index 000000000..3d8184e22
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+javaSource = 1.8
+javaTarget = 1.8
+bin.includes = META-INF/,\
+ .
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/common/adapter/JavaFXExtensionExampleAdapterFactory.java b/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/common/adapter/JavaFXExtensionExampleAdapterFactory.java
new file mode 100644
index 000000000..d5a8fe435
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/common/adapter/JavaFXExtensionExampleAdapterFactory.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.jubula.rc.common.adapter;
+
+import javafx.scene.Node;
+import javafx.scene.chart.PieChart;
+
+import org.eclipse.jubula.rc.common.adaptable.IAdapterFactory;
+import org.eclipse.jubula.rc.common.tester.adapter.interfaces.IComponent;
+import org.eclipse.jubula.rc.javafx.tester.adapter.JavaFXComponentAdapter;
+
+
+/**
+ * Adapter Factory for new adapters. This class makes your new adapters usable
+ * for testing. One factory could be used for all adapters implemented.
+ *
+ * @author BREDEX GmbH
+ */
+public class JavaFXExtensionExampleAdapterFactory implements IAdapterFactory {
+ /** {@inheritDoc} */
+ public Class[] getSupportedClasses() {
+ return new Class[] { PieChart.class };
+ }
+
+ /** {@inheritDoc} */
+ public Object getAdapter(Class targetedClass, Object objectToAdapt) {
+ if (targetedClass.isAssignableFrom(IComponent.class)) {
+ if (objectToAdapt instanceof PieChart) {
+ return new JavaFXComponentAdapter<Node>((Node) objectToAdapt);
+ }
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/javafx/tester/PieChartTester.java b/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/javafx/tester/PieChartTester.java
new file mode 100644
index 000000000..4871131ac
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.rc/src/org/eclipse/jubula/rc/javafx/tester/PieChartTester.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.jubula.rc.javafx.tester;
+
+import javafx.scene.chart.PieChart;
+
+import org.eclipse.jubula.rc.common.driver.IRunnable;
+import org.eclipse.jubula.rc.common.exception.StepExecutionException;
+import org.eclipse.jubula.rc.common.tester.WidgetTester;
+import org.eclipse.jubula.rc.common.util.Verifier;
+
+
+/**
+ * @author BREDEX GmbH
+ *
+ */
+public class PieChartTester extends WidgetTester {
+ /**
+ * @return the casted PieChart instance
+ */
+ protected PieChart getPieChart() {
+ return (PieChart) getRealComponent();
+ }
+
+ /**
+ * Verifies the number of items in the pie chart.
+ *
+ * @param expected
+ * The expected number of items.
+ */
+ public void rcVerifyNrItems(int expected) {
+ final PieChart pieChart = getPieChart();
+ final int actual = (int) getEventThreadQueuer()
+ .invokeAndWait("verifyNrItems", new IRunnable() { //$NON-NLS-1$
+ public Integer run() throws StepExecutionException {
+ return pieChart.getData().size();
+ }
+ });
+ Verifier.equals(expected, actual);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/.classpath b/org.eclipse.jubula.examples.extension.javafx.toolkit/.classpath
new file mode 100644
index 000000000..098194ca4
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/.gitignore b/org.eclipse.jubula.examples.extension.javafx.toolkit/.gitignore
new file mode 100644
index 000000000..64af1f50f
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/.gitignore
@@ -0,0 +1,3 @@
+/build
+/bin
+/target
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/.project b/org.eclipse.jubula.examples.extension.javafx.toolkit/.project
new file mode 100644
index 000000000..46d7ae9a5
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jubula.examples.extension.javafx.toolkit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jubula.examples.extension.javafx.toolkit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f42de363a
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/META-INF/MANIFEST.MF b/org.eclipse.jubula.examples.extension.javafx.toolkit/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..87af99deb
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jubula Extension Example - JavaFX - Toolkit
+Bundle-SymbolicName: org.eclipse.jubula.examples.extension.javafx.toolkit;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-Activator: org.eclipse.jubula.examples.extension.javafx.toolkit.Activator
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.jubula.tools;bundle-version="2.3.0",
+ org.eclipse.jubula.toolkit.common;bundle-version="2.3.0",
+ org.eclipse.swt;bundle-version="[3.6.1,4.0.0)";resolution:=optional
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse Jubula
+Bundle-ClassPath: .
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/build.properties b/org.eclipse.jubula.examples.extension.javafx.toolkit/build.properties
new file mode 100644
index 000000000..f15497ee4
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ plugin.xml
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/plugin.xml b/org.eclipse.jubula.examples.extension.javafx.toolkit/plugin.xml
new file mode 100644
index 000000000..907d0ef78
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ 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
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.jubula.toolkit.common.toolkitsupport">
+ <toolkit
+ IToolkitProvider="org.eclipse.jubula.examples.extension.javafx.toolkit.provider.MyToolKitProvider"
+ depends="org.eclipse.jubula.JavaFXToolkitPlugin"
+ includes="null"
+ isUserToolkit="true"
+ level="toolkit"
+ name="exampleJavaFXToolkitExtension"
+ order="20"
+ toolkitID="org.eclipse.jubula.examples.extension.javafx.toolkit.exampleJavaFXToolkitExtension">
+ </toolkit>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/resources/xml/ComponentConfiguration.xml b/org.eclipse.jubula.examples.extension.javafx.toolkit/resources/xml/ComponentConfiguration.xml
new file mode 100644
index 000000000..d3263ec34
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/resources/xml/ComponentConfiguration.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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
+ -->
+
+<!-- CAUTION: don't format any entries, especially don't use line breaks!
+ The value of the formated item may contain formating characters like tabs or
+ newlines, making them unusable for class or data lookup!-->
+<compSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../org.eclipse.jubula.toolkit.common/resources/xml/ToolkitComponentConfiguration.xsd">
+ <configVersion>
+ <majorVersion>1</majorVersion>
+ <minorVersion>36</minorVersion>
+ </configVersion>
+ <toolkitComponent type="javafx.scene.chart.PieChart" visible="true">
+ <realizes>guidancer.abstract.Widget</realizes>
+ <testerClass>org.eclipse.jubula.rc.javafx.tester.PieChartTester</testerClass>
+ <componentClass name="javafx.scene.chart.PieChart" />
+ <action name="CompSystem.VerifyNrItems" changed="2.0.0">
+ <method>rcVerifyNrItems</method>
+ <param name="CompSystem.Number">
+ <type>java.lang.Integer</type>
+ </param>
+ </action>
+ </toolkitComponent>
+
+</compSystem> \ No newline at end of file
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/Activator.java b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/Activator.java
new file mode 100644
index 000000000..289de222d
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/Activator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.examples.extension.javafx.toolkit;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author BREDEX GmbH
+ */
+public class Activator extends Plugin {
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.eclipse.jubula.examples.extension.javafx.toolkit"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/i18n/i18n.properties b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/i18n/i18n.properties
new file mode 100644
index 000000000..5dcf9ddc1
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/i18n/i18n.properties
@@ -0,0 +1,10 @@
+###############################################################################
+# 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
+###############################################################################
+CompSystem.VerifyNrItems=Verify Number of Items
+CompSystem.Number=Number of Items
+javafx.scene.chart.PieChart=Pie Chart \ No newline at end of file
diff --git a/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/provider/MyToolKitProvider.java b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/provider/MyToolKitProvider.java
new file mode 100644
index 000000000..150848889
--- /dev/null
+++ b/org.eclipse.jubula.examples.extension.javafx.toolkit/src/org/eclipse/jubula/examples/extension/javafx/toolkit/provider/MyToolKitProvider.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.examples.extension.javafx.toolkit.provider;
+
+import java.net.URL;
+import java.util.ResourceBundle;
+
+import org.eclipse.jubula.examples.extension.javafx.toolkit.Activator;
+import org.eclipse.jubula.toolkit.common.AbstractToolkitProvider;
+import org.eclipse.jubula.toolkit.common.utils.ToolkitUtils;
+
+public class MyToolKitProvider extends AbstractToolkitProvider {
+ /** the bundle location */
+ public static final String BUNDLE = "org.eclipse.jubula.examples.extension.javafx.toolkit.i18n.i18n"; //$NON-NLS-1$
+
+ /** {@inheritDoc} */
+ public URL getComponentConfigurationFileURL() {
+ return ToolkitUtils.getURL(Activator.getDefault(),
+ "resources/xml/ComponentConfiguration.xml"); //$NON-NLS-1$
+ }
+
+ /** {@inheritDoc} */
+ public ResourceBundle getI18nResourceBundle() {
+ return ResourceBundle.getBundle(BUNDLE);
+ }
+}

Back to the top