Permalink
Browse files

A Code Generator that records events and generate relevant code

Change-Id: Iea346ecebd2276649c1e8aaba7e0390fe1f6dd10
  • Loading branch information...
mickaelistria authored and Gerrit Code Review @ Eclipse.org committed Dec 19, 2012
1 parent c43009b commit c878ee8136d60ac8a8306007de744e1f979819b0
Showing with 1,940 additions and 1,077 deletions.
  1. +17 −0 org.eclipse.swtbot.generator.feature/.project
  2. +12 −5 {org.eclipse.swtbot.generator.test → org.eclipse.swtbot.generator.feature}/build.properties
  3. +328 −0 org.eclipse.swtbot.generator.feature/epl-v10.html
  4. +140 −0 org.eclipse.swtbot.generator.feature/feature.properties
  5. +28 −0 org.eclipse.swtbot.generator.feature/feature.xml
  6. +80 −0 org.eclipse.swtbot.generator.feature/feature.xml~
  7. +107 −0 org.eclipse.swtbot.generator.feature/license.html
  8. +25 −0 org.eclipse.swtbot.generator.feature/pom.xml
  9. +0 −7 org.eclipse.swtbot.generator.test/.classpath
  10. +0 −28 org.eclipse.swtbot.generator.test/.project
  11. +0 −21 org.eclipse.swtbot.generator.test/.settings/org.eclipse.jdt.core.prefs
  12. +0 −13 org.eclipse.swtbot.generator.test/META-INF/MANIFEST.MF
  13. +0 −20 org.eclipse.swtbot.generator.test/pom.xml
  14. +0 −30 org.eclipse.swtbot.generator.test/src/org/eclipse/swtbot/generator/CombinationGeneratorMain.java
  15. +0 −126 org.eclipse.swtbot.generator.test/src/org/eclipse/swtbot/generator/MethodGeneratorTest.java
  16. +5 −9 org.eclipse.swtbot.generator/META-INF/MANIFEST.MF
  17. +2 −1 org.eclipse.swtbot.generator/build.properties
  18. +18 −0 org.eclipse.swtbot.generator/plugin.xml
  19. +97 −0 org.eclipse.swtbot.generator/schema/generator.exsd
  20. +0 −129 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/HamcrestFactoryWriter.java
  21. +0 −35 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/HamcrestWriter.java
  22. +0 −96 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/MatcherGeneratorMain.java
  23. +0 −56 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/MethodFactory.java
  24. +0 −192 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/MethodGenerator.java
  25. +0 −56 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/QuickReferenceWriter.java
  26. +0 −63 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/SWTBotGeneratorFactoryReader.java
  27. +0 −29 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/SWTBotGeneratorMain.java
  28. +0 −61 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/SugarGenerator.java
  29. +0 −90 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/XmlConfigurator.java
  30. +29 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/GenerationRule.java
  31. +21 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/Generator.java
  32. +42 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/WidgetUtils.java
  33. +76 −0 ...swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/AbstractTreeGenerationRule.java
  34. +62 −0 ...clipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/CComboSelectionRule.java
  35. +53 −0 ...clipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/CheckboxClickedRule.java
  36. +62 −0 ...eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/ComboSelectionRule.java
  37. +28 −0 ...se.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/DoubleClickTreeItemRule.java
  38. +28 −0 ...eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/ExpandTreeItemRule.java
  39. +69 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/MenuClickedRule.java
  40. +52 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/ModifyTextRule.java
  41. +53 −0 ...ipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/PushButtonClickedRule.java
  42. +53 −0 ...pse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/RadioButtonClickedRule.java
  43. +39 −0 ...lipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/SWTBotGeneratorRules.java
  44. +29 −0 ...eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/framework/rules/SelectTreeItemRule.java
  45. +125 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/BotGeneratorEventDispatcher.java
  46. +38 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/GeneratorExtensionPointManager.java
  47. +144 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/RecorderDialog.java
  48. +71 −0 org.eclipse.swtbot.generator/src/org/eclipse/swtbot/generator/ui/StartupRecorder.java
  49. +3 −3 org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotText.java
  50. +0 −6 org.eclipse.swtbot.test/feature.xml
  51. +3 −0 org.eclipse.swtbot.updatesite/category.xml
  52. +1 −1 pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.swtbot.eclipse</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>
@@ -4,11 +4,18 @@
# 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:
# Ketan Padegaonkar - initial API and implementation
###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
+bin.includes = feature.xml,\
+ license.html,\
+ epl-v10.html,\
+ feature.properties
+jars.compile.order = .
+source.. =
+src.includes = feature.xml,\
+ build.properties,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,140 @@
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+copyright=\
+Copyright (c) 2007-2010 Ketan Padegaonkar and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ Ketan Padegaonkar - initial API and implementation
+
+# "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\
+April 14, 2010\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\
+ - 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 ##########################################
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.swtbot.generator.feature"
+ label="SWTBot Recorder and Test Generator (incubation)"
+ version="2.1.0.qualifier"
+ provider-name="Eclipse.org"
+ plugin="org.eclipse.swtbot.eclipse.ui">
+
+ <description url="http://eclipse.org/">
+ SWTBot Generator: Enable recording of Events and generates code accordingly
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.swtbot.generator"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.swtbot.eclipse"
+ label="SWTBot for Eclipse Testing (incubation)"
+ version="2.0.5.qualifier"
+ provider-name="Eclipse.org"
+ plugin="org.eclipse.swtbot.eclipse.ui">
+
+ <description url="http://eclipse.org/">
+ SWTBot for testing eclipse based plugins and applications (incubation)
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="SWTBot update site" url="http://download.eclipse.org/technology/swtbot/update-site"/>
+ </url>
+
+ <includes
+ id="org.eclipse.swtbot"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.swtbot.forms"
+ version="0.0.0"/>
+
+ <requires>
+ <import plugin="org.eclipse.osgi"/>
+ <import plugin="org.junit4"/>
+ <import plugin="org.apache.log4j"/>
+ <import plugin="org.eclipse.core.commands"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.jface"/>
+ <import plugin="org.eclipse.swt"/>
+ <import plugin="org.eclipse.ui.workbench"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.hamcrest"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.swtbot.swt.finder"/>
+ <import plugin="org.eclipse.swtbot.junit4_x"/>
+ <import plugin="org.eclipse.equinox.app"/>
+ <import plugin="org.eclipse.jdt.junit.runtime"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.swtbot.eclipse.finder"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swtbot.go"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swtbot.eclipse.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swtbot.eclipse.spy"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Oops, something went wrong.

0 comments on commit c878ee8

Please sign in to comment.