diff --git a/.gitignore b/.gitignore
index 496ee2c..9263a1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-.DS_Store
\ No newline at end of file
+_site
+.DS_Store
diff --git a/CHANGES b/CHANGES
deleted file mode 100644
index bf9907a..0000000
--- a/CHANGES
+++ /dev/null
@@ -1,18 +0,0 @@
-0.9.2
-
-better handling no generators found
-
-
-0.9.1.1
-
-changed update site path
-
-
-0.9.1
-
-better layout on the preview dialog
-
-
-0.9.0
-
-initial beta version
\ No newline at end of file
diff --git a/README.markdown b/README.markdown
deleted file mode 100644
index d1763de..0000000
--- a/README.markdown
+++ /dev/null
@@ -1,65 +0,0 @@
-
-# What it is
-
-code2code is an eclipse plugin to generate source code from templates.
-
-You can easily create your custom generators using known template engines: Groovy (JSP like), Freemarker or Velocity.
-
-See it in action [here](http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/).
-
-# Creating a Generator
-
-The files:
-
- HelloWorld.generator
- |-- templates
- |-- HelloWorldTemplate.txt.ftl
- |-- templates.ftl
- |-- params.ftl
-
-
-Contents of HelloWorldTemplate.txt.ftl:
-
- Hello ${name}!!!
-
-
-Contents of params.ftl:
-
- name=World
-
-
-Contents of templates.ftl:
-
- templates/HelloWorldTemplate.txt.ftl=src/destinationPath/HelloWorld.txt
-
-
-
-# Usage
-
-Installing generators: just create a folder named "generators" at the root of your project, and place your generators there.
-
-Running generators: The plugin adds a “Generate…” option to your project context menu (right-click menu). Run it, choose one of your installed generators, set its parameters, and the plugin will generate the files to the right place.
-
-See it in action here: [Quickly cruding with code2code plugin and VRaptor2](http://elsethenif.wordpress.com/2009/06/12/quickly-cruding-with-code2code-plugin-and-vraptor2/).
-
-
-# Installation
-
-Current version is 0.9.2 beta, tested against Eclipse Ganymede 3.4.2.
-
-You can install it from the [Update Site](http://srizzo.github.com/code2code/updatesite)
-
-
-# Documentation
-
-[http://wiki.github.com/srizzo/code2code](http://wiki.github.com/srizzo/code2code)
-
-
-# Issues/Features
-
-[http://github.com/srizzo/code2code/issues](http://github.com/srizzo/code2code/issues)
-
-
-# Generator Examples
-
-[http://github.com/srizzo/code2code-example-generators/downloads](http://github.com/srizzo/code2code-example-generators/downloads)
diff --git a/_layouts/default.html b/_layouts/default.html
new file mode 100644
index 0000000..49c8251
--- /dev/null
+++ b/_layouts/default.html
@@ -0,0 +1,77 @@
+
+
+
+ {% for post in site.posts %}
+ {{ post.date | date_to_string }} » {{ post.title }}
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_posts/2009-01-12-first-post.markdown b/_posts/2009-01-12-first-post.markdown
new file mode 100644
index 0000000..ec9fde0
--- /dev/null
+++ b/_posts/2009-01-12-first-post.markdown
@@ -0,0 +1,6 @@
+---
+layout: post
+title: Welcome to 'code2code'
+---
+
+code2code 0.0.5 released. Still working on the site...
diff --git a/_posts/2009-01-13-new-release.txt b/_posts/2009-01-13-new-release.txt
new file mode 100644
index 0000000..6abe6d1
--- /dev/null
+++ b/_posts/2009-01-13-new-release.txt
@@ -0,0 +1,6 @@
+---
+layout: post
+title: 0.0.6 released
+---
+
+code2code 0.0.6 released. Put examples on github. Still working...
diff --git a/atom.xml b/atom.xml
new file mode 100644
index 0000000..055687b
--- /dev/null
+++ b/atom.xml
@@ -0,0 +1,27 @@
+---
+layout: nil
+---
+
+
+
+ code2code
+
+
+ {{ site.time | date_to_xmlschema }}
+ http://srizzo.github.com/code2code/
+
+ Dr Nic Williams
+ srizzowilliams@gmail.com
+
+
+ {% for post in site.posts %}
+
+ {{ post.title }}
+
+ {{ post.date | date_to_xmlschema }}
+ http://srizzo.github.com/code2code{{ post.id }}
+ {{ post.content | xml_escape }}
+
+ {% endfor %}
+
+
\ No newline at end of file
diff --git a/code2code.feature/.gitignore b/code2code.feature/.gitignore
deleted file mode 100644
index 3a4edf6..0000000
--- a/code2code.feature/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/code2code.feature/build.properties b/code2code.feature/build.properties
deleted file mode 100644
index 64f93a9..0000000
--- a/code2code.feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/code2code.feature/feature.xml b/code2code.feature/feature.xml
deleted file mode 100644
index 21b04f6..0000000
--- a/code2code.feature/feature.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- http://srizzo.github.com/code2code
-
-
-
- Copyright (c) 2009 Samuel Rizzo
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or
-sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-
-
-
-
-
-
diff --git a/code2code.tests/META-INF/MANIFEST.MF b/code2code.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 166d010..0000000
--- a/code2code.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: code2code plugin Tests
-Bundle-SymbolicName: code2code.tests
-Bundle-Version: 0.9.2
-Bundle-Vendor: Samuel Rizzo
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.junit4;bundle-version="4.3.1",
- code2code;bundle-version="0.9.0",
- org.eclipse.ui.console;bundle-version="3.3.0",
- org.apache.log4j;bundle-version="1.2.13",
- org.eclipse.core.resources;bundle-version="3.4.1",
- org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.jdt.core;bundle-version="3.4.2",
- org.eclipse.jdt.launching;bundle-version="3.4.1",
- org.eclipse.jface;bundle-version="3.4.1",
- org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
- org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
- org.eclipse.ui;bundle-version="3.4.2",
- org.hamcrest;bundle-version="1.1.0",
- org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0"
-Bundle-ClassPath: .,
- lib/jbehave-core-2.2.jar
-Import-Package: org.eclipse.core.filesystem,
- org.eclipse.jface.wizard,
- org.eclipse.swt.widgets
diff --git a/code2code.tests/build.properties b/code2code.tests/build.properties
deleted file mode 100644
index 957c102..0000000
--- a/code2code.tests/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- lib/jbehave-core-2.2.jar
diff --git a/code2code.tests/generators/Generator.generator/description.ftl b/code2code.tests/generators/Generator.generator/description.ftl
deleted file mode 100644
index f8987ea..0000000
--- a/code2code.tests/generators/Generator.generator/description.ftl
+++ /dev/null
@@ -1 +0,0 @@
-Cria um novo Gerador na pasta .generator
\ No newline at end of file
diff --git a/code2code.tests/generators/Generator.generator/params.ftl b/code2code.tests/generators/Generator.generator/params.ftl
deleted file mode 100644
index 9bb72b8..0000000
--- a/code2code.tests/generators/Generator.generator/params.ftl
+++ /dev/null
@@ -1,3 +0,0 @@
-name=newGenerator
-engine=ftl
-description=Generates ${name}
\ No newline at end of file
diff --git a/code2code.tests/generators/Generator.generator/templates.ftl b/code2code.tests/generators/Generator.generator/templates.ftl
deleted file mode 100644
index 2f18acf..0000000
--- a/code2code.tests/generators/Generator.generator/templates.ftl
+++ /dev/null
@@ -1,6 +0,0 @@
-templates/templates.ftl=generators/${name}.generator/templates.${engine}
-templates/params.ftl=generators/${name}.generator/params.${engine}
-templates/description.ftl=generators/${name}.generator/description.${engine}
-templates/generatedFile.ftl=generators/${name}.generator/templates/${name}.${engine}
-
-
diff --git a/code2code.tests/generators/Generator.generator/templates/description.ftl b/code2code.tests/generators/Generator.generator/templates/description.ftl
deleted file mode 100644
index 8a3c15f..0000000
--- a/code2code.tests/generators/Generator.generator/templates/description.ftl
+++ /dev/null
@@ -1 +0,0 @@
-${description}
\ No newline at end of file
diff --git a/code2code.tests/generators/Generator.generator/templates/generatedFile.ftl b/code2code.tests/generators/Generator.generator/templates/generatedFile.ftl
deleted file mode 100644
index 71fcded..0000000
--- a/code2code.tests/generators/Generator.generator/templates/generatedFile.ftl
+++ /dev/null
@@ -1 +0,0 @@
-param was: ${"$"}{param}
\ No newline at end of file
diff --git a/code2code.tests/generators/Generator.generator/templates/params.ftl b/code2code.tests/generators/Generator.generator/templates/params.ftl
deleted file mode 100644
index 95dc046..0000000
--- a/code2code.tests/generators/Generator.generator/templates/params.ftl
+++ /dev/null
@@ -1 +0,0 @@
-param=defaultValue
\ No newline at end of file
diff --git a/code2code.tests/generators/Generator.generator/templates/templates.ftl b/code2code.tests/generators/Generator.generator/templates/templates.ftl
deleted file mode 100644
index 61252b7..0000000
--- a/code2code.tests/generators/Generator.generator/templates/templates.ftl
+++ /dev/null
@@ -1 +0,0 @@
-templates/${name}.${engine}=generated/${name}/${name}.txt
diff --git a/code2code.tests/generators/JBehave/Generator Story.generator/params.ftl b/code2code.tests/generators/JBehave/Generator Story.generator/params.ftl
deleted file mode 100644
index e2b2d25..0000000
--- a/code2code.tests/generators/JBehave/Generator Story.generator/params.ftl
+++ /dev/null
@@ -1,5 +0,0 @@
-story=Story Name
-generatorName=Generator Name
-generatedFileName=Generated File Name.txt
-generatorEngine=txt
-destination=src/stories
\ No newline at end of file
diff --git a/code2code.tests/generators/JBehave/Generator Story.generator/templates.ftl b/code2code.tests/generators/JBehave/Generator Story.generator/templates.ftl
deleted file mode 100644
index 7e0b58b..0000000
--- a/code2code.tests/generators/JBehave/Generator Story.generator/templates.ftl
+++ /dev/null
@@ -1,3 +0,0 @@
-templates/story_text_file.ftl=${destination}/${story?lower_case?replace(" ", "_")}
-templates/StoryJavaClass.java.ftl=${destination}/${story?capitalize?replace(" ", "")}.java
-templates/TestSuite.java.ftl
\ No newline at end of file
diff --git a/code2code.tests/generators/JBehave/Generator Story.generator/templates/StoryJavaClass.java.ftl b/code2code.tests/generators/JBehave/Generator Story.generator/templates/StoryJavaClass.java.ftl
deleted file mode 100644
index 38c4080..0000000
--- a/code2code.tests/generators/JBehave/Generator Story.generator/templates/StoryJavaClass.java.ftl
+++ /dev/null
@@ -1,17 +0,0 @@
-package ${destination?replace("src/", "")?replace("/", ".")};
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class ${story?capitalize?replace(" ", "")} extends Scenario {
-
-
- public ${story?capitalize?replace(" ", "")}() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/generators/JBehave/Generator Story.generator/templates/TestSuite.java.ftl b/code2code.tests/generators/JBehave/Generator Story.generator/templates/TestSuite.java.ftl
deleted file mode 100644
index 43f288c..0000000
--- a/code2code.tests/generators/JBehave/Generator Story.generator/templates/TestSuite.java.ftl
+++ /dev/null
@@ -1,3 +0,0 @@
-Add to your TestSuite
-
-${story?capitalize?replace(" ", "")}.class
diff --git a/code2code.tests/generators/JBehave/Generator Story.generator/templates/story_text_file.ftl b/code2code.tests/generators/JBehave/Generator Story.generator/templates/story_text_file.ftl
deleted file mode 100644
index 0e62240..0000000
--- a/code2code.tests/generators/JBehave/Generator Story.generator/templates/story_text_file.ftl
+++ /dev/null
@@ -1,24 +0,0 @@
-Story: ${story}
-
- As a Developer
- I want to ....
- So that ...
-
-
-
-Scenario: ${story}
-
- Given I have a new project
- When I create the generator folder "generators/${generatorName}.generator"
- And I create the template file "generators/${generatorName}.generator/templates/${generatedFileName?capitalize?replace(" ", "")}.${generatorEngine}" with contents:
- ...
- And I create the templates configuration file "generators/${generatorName}.generator/templates.${generatorEngine}" with contents:
- templates/${generatedFileName?capitalize?replace(" ", "")}.${generatorEngine}=${generatedFileName}
- And I create the params configuration file "generators/${generatorName}.generator/params.txt" with contents:
- ...
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "${generatorName}" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "${generatedFileName}" generated with content:
- ...
-
diff --git a/code2code.tests/lib/jbehave-core-2.2-sources.jar b/code2code.tests/lib/jbehave-core-2.2-sources.jar
deleted file mode 100644
index d665a69..0000000
Binary files a/code2code.tests/lib/jbehave-core-2.2-sources.jar and /dev/null differ
diff --git a/code2code.tests/lib/jbehave-core-2.2.jar b/code2code.tests/lib/jbehave-core-2.2.jar
deleted file mode 100644
index 5e1abc0..0000000
Binary files a/code2code.tests/lib/jbehave-core-2.2.jar and /dev/null differ
diff --git a/code2code.tests/src/TODO b/code2code.tests/src/TODO
deleted file mode 100644
index 963ffbf..0000000
--- a/code2code.tests/src/TODO
+++ /dev/null
@@ -1,42 +0,0 @@
---using the generator
-
--- set params for generation
--- set params
--- use processed params
--- set generated files destinations
--- change destination
--- uncheck for generation
--- preview output
--- change preview
--- use global params
--- log generation to console
-
-
---creating generators
-
--- description
--- set
--- use engine
--- templates
--- set destination
--- use processed destination
--- generate to console
--- parameterize generators
--- set
--- set default
--- use params
--- referencing
--- use engines
--- engine on params
--- engine on templates config
--- engine on template
--- choose engine by file extension
--- use freemarker
--- use velocity
--- use groovy
--- use none - binary .txt and .properites
--- nested generators
-
-
-
-
\ No newline at end of file
diff --git a/code2code.tests/src/domain/Fixtures.java b/code2code.tests/src/domain/Fixtures.java
deleted file mode 100644
index b108675..0000000
--- a/code2code.tests/src/domain/Fixtures.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package domain;
-
-public class Fixtures {
- public static String expectedGeneratedDir(String generator) {
- return "fixtures/expected/generated/" + generator ;
- }
-
- public static String exampleGeneratorDir(String generator) {
- return "fixtures/examples/generators/" + generator + ".generator";
- }
-
-}
diff --git a/code2code.tests/src/domain/GeneratedFileExpectationNotMet.java b/code2code.tests/src/domain/GeneratedFileExpectationNotMet.java
deleted file mode 100644
index 37b2c48..0000000
--- a/code2code.tests/src/domain/GeneratedFileExpectationNotMet.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package domain;
-
-public class GeneratedFileExpectationNotMet extends RuntimeException {
- private static final long serialVersionUID = 1L;
-
- public GeneratedFileExpectationNotMet(String message) {
- super(message);
- }
-
-}
diff --git a/code2code.tests/src/domain/WorkingProject.java b/code2code.tests/src/domain/WorkingProject.java
deleted file mode 100644
index 3173f68..0000000
--- a/code2code.tests/src/domain/WorkingProject.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package domain;
-
-import java.io.ByteArrayInputStream;
-import java.net.URI;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-
-import code2code.utils.FileUtils;
-
-public class WorkingProject {
-
- private static IProject project;
-
- public static IProject create() throws Exception{
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- String projectName = "code2code.TestProject";
- project = root.getProject(projectName);
- int index = 0;
- while(project.exists()){
- project = root.getProject(projectName + "_" + (++index));
- }
- project.create(null);
- project.open(null);
- return project;
- }
-
- public static void copyGenerator(String generator) throws Exception {
- URI example = FileLocator.resolve(Platform.getBundle("code2code.tests")
- .getResource(Fixtures.exampleGeneratorDir(generator))).toURI();
-
- URI destination = project.getProject().getFolder("generators").getFolder(generator + ".generator").getLocationURI();
-
- IFileStore sourceStore = EFS.getStore(example);
- IFileStore destinationStore = EFS.getStore(destination);
-
- sourceStore.copy(destinationStore, 0, null);
-
- project.getProject().getFolder("generators").refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
-
- public static IProject project() {
- return project;
- }
-
- public static void delete() throws Exception {
- if(project != null){
- project.delete(true, true, null);
- }
- }
-
- public static void createFolder(String folderName) throws Exception {
- FileUtils.createFolderWithParents(project.getFolder(folderName));
- }
-
-
- public static void createFileWithContents(String filePath, String content) throws Exception {
- IFile file = project.getFile(filePath);
- FileUtils.createParentFolders(file);
- file.create(new ByteArrayInputStream(content.getBytes()) , true, null);
- }
-
- public static void createFile(String filePath) throws Exception {
- createFileWithContents(filePath, "");
- }
-
- public static boolean fileExists(String file) {
- return project.getFile(file).exists();
- }
-
- public static String read(String file) throws Exception {
- return FileUtils.read(project.getFile(file).getContents());
- }
-}
diff --git a/code2code.tests/src/pageobjects/ConfigureParamsDialog.java b/code2code.tests/src/pageobjects/ConfigureParamsDialog.java
deleted file mode 100644
index 3ea2111..0000000
--- a/code2code.tests/src/pageobjects/ConfigureParamsDialog.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package pageobjects;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.StringResult;
-
-import utils.Driver;
-
-public class ConfigureParamsDialog {
-
- public static boolean isVisible() {
- try {
- Driver.bot().label("Configure Params");
- } catch (WidgetNotFoundException e) {
- return false;
- }
- return true;
- }
-
- public static boolean isListed(String param) {
- try {
- Driver.bot().textWithLabel(param);
- } catch (WidgetNotFoundException e) {
- return false;
- }
- return true;
- }
-
- public static String getParamValue(String param) throws Exception {
- return Driver.bot().textWithLabel(param).getText();
- }
-
- public static void clickNext() throws Exception {
- Driver.bot().button("Next >").click();
- }
-
- public static void setParam(String param, String value) throws Exception {
- Driver.bot().textWithLabel(param).setText(value);
- }
-
- public static String getDescription() throws Exception {
- return UIThreadRunnable.syncExec(Driver.bot().activeShell().widget.getDisplay(), new StringResult(){
- public String run() {
- try {
- return ((WizardDialog)Driver.bot().activeShell().widget.getData()).getCurrentPage().getDescription();
- } catch (WidgetNotFoundException e) {
- throw new RuntimeException(e);
- }
- }});
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/ConsoleView.java b/code2code.tests/src/pageobjects/ConsoleView.java
deleted file mode 100644
index d66dfd4..0000000
--- a/code2code.tests/src/pageobjects/ConsoleView.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package pageobjects;
-
-import code2code.utils.Console;
-
-public class ConsoleView {
-
- public static String getContent() {
- return Console.getText();
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/CustomizeGenerationDialog.java b/code2code.tests/src/pageobjects/CustomizeGenerationDialog.java
deleted file mode 100644
index e19efa1..0000000
--- a/code2code.tests/src/pageobjects/CustomizeGenerationDialog.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package pageobjects;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.ControlFinder;
-import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
-
-import utils.Driver;
-
-public class CustomizeGenerationDialog {
-
- public static void uncheckFile(String file) throws Exception {
- Driver.bot().checkBox(file).deselect();
- }
-
- @SuppressWarnings("unchecked")
- public static void setDestination(String template, String destination) throws Exception {
- Widget templateButtonWidget = new ControlFinder().findControls(
- WidgetMatcherFactory.allOf(
- WidgetMatcherFactory.widgetOfType(Button.class),
- WidgetMatcherFactory.withText(template)
- ))
- .get(0);
- SWTBotText destinationText = new SWTBotText((Text) SWTUtils.nextWidget(templateButtonWidget));
-
- destinationText.setText(destination);
- }
-
- @SuppressWarnings("unchecked")
- public static void openPreview(String template) throws Exception {
- Widget templateButtonWidget = new ControlFinder().findControls(
- WidgetMatcherFactory.allOf(
- WidgetMatcherFactory.widgetOfType(Button.class),
- WidgetMatcherFactory.withText(template)
- ))
- .get(0);
- Widget destinationWidget = SWTUtils.nextWidget(templateButtonWidget);
- SWTBotButton previewButton = new SWTBotButton((Button) SWTUtils.nextWidget(destinationWidget));
-
- previewButton.click();
- }
-
- public static boolean isVisible() {
- try {
- Driver.bot().label("Customize Generation");
- } catch (WidgetNotFoundException e) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("unchecked")
- public static boolean isListed(String template) {
- return new ControlFinder().findControls(
- WidgetMatcherFactory.allOf(
- WidgetMatcherFactory.widgetOfType(Button.class),
- WidgetMatcherFactory.withText(template)
- )).size() == 1;
- }
-
- @SuppressWarnings("unchecked")
- public static String getDestination(String template) {
- Widget templateButtonWidget = new ControlFinder().findControls(
- WidgetMatcherFactory.allOf(
- WidgetMatcherFactory.widgetOfType(Button.class),
- WidgetMatcherFactory.withText(template)
- ))
- .get(0);
- SWTBotText destinationText = new SWTBotText((Text) SWTUtils.nextWidget(templateButtonWidget));
-
- return destinationText.getText();
- }
-}
diff --git a/code2code.tests/src/pageobjects/GenerateFilesWizard.java b/code2code.tests/src/pageobjects/GenerateFilesWizard.java
deleted file mode 100644
index c2a1282..0000000
--- a/code2code.tests/src/pageobjects/GenerateFilesWizard.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package pageobjects;
-
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-
-import utils.Driver;
-import domain.WorkingProject;
-
-public class GenerateFilesWizard {
-
- public static void finish() throws Exception {
- SWTBotShell wizardShell = Driver.bot().activeShell();
- Driver.bot().button("Finish").click();
- Driver.bot().waitUntil(Conditions.shellCloses(wizardShell));
- }
-
- public static void open() throws Exception {
- PackageExplorer.rightClick(WorkingProject.project(), "Generate...");
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/PackageExplorer.java b/code2code.tests/src/pageobjects/PackageExplorer.java
deleted file mode 100644
index b806cd6..0000000
--- a/code2code.tests/src/pageobjects/PackageExplorer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package pageobjects;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-
-import utils.Driver;
-
-
-public class PackageExplorer {
-
- public static void rightClick(IProject project, String menuItem) throws Exception {
- SWTBotTree swtBotTree = selectProject(project);
- SWTBotMenu generateMenuItem = swtBotTree.contextMenu(menuItem);
- generateMenuItem.click();
- }
-
-
- public static SWTBotTree selectProject(IProject project) throws WidgetNotFoundException {
- SWTBotView packageExplorerView = Driver.bot().view("Package Explorer");
-
- Tree projectsTree = (Tree) new ChildrenControlFinder(packageExplorerView.getWidget()).findControls(WidgetMatcherFactory.widgetOfType(Tree.class)).get(0);
- SWTBotTree swtBotTree = new SWTBotTree(projectsTree);
- swtBotTree.select(project.getName());
- swtBotTree.setFocus();
- return swtBotTree;
-
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/PreviewDialog.java b/code2code.tests/src/pageobjects/PreviewDialog.java
deleted file mode 100644
index 23dae50..0000000
--- a/code2code.tests/src/pageobjects/PreviewDialog.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package pageobjects;
-
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
-
-import utils.Driver;
-
-public class PreviewDialog {
-
- public static String getContent() throws Exception {
- StyledText text = (StyledText) new ChildrenControlFinder(Driver.bot().activeShell().widget).findControls(WidgetMatcherFactory.widgetOfType(StyledText.class)).get(0);
- SWTBotStyledText swtBotText = new SWTBotStyledText(text);
- return swtBotText.getText();
- }
-
- public static void setContent(String content) {
- StyledText text = (StyledText) new ChildrenControlFinder(Driver.bot().activeShell().widget).findControls(WidgetMatcherFactory.widgetOfType(StyledText.class)).get(0);
- SWTBotStyledText swtBotText = new SWTBotStyledText(text);
- swtBotText.setText(content);
- }
-
- public static void clickOk() {
- SWTBotShell previewShell = Driver.bot().activeShell();
- Driver.bot().button("OK").click();
- Driver.bot().waitUntil(Conditions.shellCloses(previewShell));
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/SelectAGeneratorDialog.java b/code2code.tests/src/pageobjects/SelectAGeneratorDialog.java
deleted file mode 100644
index c3e3a26..0000000
--- a/code2code.tests/src/pageobjects/SelectAGeneratorDialog.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package pageobjects;
-
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-
-import utils.Driver;
-
-public class SelectAGeneratorDialog {
-
- public static boolean isVisible() {
- try {
- Driver.bot().label("Select a Generator");
- } catch (WidgetNotFoundException e) {
- return false;
- }
- return true;
- }
-
- public static boolean isListed(String generator) {
- try {
- Driver.bot().radio(generator);
- } catch (WidgetNotFoundException e) {
- return false;
- }
- return true;
- }
-
- public static void select(String generator) throws Exception {
- Driver.bot().radio(generator).click();
- }
-
- public static void clickNext() throws Exception {
- Driver.bot().button("Next >").click();
- }
-
-}
diff --git a/code2code.tests/src/pageobjects/Workbench.java b/code2code.tests/src/pageobjects/Workbench.java
deleted file mode 100644
index c11116d..0000000
--- a/code2code.tests/src/pageobjects/Workbench.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package pageobjects;
-
-import utils.Driver;
-
-public class Workbench {
-
- private static boolean welcomeClosed = false;
-
- public static void closeWelcomeView() throws Exception {
- if (!welcomeClosed) {
- Driver.bot().view("Welcome").close();
- welcomeClosed = true;
- }
- }
-
-
-
-}
diff --git a/code2code.tests/src/steps/CreateGeneratorSteps.java b/code2code.tests/src/steps/CreateGeneratorSteps.java
deleted file mode 100644
index 844df75..0000000
--- a/code2code.tests/src/steps/CreateGeneratorSteps.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package steps;
-
-import static org.junit.Assert.*;
-
-import org.jbehave.scenario.annotations.Then;
-import org.jbehave.scenario.annotations.When;
-import org.jbehave.scenario.steps.Steps;
-
-import pageobjects.CustomizeGenerationDialog;
-import pageobjects.SelectAGeneratorDialog;
-import domain.WorkingProject;
-
-public class CreateGeneratorSteps extends Steps {
-
- @When("I create the generator folder \"$folderPath\"")
- public void createFolder(String folderPath) throws Exception {
- WorkingProject.createFolder(folderPath);
- }
-
- @When("I create the template file \"$filePath\"")
- public void createTemplateFile(String filePath) throws Exception {
- WorkingProject.createFile(filePath);
- }
-
- @When("I create the template file \"$filePath\" with contents: $contents")
- public void createTemplateFileWithContents(String filePath, String contents) throws Exception {
- WorkingProject.createFileWithContents(filePath, contents);
- }
-
- @When("I create the templates configuration file \"$filePath\"")
- public void createTemplatesConfigurationFile(String filePath) throws Exception {
- WorkingProject.createFile(filePath);
- }
-
- @When("I create the templates configuration file \"$filePath\" with contents: $contents")
- public void createTemplatesConfigurationFileWithContents(String filePath, String contents) throws Exception {
- WorkingProject.createFileWithContents(filePath, contents);
- }
-
- @When("I create the params configuration file \"$filePath\" with contents: $contents")
- public void createParamsConfigurationFile(String filePath, String contents) throws Exception {
- WorkingProject.createFileWithContents(filePath, contents);
- }
-
- @When("I create the description file \"$filePath\" with contents: $contents")
- public void createDescriptionFile(String filePath, String contents) throws Exception {
- WorkingProject.createFileWithContents(filePath, contents);
- }
-
-
- @When("I create the global params configuration file \"$filePath\" with contents: $contents")
- public void createGlobalParamsConfigurationFile(String filePath, String contents) throws Exception {
- WorkingProject.createFileWithContents(filePath, contents);
- }
-
- @Then("I will see the \"$generator\" generator listed on the \"Select a Generator\" dialog")
- public void checkGeneratorListed(String generator) {
- assertTrue(SelectAGeneratorDialog.isListed(generator));
- }
-
- @Then("I will see the template \"$template\" listed with destination \"$destination\" on the \"Customize Generation\" dialog")
- public void checkTemplateWithDestinationListed(String template, String destination) {
- assertTrue(SelectAGeneratorDialog.isListed(template));
- }
-
- @Then("I will see the \"Customize Generation\" dialog")
- public void checkCustomizeGenerationDialog() throws Exception{
- assertTrue(CustomizeGenerationDialog.isVisible());
- }
-
- @Then("I will see the template \"$template\" listed")
- public void checkTemplateListed(String template) throws Exception{
- assertTrue(CustomizeGenerationDialog.isListed(template));
- }
-
- @Then("I will see the template \"$template\" destination set to \"$destination\"")
- public void checkTemplateDestination(String template, String destination) throws Exception{
- assertEquals(destination, CustomizeGenerationDialog.getDestination(template));
- }
-
-
-
-
-
-}
diff --git a/code2code.tests/src/steps/GenerateFilesSteps.java b/code2code.tests/src/steps/GenerateFilesSteps.java
deleted file mode 100644
index 4582f5b..0000000
--- a/code2code.tests/src/steps/GenerateFilesSteps.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package steps;
-
-import static org.junit.Assert.*;
-
-import org.jbehave.scenario.annotations.Then;
-import org.jbehave.scenario.annotations.When;
-import org.jbehave.scenario.steps.Steps;
-
-import pageobjects.ConfigureParamsDialog;
-import pageobjects.ConsoleView;
-import pageobjects.CustomizeGenerationDialog;
-import pageobjects.GenerateFilesWizard;
-import pageobjects.PreviewDialog;
-import pageobjects.SelectAGeneratorDialog;
-import domain.WorkingProject;
-
-public class GenerateFilesSteps extends Steps {
-
- @When("I open the \"Generate Files\" wizard")
- public void openGenerateFilesWizard() throws Exception {
- GenerateFilesWizard.open();
- }
-
- @When("I select the \"$generator\" generator and click \"Next\"")
- public void selectGeneratorAndClickNext(String generator) throws Exception {
- SelectAGeneratorDialog.select(generator);
- SelectAGeneratorDialog.clickNext();
- }
-
- @When("I click \"Next\" on the \"Configure Params\" dialog")
- public void clickNextOnConfigureParams() throws Exception {
- ConfigureParamsDialog.clickNext();
- }
-
- @When("I uncheck the file \"$file\" on the \"Customize Generation\" dialog")
- public void uncheckFileOnCustomizeGeneration(String file) throws Exception {
- CustomizeGenerationDialog.uncheckFile(file);
- }
-
- @When("I finish the \"Generate Files\" wizard")
- public void finishWizard() throws Exception {
- GenerateFilesWizard.finish();
- }
-
- @When("I set the param \"$param\" value to \"$value\"")
- public void setGeneratorParam(String param, String value) throws Exception{
- ConfigureParamsDialog.setParam(param, value);
- }
-
- @When("I change the template \"$template\" destination to \"$destination\" on the \"Customize Generation\" dialog")
- public void setFileDestination(String template, String destination) throws Exception{
- CustomizeGenerationDialog.setDestination(template, destination);
- }
-
-
- @When("I click \"Preview\" on the template \"$template\"")
- public void clickPreview(String template) throws Exception {
- CustomizeGenerationDialog.openPreview(template);
- }
-
-
- @When("I change the output content on the \"Preview\" dialog to: $content")
- public void changePreviewContent(String content) throws Exception {
- PreviewDialog.setContent(content);
- }
-
- @When("I click \"OK\" on the \"Preview\" dialog")
- public void clickOkOnPreviewDialog() throws Exception {
- PreviewDialog.clickOk();
- }
-
-
- @Then("I will see the \"Select a Generator\" dialog")
- public void checkSelectAGeneratorDialog() throws Exception{
- assertTrue(SelectAGeneratorDialog.isVisible());
- }
-
- @Then("I will see the \"Configure Params\" dialog")
- public void checkConfigureParamsDialog() throws Exception{
- assertTrue(ConfigureParamsDialog.isVisible());
- }
-
- @Then("I will see the \"$param\" parameter to fill")
- public void checkParamListed(String param){
- assertTrue(ConfigureParamsDialog.isListed(param));
- }
-
- @Then("I will see the \"$param\" value already filled with \"$value\"")
- public void checkParamFilled(String param, String value) throws Exception{
- assertEquals(value, ConfigureParamsDialog.getParamValue(param));
- }
-
- @Then("I will see the \"$generator\" generator listed")
- public void checkGeneratorListed(String generator) {
- assertTrue(SelectAGeneratorDialog.isListed(generator));
- }
-
- @Then("I will see the file \"$file\" generated")
- public void checkFileExists(String file) throws Exception {
- assertTrue(WorkingProject.fileExists(file));
- }
-
- @Then("I will see not the file \"$file\" generated")
- public void checkFileDoesntExist(String file) throws Exception {
- assertFalse(WorkingProject.fileExists(file));
- }
-
-
- @Then("I will see the file \"$file\" generated with content: $content")
- public void checkFileContent(String file, String content) throws Exception {
- assertEquals(content, WorkingProject.read(file));
- }
-
-
- @Then("I will see the \"Configure Params\" dialog with the description: $description")
- public void checkDescriptionOnConfigureParams(String description) throws Exception {
- assertEquals(description, ConfigureParamsDialog.getDescription());
- }
-
-
- @Then("I will see the \"Preview\" dialog with content: $content")
- public void checkPreviewContent(String content) throws Exception {
- assertEquals(content, PreviewDialog.getContent());
- }
-
- @Then("I will see the \"Console\" printed with the content: $content")
- public void checkConsoleContainsContent(String content) throws Exception {
- assertTrue("Expected Console content:\n" + ConsoleView.getContent() + "\n to contain: \n" + content, ConsoleView.getContent().contains(content));
- }
-
-
-}
diff --git a/code2code.tests/src/steps/ProjectSteps.java b/code2code.tests/src/steps/ProjectSteps.java
deleted file mode 100644
index 3949452..0000000
--- a/code2code.tests/src/steps/ProjectSteps.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package steps;
-
-import org.jbehave.scenario.annotations.AfterScenario;
-import org.jbehave.scenario.annotations.BeforeScenario;
-import org.jbehave.scenario.annotations.Given;
-import org.jbehave.scenario.annotations.When;
-import org.jbehave.scenario.steps.Steps;
-
-import pageobjects.PackageExplorer;
-import pageobjects.Workbench;
-import domain.WorkingProject;
-
-public class ProjectSteps extends Steps {
-
- @BeforeScenario
- public void closeWelcome() throws Exception {
- Workbench.closeWelcomeView();
- }
-
- @Given("I have a new project")
- public void createNewProject() throws Exception{
- WorkingProject.create();
- }
-
- @When("I right click the project on the Package Explorer and select \"$menuItem\"")
- public void rightClick(String menuItem) throws Exception {
- PackageExplorer.rightClick(WorkingProject.project(), menuItem);
- }
-
- @AfterScenario()
- public void removeProject() throws Exception{
-// WorkingProject.delete();
- }
-
-
-}
diff --git a/code2code.tests/src/stories/creatinggenerators/CreateCompositeGenerators.java b/code2code.tests/src/stories/creatinggenerators/CreateCompositeGenerators.java
deleted file mode 100644
index 6f653b7..0000000
--- a/code2code.tests/src/stories/creatinggenerators/CreateCompositeGenerators.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class CreateCompositeGenerators extends Scenario {
-
-
- public CreateCompositeGenerators() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/CreateGenerators.java b/code2code.tests/src/stories/creatinggenerators/CreateGenerators.java
deleted file mode 100644
index abb9a27..0000000
--- a/code2code.tests/src/stories/creatinggenerators/CreateGenerators.java
+++ /dev/null
@@ -1 +0,0 @@
-package stories.creatinggenerators;
import org.jbehave.scenario.Scenario;
import steps.CreateGeneratorSteps;
import steps.GenerateFilesSteps;
import steps.ProjectSteps;
public class CreateGenerators extends Scenario {
public CreateGenerators() {
super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
}
}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetDescriptionToGenerators.java b/code2code.tests/src/stories/creatinggenerators/SetDescriptionToGenerators.java
deleted file mode 100644
index b8a6396..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetDescriptionToGenerators.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package stories.creatinggenerators;
-
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetDescriptionToGenerators extends Scenario {
-
-
- public SetDescriptionToGenerators() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetParamsForGenerators.java b/code2code.tests/src/stories/creatinggenerators/SetParamsForGenerators.java
deleted file mode 100644
index e173e21..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetParamsForGenerators.java
+++ /dev/null
@@ -1 +0,0 @@
-package stories.creatinggenerators;
import org.jbehave.scenario.Scenario;
import steps.CreateGeneratorSteps;
import steps.GenerateFilesSteps;
import steps.ProjectSteps;
public class SetParamsForGenerators extends Scenario {
public SetParamsForGenerators() {
super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
}
}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTemplateFiles.java b/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTemplateFiles.java
deleted file mode 100644
index 38a409e..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTemplateFiles.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetTemplateEngineForTemplateFiles extends Scenario {
-
-
- public SetTemplateEngineForTemplateFiles() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheParamsConfigFile.java b/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheParamsConfigFile.java
deleted file mode 100644
index 9391fb0..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheParamsConfigFile.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetTemplateEngineForTheParamsConfigFile extends Scenario {
-
-
- public SetTemplateEngineForTheParamsConfigFile() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheTemplatesConfigFile.java b/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheTemplatesConfigFile.java
deleted file mode 100644
index 608b291..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetTemplateEngineForTheTemplatesConfigFile.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetTemplateEngineForTheTemplatesConfigFile extends Scenario {
-
-
- public SetTemplateEngineForTheTemplatesConfigFile() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/SetTemplatesToBeGenerated.java b/code2code.tests/src/stories/creatinggenerators/SetTemplatesToBeGenerated.java
deleted file mode 100644
index 5e75962..0000000
--- a/code2code.tests/src/stories/creatinggenerators/SetTemplatesToBeGenerated.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetTemplatesToBeGenerated extends Scenario {
-
-
- public SetTemplatesToBeGenerated() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/UseTemplateEngines.java b/code2code.tests/src/stories/creatinggenerators/UseTemplateEngines.java
deleted file mode 100644
index a597fe7..0000000
--- a/code2code.tests/src/stories/creatinggenerators/UseTemplateEngines.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.creatinggenerators;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class UseTemplateEngines extends Scenario {
-
-
- public UseTemplateEngines() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/create_composite_generators b/code2code.tests/src/stories/creatinggenerators/create_composite_generators
deleted file mode 100644
index d6a0723..0000000
--- a/code2code.tests/src/stories/creatinggenerators/create_composite_generators
+++ /dev/null
@@ -1,42 +0,0 @@
-Story: Create composite generators
-
- As a Developer
- I want to compose generators
- So that I can use them together or separately
-
-
-
-Scenario: Create composite generators
-
- Given I have a new project
-
- When I create the generator folder "generators/Composite Generator.generator"
- And I create the templates configuration file "generators/Composite Generator.generator/templates.ftl" with contents:
- NestedGenerator.generator
- And I create the params configuration file "generators/Composite Generator.generator/params.txt" with contents:
- commonParam=Composite value
- compositeParam
- And I create the generator folder "generators/Composite Generator.generator/NestedGenerator.generator"
- And I create the template file "generators/Composite Generator.generator/NestedGenerator.generator/templates/Nestedgenerator.ftl" with contents:
- ${commonParam}
- And I create the templates configuration file "generators/Composite Generator.generator/NestedGenerator.generator/templates.ftl" with contents:
- templates/Nestedgenerator.ftl=NestedGenerator.txt
- And I create the params configuration file "generators/Composite Generator.generator/NestedGenerator.generator/params.txt" with contents:
- commonParam=Nested value
- nestedParam
- And I right click the project on the Package Explorer and select "Generate..."
- Then I will see the "Composite Generator" generator listed on the "Select a Generator" dialog
- And I will see the "Composite Generator.generator/NestedGenerator" generator listed on the "Select a Generator" dialog
-
- When I select the "Composite Generator" generator and click "Next"
- Then I will see the "Configure Params" dialog
- And I will see the "commonParam" parameter to fill
- And I will see the "commonParam" value already filled with "Composite value"
- And I will see the "compositeParam" parameter to fill
- And I will see the "nestedParam" parameter to fill
-
- When I finish the "Generate Files" wizard
- Then I will see the file "NestedGenerator.txt" generated with content:
- Composite value
-
-
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/create_generators b/code2code.tests/src/stories/creatinggenerators/create_generators
deleted file mode 100644
index 90f7dc6..0000000
--- a/code2code.tests/src/stories/creatinggenerators/create_generators
+++ /dev/null
@@ -1,30 +0,0 @@
-Story: Create Generators
-
- As a Developer
- I want to create my own generators
- So that I can customize them to my needs
-
-
-Scenario: Create a minimal do-nothing generator
-
- Given I have a new project
- When I create the generator folder "generators/Minimal Generator.generator"
- And I create the templates configuration file "generators/Minimal Generator.generator/templates.txt"
- And I right click the project on the Package Explorer and select "Generate..."
- Then I will see the "Minimal Generator" generator listed on the "Select a Generator" dialog
-
-
-Scenario: Create a generator which just generates a file on the specified location
-
- Given I have a new project
- When I create the generator folder "generators/Plain File.generator"
- And I create the template file "generators/Plain File.generator/templates/PlainFile.txt" with contents:
- Plain Text File!!!
- And I create the templates configuration file "generators/Plain File.generator/templates.txt" with contents:
- templates/PlainFile.txt=Plain File.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Plain File" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Plain File.txt" generated with content:
- Plain Text File!!!
-
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/set_description_to_generators b/code2code.tests/src/stories/creatinggenerators/set_description_to_generators
deleted file mode 100644
index c28de1e..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_description_to_generators
+++ /dev/null
@@ -1,21 +0,0 @@
-Story: Set description to generators
-
- As a Generator Developer
- I want to set description to generators
- So that others developers knows its purposes
-
-
-Scenario: Set a description to a generator
-
- Given I have a new project
- When I create the generator folder "generators/Generator with description.generator"
- And I create the template file "generators/Generator with description.generator/templates/Generatorwithdescription.txt.ftl"
- And I create the description file "generators/Generator with description.generator/description.txt" with contents:
- A generator with a description
- And I create the templates configuration file "generators/Generator with description.generator/templates.ftl" with contents:
- templates/Generatorwithdescription.txt.ftl=Generator with description.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with description" generator and click "Next"
- Then I will see the "Configure Params" dialog with the description:
- A generator with a description
-
diff --git a/code2code.tests/src/stories/creatinggenerators/set_params_for_generators b/code2code.tests/src/stories/creatinggenerators/set_params_for_generators
deleted file mode 100644
index 0356554..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_params_for_generators
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Story: Set params for generators
-
- As a I Developer
- I want to parameterize my generators
- So that I can generate dynamic content
-
-
-Scenario: Set params for a generator
-
- Given I have a new project
- When I create the generator folder "generators/Parameterized.generator"
- And I create the templates configuration file "generators/Parameterized.generator/templates.txt"
- And I create the params configuration file "generators/Parameterized.generator/params.txt" with contents:
- someParam
- And I open the "Generate Files" wizard
- And I select the "Parameterized" generator and click "Next"
- Then I will see the "Configure Params" dialog
- And I will see the "someParam" parameter to fill
-
-Scenario: Set default values to params
-
- Given I have a new project
- When I create the generator folder "generators/ParameterizedWithDefaultValue.generator"
- And I create the templates configuration file "generators/ParameterizedWithDefaultValue.generator/templates.txt"
- And I create the params configuration file "generators/ParameterizedWithDefaultValue.generator/params.txt" with contents:
- someParam=someDefaultValue
- And I open the "Generate Files" wizard
- And I select the "ParameterizedWithDefaultValue" generator and click "Next"
- Then I will see the "Configure Params" dialog
- And I will see the "someParam" parameter to fill
- And I will see the "someParam" value already filled with "someDefaultValue"
-
-
-
-
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_template_files b/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_template_files
deleted file mode 100644
index 9d47a56..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_template_files
+++ /dev/null
@@ -1,20 +0,0 @@
-Story: Set template engine for template files
-
- As a Developer
- I want to use template engine on template files
- So that I have dynamic generated content
-
-
-Scenario: Set Freemarker as template engine for template files
-
- Given I have a new project
- When I create the generator folder "generators/Using Freemarker on templates.generator"
- And I create the template file "generators/Using Freemarker on templates.generator/templates/UsingFreemarkerOnTemplates.txt.ftl" with contents:
- <#assign engine="Freemarker"/>Using ${engine} on templates
- And I create the templates configuration file "generators/Using Freemarker on templates.generator/templates.ftl" with contents:
- templates/UsingFreemarkerOnTemplates.txt.ftl=Using Freemarker on templates.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Using Freemarker on templates" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Using Freemarker on templates.txt" generated with content:
- Using Freemarker on templates
\ No newline at end of file
diff --git a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_params_config_file b/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_params_config_file
deleted file mode 100644
index 9a141bb..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_params_config_file
+++ /dev/null
@@ -1,25 +0,0 @@
-Story: Set template engine for the params config file
-
- As a Developer
- I want to use template engines on the params config files
- So that I have processed params
-
-
-
-Scenario: Set Freemarker as the template engine for the params config file
-
- Given I have a new project
- When I create the generator folder "generators/Using Freemarker on the params config file.generator"
- And I create the template file "generators/Using Freemarker on the params config file.generator/templates/UsingFreemarkerOnParamsConfigFile.txt.ftl" with contents:
- ${parameter1}
- And I create the templates configuration file "generators/Using Freemarker on the params config file.generator/templates.ftl" with contents:
- templates/UsingFreemarkerOnParamsConfigFile.txt.ftl=Using Freemarker on the params config file.txt
- And I create the params configuration file "generators/Using Freemarker on the params config file.generator/params.ftl" with contents:
- parameter1=${"param processed by freemarker"?capitalize}
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Using Freemarker on the params config file" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Using Freemarker on the params config file.txt" generated with content:
- Param Processed By Freemarker
-
-
diff --git a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_templates_config_file b/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_templates_config_file
deleted file mode 100644
index 55194c5..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_template_engine_for_the_templates_config_file
+++ /dev/null
@@ -1,20 +0,0 @@
-Story: Set template engine for the templates config file
-
- As a Developer
- I want to use template engines on templates config files
- So that I have processed template destinations
-
-
-Scenario: Set Freemarker as template engine for the templates config file
-
- Given I have a new project
- When I create the generator folder "generators/Using Freemarker on the templates config file.generator"
- And I create the template file "generators/Using Freemarker on the templates config file.generator/templates/UsingFreemarkerOnThemplatesConfigFile.txt.ftl"
- And I create the templates configuration file "generators/Using Freemarker on the templates config file.generator/templates.ftl" with contents:
- templates/UsingFreemarkerOnThemplatesConfigFile.txt.ftl=<#assign processedDestination="Using Freemarker on the templates config file.txt"/>${processedDestination}
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Using Freemarker on the templates config file" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Using Freemarker on the templates config file.txt" generated
-
-
diff --git a/code2code.tests/src/stories/creatinggenerators/set_templates_to_be_generated b/code2code.tests/src/stories/creatinggenerators/set_templates_to_be_generated
deleted file mode 100644
index ac0cfe5..0000000
--- a/code2code.tests/src/stories/creatinggenerators/set_templates_to_be_generated
+++ /dev/null
@@ -1,21 +0,0 @@
-Story: Set templates to be generated
-
- As a Developer
- I want to set the templates to be generated
- So that the plugin processes and generates them on the right place
-
-
-
-Scenario: Set templates to be generated
-
- Given I have a new project
- When I create the generator folder "generators/Generator with templates.generator"
- And I create the template file "generators/Generator with templates.generator/templates/Templatetobegenerated.txt.ftl"
- And I create the templates configuration file "generators/Generator with templates.generator/templates.ftl" with contents:
- templates/Templatetobegenerated.txt.ftl=Destination.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with templates" generator and click "Next"
- And I click "Next" on the "Configure Params" dialog
- Then I will see the "Customize Generation" dialog
- And I will see the template "templates/Templatetobegenerated.txt.ftl" listed
- And I will see the template "templates/Templatetobegenerated.txt.ftl" destination set to "Destination.txt"
diff --git a/code2code.tests/src/stories/creatinggenerators/use_template_engines b/code2code.tests/src/stories/creatinggenerators/use_template_engines
deleted file mode 100644
index 415f791..0000000
--- a/code2code.tests/src/stories/creatinggenerators/use_template_engines
+++ /dev/null
@@ -1,74 +0,0 @@
-Story: Use template engines
-
- As a Developer
- I want to use template engines I know
- So that I have them processed
-
-
-
-Scenario: Use Freemarker on .ftl files
-
- Given I have a new project
- When I create the generator folder "generators/Generator using Freemarker.generator"
- And I create the template file "generators/Generator using Freemarker.generator/templates/FreemarkerTemplate.txt.ftl" with contents:
- ${"processed"?capitalize} by ${engine}
- And I create the templates configuration file "generators/Generator using Freemarker.generator/templates.ftl" with contents:
- templates/FreemarkerTemplate.txt.ftl=${engine} template.txt
- And I create the params configuration file "generators/Generator using Freemarker.generator/params.ftl" with contents:
- engine=${"freemarker"?capitalize}
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using Freemarker" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Freemarker template.txt" generated with content:
- Processed by Freemarker
-
-Scenario: Use Velocity on .vm files
-
- Given I have a new project
- When I create the generator folder "generators/Generator using Velocity.generator"
- And I create the template file "generators/Generator using Velocity.generator/templates/VelocityTemplate.txt.vm" with contents:
- Processed by $engine.toLowerCase()
- And I create the templates configuration file "generators/Generator using Velocity.generator/templates.vm" with contents:
- templates/VelocityTemplate.txt.vm=$engine.toLowerCase() template.txt
- And I create the params configuration file "generators/Generator using Velocity.generator/params.vm" with contents:
- engine=#set($text='Velocity')$text.toUpperCase()
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using Velocity" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "velocity template.txt" generated with content:
- Processed by velocity
-
-
-Scenario: Use Groovy on .groovy files
-
- Given I have a new project
- When I create the generator folder "generators/Generator using Groovy.generator"
- And I create the template file "generators/Generator using Groovy.generator/templates/GroovyTemplate.txt.groovy" with contents:
- Processed by <%=engine.toLowerCase()%>
- And I create the templates configuration file "generators/Generator using Groovy.generator/templates.groovy" with contents:
- templates/GroovyTemplate.txt.groovy=<%=engine.toLowerCase()%> template.txt
- And I create the params configuration file "generators/Generator using Groovy.generator/params.groovy" with contents:
- engine=<%="Groovy".toUpperCase()%>
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using Groovy" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "groovy template.txt" generated with content:
- Processed by groovy
-
-
-Scenario: Use no engine on .txt files
-
- Given I have a new project
- When I create the generator folder "generators/Generator using no Template.generator"
- And I create the template file "generators/Generator using no Template.generator/templates/unprocessed.txt" with contents:
- Processed by <%=engine.toLowerCase()%>
- And I create the templates configuration file "generators/Generator using no Template.generator/templates.txt" with contents:
- templates/unprocessed.txt=unprocessed.txt
- And I create the params configuration file "generators/Generator using no Template.generator/params.txt" with contents:
- engine=<%="no Template".toUpperCase()%>
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using no Template" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "unprocessed.txt" generated with content:
- Processed by <%=engine.toLowerCase()%>
-
diff --git a/code2code.tests/src/stories/usingthegenerator/ChooseFilesThatWillBeGenerated.java b/code2code.tests/src/stories/usingthegenerator/ChooseFilesThatWillBeGenerated.java
deleted file mode 100644
index cc0647e..0000000
--- a/code2code.tests/src/stories/usingthegenerator/ChooseFilesThatWillBeGenerated.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class ChooseFilesThatWillBeGenerated extends Scenario {
-
-
- public ChooseFilesThatWillBeGenerated() {
- super(new ProjectSteps(), new GenerateFilesSteps(), new CreateGeneratorSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/GenerateFiles.java b/code2code.tests/src/stories/usingthegenerator/GenerateFiles.java
deleted file mode 100644
index d14f998..0000000
--- a/code2code.tests/src/stories/usingthegenerator/GenerateFiles.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class GenerateFiles extends Scenario {
-
-
- public GenerateFiles() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/GenerateTemplatesToConsole.java b/code2code.tests/src/stories/usingthegenerator/GenerateTemplatesToConsole.java
deleted file mode 100644
index 1f9b43b..0000000
--- a/code2code.tests/src/stories/usingthegenerator/GenerateTemplatesToConsole.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class GenerateTemplatesToConsole extends Scenario {
-
-
- public GenerateTemplatesToConsole() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/LogGenerationToConsole.java b/code2code.tests/src/stories/usingthegenerator/LogGenerationToConsole.java
deleted file mode 100644
index 280d9da..0000000
--- a/code2code.tests/src/stories/usingthegenerator/LogGenerationToConsole.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class LogGenerationToConsole extends Scenario {
-
-
- public LogGenerationToConsole() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/ParamsReferencingOtherParams.java b/code2code.tests/src/stories/usingthegenerator/ParamsReferencingOtherParams.java
deleted file mode 100644
index 0a178a5..0000000
--- a/code2code.tests/src/stories/usingthegenerator/ParamsReferencingOtherParams.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class ParamsReferencingOtherParams extends Scenario {
-
-
- public ParamsReferencingOtherParams() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/PreviewTheOutput.java b/code2code.tests/src/stories/usingthegenerator/PreviewTheOutput.java
deleted file mode 100644
index ee6913f..0000000
--- a/code2code.tests/src/stories/usingthegenerator/PreviewTheOutput.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class PreviewTheOutput extends Scenario {
-
-
- public PreviewTheOutput() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/SetParamsForGeneration.java b/code2code.tests/src/stories/usingthegenerator/SetParamsForGeneration.java
deleted file mode 100644
index faff696..0000000
--- a/code2code.tests/src/stories/usingthegenerator/SetParamsForGeneration.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetParamsForGeneration extends Scenario {
-
-
- public SetParamsForGeneration() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/SetTemplatesDestinations.java b/code2code.tests/src/stories/usingthegenerator/SetTemplatesDestinations.java
deleted file mode 100644
index 1639478..0000000
--- a/code2code.tests/src/stories/usingthegenerator/SetTemplatesDestinations.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class SetTemplatesDestinations extends Scenario {
-
-
- public SetTemplatesDestinations() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/UseGlobalParams.java b/code2code.tests/src/stories/usingthegenerator/UseGlobalParams.java
deleted file mode 100644
index c0ef051..0000000
--- a/code2code.tests/src/stories/usingthegenerator/UseGlobalParams.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package stories.usingthegenerator;
-import org.jbehave.scenario.Scenario;
-
-import steps.CreateGeneratorSteps;
-import steps.GenerateFilesSteps;
-import steps.ProjectSteps;
-
-public class UseGlobalParams extends Scenario {
-
-
- public UseGlobalParams() {
- super(new ProjectSteps(), new CreateGeneratorSteps(), new GenerateFilesSteps());
- }
-
-
-
-}
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/choose_files_that_will_be_generated b/code2code.tests/src/stories/usingthegenerator/choose_files_that_will_be_generated
deleted file mode 100644
index fef0ba3..0000000
--- a/code2code.tests/src/stories/usingthegenerator/choose_files_that_will_be_generated
+++ /dev/null
@@ -1,25 +0,0 @@
-Story: Choose files that will be generated
-
- As a Developer
- I want to choose the files that will be generated
- So that I can avoid generation of the ones I don't need
-
-
-
-Scenario: Choose files that will be generated
-
- Given I have a new project
- When I create the generator folder "generators/Multiple Files Generator.generator"
- And I create the template file "generators/Multiple Files Generator.generator/templates/File1.txt"
- And I create the template file "generators/Multiple Files Generator.generator/templates/File2.txt"
- And I create the templates configuration file "generators/Multiple Files Generator.generator/templates.txt" with contents:
- templates/File1.txt=File1.txt
- templates/File2.txt=File2.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Multiple Files Generator" generator and click "Next"
- And I click "Next" on the "Configure Params" dialog
- And I uncheck the file "templates/File2.txt" on the "Customize Generation" dialog
- And I finish the "Generate Files" wizard
- Then I will see the file "File1.txt" generated
- And I will see not the file "File2.txt" generated
-
diff --git a/code2code.tests/src/stories/usingthegenerator/generate_files b/code2code.tests/src/stories/usingthegenerator/generate_files
deleted file mode 100644
index 5b189bf..0000000
--- a/code2code.tests/src/stories/usingthegenerator/generate_files
+++ /dev/null
@@ -1,22 +0,0 @@
-Story: Generate Files
-
- As a Developer
- I want to generate files
- So that I speed up development
-
-
-
-Scenario: Generate Files
-
- Given I have a new project
- When I create the generator folder "generators/File Generator.generator"
- And I create the template file "generators/File Generator.generator/templates/GeneratedFile.txt.txt" with contents:
- File content
- And I create the templates configuration file "generators/File Generator.generator/templates.txt" with contents:
- templates/GeneratedFile.txt.txt=Generated File.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "File Generator" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Generated File.txt" generated with content:
- File content
-
diff --git a/code2code.tests/src/stories/usingthegenerator/generate_templates_to_console b/code2code.tests/src/stories/usingthegenerator/generate_templates_to_console
deleted file mode 100644
index b9d42b4..0000000
--- a/code2code.tests/src/stories/usingthegenerator/generate_templates_to_console
+++ /dev/null
@@ -1,26 +0,0 @@
-Story: Generate templates to console
-
- As a Developer
- I want to generate code snippets to console
- So that I can copy and paste them to the right files
-
-
-Scenario: Generate to console
-
- Given I have a new project
- When I create the generator folder "generators/Generator using console.generator"
- And I create the template file "generators/Generator using console.generator/templates/TemplateWithSnippet.txt" with contents:
- Some code Snippet to be Copy and Pasted
- And I create the templates configuration file "generators/Generator using console.generator/templates.txt" with contents:
- templates/TemplateWithSnippet.txt=
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using console" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the "Console" printed with the content:
-
-Processing generator: Generator using console
-Generating templates/TemplateWithSnippet.txt to console:
--------------------------------------------------------------
-Some code Snippet to be Copy and Pasted
--------------------------------------------------------------
-Done
diff --git a/code2code.tests/src/stories/usingthegenerator/log_generation_to_console b/code2code.tests/src/stories/usingthegenerator/log_generation_to_console
deleted file mode 100644
index a360dec..0000000
--- a/code2code.tests/src/stories/usingthegenerator/log_generation_to_console
+++ /dev/null
@@ -1,26 +0,0 @@
-Story: Log generation to console
-
- As a Developer
- I want to see the generation log on console
- So that I know what's happening
-
-
-
-Scenario: Log generated files to console
-
- Given I have a new project
- When I create the generator folder "generators/Generator for log.generator"
- And I create the template file "generators/Generator for log.generator/templates/File1.txt.txt"
- And I create the template file "generators/Generator for log.generator/templates/File2.txt.txt"
- And I create the templates configuration file "generators/Generator for log.generator/templates.txt" with contents:
- templates/File1.txt.txt=File 1.txt
- templates/File2.txt.txt=File 2.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator for log" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the "Console" printed with the content:
-
-Processing generator: Generator for log
-Generating: templates/File1.txt.txt to File 1.txt
-Generating: templates/File2.txt.txt to File 2.txt
-Done
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/params_referencing_other_params b/code2code.tests/src/stories/usingthegenerator/params_referencing_other_params
deleted file mode 100644
index 42b11da..0000000
--- a/code2code.tests/src/stories/usingthegenerator/params_referencing_other_params
+++ /dev/null
@@ -1,25 +0,0 @@
-Story: Params referencing other params
-
- As a Developer
- I want to have each param value processed by declaration order
- So that I can reference and process previous params values
-
-
-
-Scenario: Params referencing other params
-
- Given I have a new project
- When I create the generator folder "generators/Generator with Params.generator"
- And I create the template file "generators/Generator with Params.generator/templates/GeneratedFile.txt.ftl" with contents:
- ${processedParam}
- And I create the templates configuration file "generators/Generator with Params.generator/templates.ftl" with contents:
- templates/GeneratedFile.txt.ftl=Generated File.txt
- And I create the params configuration file "generators/Generator with Params.generator/params.ftl" with contents:
- referencedParam=referenced param
- processedParam=${referencedParam?capitalize}
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with Params" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Generated File.txt" generated with content:
- Referenced Param
-
diff --git a/code2code.tests/src/stories/usingthegenerator/preview_the_output b/code2code.tests/src/stories/usingthegenerator/preview_the_output
deleted file mode 100644
index b48f9ac..0000000
--- a/code2code.tests/src/stories/usingthegenerator/preview_the_output
+++ /dev/null
@@ -1,47 +0,0 @@
-Story: Preview the output
-
- As a Developer
- I want to preview the output of generators
- So that I know what will be generated
-
-
-
-Scenario: Preview the processed output
-
- Given I have a new project
- When I create the generator folder "generators/Generator for previewing.generator"
- And I create the template file "generators/Generator for previewing.generator/templates/TemplateForPreviewing.txt.ftl" with contents:
- ${param1} Content of the template
- And I create the templates configuration file "generators/Generator for previewing.generator/templates.ftl" with contents:
- templates/TemplateForPreviewing.txt.ftl=Template for previewing.txt
- And I create the params configuration file "generators/Generator for previewing.generator/params.ftl" with contents:
- param1
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator for previewing" generator and click "Next"
- And I set the param "param1" value to "Processed"
- And I click "Next" on the "Configure Params" dialog
- And I click "Preview" on the template "templates/TemplateForPreviewing.txt.ftl"
- Then I will see the "Preview" dialog with content:
- Processed Content of the template
-
-
-
-Scenario: Preview and change the output
-
- Given I have a new project
- When I create the generator folder "generators/Generator for change on preview.generator"
- And I create the template file "generators/Generator for change on preview.generator/templates/TemplateForChangeOnPreview.txt.ftl" with contents:
- Original Content of the template
- And I create the templates configuration file "generators/Generator for change on preview.generator/templates.ftl" with contents:
- templates/TemplateForChangeOnPreview.txt.ftl=Template for change on preview.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator for change on preview" generator and click "Next"
- And I click "Next" on the "Configure Params" dialog
- And I click "Preview" on the template "templates/TemplateForChangeOnPreview.txt.ftl"
- And I change the output content on the "Preview" dialog to:
- Changed Content of the template
- And I click "OK" on the "Preview" dialog
- And I finish the "Generate Files" wizard
- Then I will see the file "Template for change on preview.txt" generated with content:
- Changed Content of the template
-
\ No newline at end of file
diff --git a/code2code.tests/src/stories/usingthegenerator/set_params_for_generation b/code2code.tests/src/stories/usingthegenerator/set_params_for_generation
deleted file mode 100644
index 7207647..0000000
--- a/code2code.tests/src/stories/usingthegenerator/set_params_for_generation
+++ /dev/null
@@ -1,50 +0,0 @@
-Story: Set params for generation
-
- As a Developer
- I want to change the generator params
- So that it generates the dynamic content I need
-
-
-
-Scenario: Set params for generation
-
- Given I have a new project
- When I create the generator folder "generators/Generator with param.generator"
- And I create the template file "generators/Generator with param.generator/templates/Generatorwithparam.txt.ftl" with contents:
- ${parameter1}
- ${parameter2}
- And I create the templates configuration file "generators/Generator with param.generator/templates.ftl" with contents:
- templates/Generatorwithparam.txt.ftl=Generator with param.txt
- And I create the params configuration file "generators/Generator with param.generator/params.ftl" with contents:
- parameter1
- parameter2
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with param" generator and click "Next"
- And I set the param "parameter1" value to "Parameter 1"
- And I set the param "parameter2" value to "Parameter 2"
- And I finish the "Generate Files" wizard
- Then I will see the file "Generator with param.txt" generated with content:
- Parameter 1
- Parameter 2
-
-
-Scenario: Set a processed param for generation
-
- Given I have a new project
- When I create the generator folder "generators/Generator with param.generator"
- And I create the template file "generators/Generator with param.generator/templates/Generatorwithparam.txt.ftl" with contents:
- ${parameter1}
- ${parameter2}
- And I create the templates configuration file "generators/Generator with param.generator/templates.ftl" with contents:
- templates/Generatorwithparam.txt.ftl=Generator with param.txt
- And I create the params configuration file "generators/Generator with param.generator/params.ftl" with contents:
- parameter1
- parameter2
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with param" generator and click "Next"
- And I set the param "parameter1" value to "Parameter 1"
- And I set the param "parameter2" value to "${parameter1?upper_case}"
- And I finish the "Generate Files" wizard
- Then I will see the file "Generator with param.txt" generated with content:
- Parameter 1
- PARAMETER 1
diff --git a/code2code.tests/src/stories/usingthegenerator/set_templates_destinations b/code2code.tests/src/stories/usingthegenerator/set_templates_destinations
deleted file mode 100644
index 1ec74f1..0000000
--- a/code2code.tests/src/stories/usingthegenerator/set_templates_destinations
+++ /dev/null
@@ -1,21 +0,0 @@
-Story: Set templates destinations
-
- As a Developer
- I want to be able to change the destination of the templates
- So that I can choose the right place to it
-
-
-
-Scenario: Set a template destination
-
- Given I have a new project
- When I create the generator folder "generators/Generator with unwanted destination.generator"
- And I create the template file "generators/Generator with unwanted destination.generator/templates/TemplateWithUnwantedDestination.txt.ftl"
- And I create the templates configuration file "generators/Generator with unwanted destination.generator/templates.ftl" with contents:
- templates/TemplateWithUnwantedDestination.txt.ftl=UnwantedFolder/Template with unwanted destination.txt
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator with unwanted destination" generator and click "Next"
- And I click "Next" on the "Configure Params" dialog
- And I change the template "templates/TemplateWithUnwantedDestination.txt.ftl" destination to "Template with unwanted destination.txt" on the "Customize Generation" dialog
- And I finish the "Generate Files" wizard
- Then I will see the file "Template with unwanted destination.txt" generated
diff --git a/code2code.tests/src/stories/usingthegenerator/use_global_params b/code2code.tests/src/stories/usingthegenerator/use_global_params
deleted file mode 100644
index 30ca10f..0000000
--- a/code2code.tests/src/stories/usingthegenerator/use_global_params
+++ /dev/null
@@ -1,25 +0,0 @@
-Story: Use global params
-
- As a Developer
- I want to use global default params
- So that I don't need to specify them in each generator
-
-
-Scenario: Use global params
-
- Given I have a new project
- When I create the generator folder "generators/Generator using global params.generator"
- And I create the template file "generators/Generator using global params.generator/templates/GeneratorUsingGlobalParams.txt.ftl" with contents:
- ${param1}
- And I create the templates configuration file "generators/Generator using global params.generator/templates.ftl" with contents:
- templates/GeneratorUsingGlobalParams.txt.ftl=Generator using global params.txt
- And I create the params configuration file "generators/Generator using global params.generator/params.ftl" with contents:
- param1=${param1!"Generator Param"}
- And I create the global params configuration file "generators/params.ftl" with contents:
- param1=Global Param
- And I right click the project on the Package Explorer and select "Generate..."
- And I select the "Generator using global params" generator and click "Next"
- And I finish the "Generate Files" wizard
- Then I will see the file "Generator using global params.txt" generated with content:
- Global Param
-
diff --git a/code2code.tests/src/suites/AllScenarios.java b/code2code.tests/src/suites/AllScenarios.java
deleted file mode 100644
index 1346554..0000000
--- a/code2code.tests/src/suites/AllScenarios.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package suites;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-import stories.creatinggenerators.CreateCompositeGenerators;
-import stories.creatinggenerators.CreateGenerators;
-import stories.creatinggenerators.SetDescriptionToGenerators;
-import stories.creatinggenerators.SetParamsForGenerators;
-import stories.creatinggenerators.SetTemplateEngineForTemplateFiles;
-import stories.creatinggenerators.SetTemplateEngineForTheTemplatesConfigFile;
-import stories.creatinggenerators.SetTemplatesToBeGenerated;
-import stories.creatinggenerators.UseTemplateEngines;
-import stories.usingthegenerator.ChooseFilesThatWillBeGenerated;
-import stories.usingthegenerator.GenerateFiles;
-import stories.usingthegenerator.GenerateTemplatesToConsole;
-import stories.usingthegenerator.LogGenerationToConsole;
-import stories.usingthegenerator.ParamsReferencingOtherParams;
-import stories.usingthegenerator.PreviewTheOutput;
-import stories.usingthegenerator.SetParamsForGeneration;
-import stories.usingthegenerator.SetTemplatesDestinations;
-import stories.usingthegenerator.UseGlobalParams;
-
-
-@RunWith(Suite.class)
-@SuiteClasses({
- CreateGenerators.class,
- SetParamsForGenerators.class,
- ChooseFilesThatWillBeGenerated.class,
- UseTemplateEngines.class,
- SetParamsForGeneration.class,
- SetTemplatesDestinations.class,
- SetDescriptionToGenerators.class,
- PreviewTheOutput.class,
- UseGlobalParams.class,
- GenerateTemplatesToConsole.class,
- LogGenerationToConsole.class,
- ParamsReferencingOtherParams.class,
- SetTemplatesToBeGenerated.class,
- CreateCompositeGenerators.class,
- GenerateFiles.class,
- SetTemplateEngineForTemplateFiles.class,
- SetTemplateEngineForTheTemplatesConfigFile.class
-
-
-
-})
-public class AllScenarios {
-
-}
diff --git a/code2code.tests/src/utils/BaseScenario.java b/code2code.tests/src/utils/BaseScenario.java
deleted file mode 100644
index 1bfa0eb..0000000
--- a/code2code.tests/src/utils/BaseScenario.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package utils;
-
-import org.jbehave.scenario.Scenario;
-import org.jbehave.scenario.steps.CandidateSteps;
-
-
-public class BaseScenario extends Scenario {
-
-
- public BaseScenario(CandidateSteps... candidateSteps) {
- super(candidateSteps);
- }
-
-}
diff --git a/code2code.tests/src/utils/Driver.java b/code2code.tests/src/utils/Driver.java
deleted file mode 100644
index 52f9c3e..0000000
--- a/code2code.tests/src/utils/Driver.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package utils;
-
-import org.eclipse.swtbot.eclipse.finder.SWTEclipseBot;
-
-public class Driver {
-
- private static SWTEclipseBot bot;
-
- public static SWTEclipseBot bot() {
- if (bot == null) {
- bot = new SWTEclipseBot();
- }
- return bot;
- }
-
-}
diff --git a/code2code.updatesite/.project b/code2code.updatesite/.project
new file mode 100644
index 0000000..945a8c1
--- /dev/null
+++ b/code2code.updatesite/.project
@@ -0,0 +1,17 @@
+
+
+ code2code.updatesite
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteBuilder
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteNature
+
+
diff --git a/code2code.updatesite/artifacts.xml b/code2code.updatesite/artifacts.xml
new file mode 100644
index 0000000..3dc0622
--- /dev/null
+++ b/code2code.updatesite/artifacts.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code2code.updatesite/content.xml b/code2code.updatesite/content.xml
new file mode 100644
index 0000000..38a649b
--- /dev/null
+++ b/code2code.updatesite/content.xml
@@ -0,0 +1,353 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (org.eclipse.update.install.features=true)
+
+
+
+
+
+
+ Copyright (c) 2009 Samuel Rizzo
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ uninstallBundle(bundle:${artifact})
+
+
+ setStartLevel(startLevel:4);
+
+
+ installBundle(bundle:${artifact})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (org.eclipse.update.install.features=true)
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ Copyright (c) 2009 Samuel Rizzo
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ removeSourceBundle(bundle:${artifact})
+
+
+ addSourceBundle(bundle:${artifact})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.ui,org.eclipse.core.resources;bundle-version="3.4.0",org.eclipse.core.runtime;bundle-version="3.4.0",org.eclipse.ui.ide;bundle-version="3.4.0",org.eclipse.compare;bundle-version="3.4.0",org.eclipse.jface.text;bundle-version="3.4.0",org.eclipse.ui.console;bundle-version="3.3.0",org.eclipse.core.filesystem;bundle-version="1.2.0"
Manifest-Version: 1.0
Bundle-Version: 0.9.1.1
Export-Package: code2code.ui.compare,code2code.utils
Bundle-SymbolicName: code2code;singleton:=true
Bundle-Name: code2code Plug-in
Bundle-ClassPath: lib/freemarker.jar,.,lib/velocity-1.6-dep.jar,lib/groovy-all-1.5.7.jar
Bundle-Vendor: Samuel Rizzo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (org.eclipse.update.install.features=true)
+
+
+
+
+
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+
+
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+
+
+
+
+
+
diff --git a/code2code.updatesite/features/code2code_0.9.1.1.jar b/code2code.updatesite/features/code2code_0.9.1.1.jar
new file mode 100644
index 0000000..870cbda
Binary files /dev/null and b/code2code.updatesite/features/code2code_0.9.1.1.jar differ
diff --git a/code2code.updatesite/plugins/code2code_0.9.1.1.jar b/code2code.updatesite/plugins/code2code_0.9.1.1.jar
new file mode 100644
index 0000000..fcbbd5d
Binary files /dev/null and b/code2code.updatesite/plugins/code2code_0.9.1.1.jar differ
diff --git a/code2code.updatesite/site.xml b/code2code.updatesite/site.xml
new file mode 100644
index 0000000..d37fd76
--- /dev/null
+++ b/code2code.updatesite/site.xml
@@ -0,0 +1,10 @@
+
+
+
+ code2code update site
+
+
+
+
+
+
diff --git a/code2code/.gitignore b/code2code/.gitignore
deleted file mode 100644
index f07c66b..0000000
--- a/code2code/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.DS_Store
-.classpath
-.git
-.project
-.settings
-bin
\ No newline at end of file
diff --git a/code2code/META-INF/MANIFEST.MF b/code2code/META-INF/MANIFEST.MF
deleted file mode 100644
index ebc552a..0000000
--- a/code2code/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: code2code Plug-in
-Bundle-SymbolicName: code2code;singleton:=true
-Bundle-Version: 0.9.2
-Bundle-Vendor: Samuel Rizzo
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.resources;bundle-version="3.4.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.ui.ide;bundle-version="3.4.0",
- org.eclipse.compare;bundle-version="3.4.0",
- org.eclipse.jface.text;bundle-version="3.4.0",
- org.eclipse.ui.console;bundle-version="3.3.0",
- org.eclipse.core.filesystem;bundle-version="1.2.0"
-Bundle-ClassPath: lib/freemarker.jar,
- .,
- lib/velocity-1.6-dep.jar,
- lib/groovy-all-1.5.7.jar
-Export-Package:
- code2code.ui.compare,
- code2code.utils
diff --git a/code2code/build.properties b/code2code/build.properties
deleted file mode 100644
index cf57f0d..0000000
--- a/code2code/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- lib/freemarker.jar,\
- icons/,\
- lib/velocity-1.6-dep.jar,\
- lib/groovy-all-1.5.7.jar
diff --git a/code2code/doc/tasks b/code2code/doc/tasks
deleted file mode 100644
index 90a8af3..0000000
--- a/code2code/doc/tasks
+++ /dev/null
@@ -1,45 +0,0 @@
-full documentation on github first page
-
-show which engine is been used
-
-default injected params (selection.path, project.path, project.name ...) in context[] hash
-
-
-allow undo
-
-show status monitor on generation
-
-
-show New Wizard option only on relevant projects
-
-put context menu items on top
-
-
-
-
-
-make eclipse console file links on log
-
-
-
-
-extract initial params when creating generator from files
-
-lazily process templates
-
-
-allow overwrite existing files
-
-
-
-merge/compare existing files
-
-syntax highlight on preview
-
-
-search for generators on the user's home folder
-global user params in a properties file
-
-allow user to change template at generation
-
-allow generation of projects
\ No newline at end of file
diff --git a/code2code/lib/freemarker.jar b/code2code/lib/freemarker.jar
deleted file mode 100644
index 5b8192e..0000000
Binary files a/code2code/lib/freemarker.jar and /dev/null differ
diff --git a/code2code/lib/groovy-all-1.5.7.jar b/code2code/lib/groovy-all-1.5.7.jar
deleted file mode 100644
index b155ad8..0000000
Binary files a/code2code/lib/groovy-all-1.5.7.jar and /dev/null differ
diff --git a/code2code/lib/velocity-1.6-dep.jar b/code2code/lib/velocity-1.6-dep.jar
deleted file mode 100644
index e47b754..0000000
Binary files a/code2code/lib/velocity-1.6-dep.jar and /dev/null differ
diff --git a/code2code/plugin.xml b/code2code/plugin.xml
deleted file mode 100644
index 4c6d9ba..0000000
--- a/code2code/plugin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code2code/src/code2code/core/generator/DescriptionConfig.java b/code2code/src/code2code/core/generator/DescriptionConfig.java
deleted file mode 100644
index 43d93ce..0000000
--- a/code2code/src/code2code/core/generator/DescriptionConfig.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package code2code.core.generator;
-
-import org.eclipse.core.resources.IFile;
-
-import code2code.core.templateengine.TemplateEngineFactory;
-import code2code.utils.FileUtils;
-
-
-public class DescriptionConfig{
-
- private String description;
-
- public DescriptionConfig(Generator generator, GlobalParamsConfig globalParamsConfig) throws Exception {
-
- IFile file = TemplateEngineFactory.findKnownTemplate(generator.getGeneratorFolder(), "description");
- if(file == null){
- description = null;
- }else{
- description = TemplateEngineFactory.forFile(file).processString(generator, FileUtils.read(file.getContents()), globalParamsConfig.getProcessedParams());
- }
- }
-
-
- public String getDescription() {
- return description;
- }
-
-
-
-}
diff --git a/code2code/src/code2code/core/generator/Generator.java b/code2code/src/code2code/core/generator/Generator.java
deleted file mode 100644
index 91e3398..0000000
--- a/code2code/src/code2code/core/generator/Generator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package code2code.core.generator;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFolder;
-
-public class Generator {
-
- final private IFolder generatorFolder;
-
- final private DescriptionConfig descriptionConfig;
- final private GlobalParamsConfig globalParamsConfig;
- final private ParamsConfig paramsConfig;
- final private TemplatesConfig templatesConfig;
-
- final private List nestedGenerators;
-
- final private List templates;
-
- final private UserParams userParams;
-
-
- private Generator(IFolder folder) throws Exception{
- generatorFolder = folder;
-
- globalParamsConfig = new GlobalParamsConfig(this);
- descriptionConfig = new DescriptionConfig(this, globalParamsConfig);
- paramsConfig = new ParamsConfig(this);
- templatesConfig = new TemplatesConfig(this);
-
- nestedGenerators = templatesConfig.getNestedGenerators();
-
- templates = calculateGeneratorTemplates();
-
- userParams = new UserParams(this, globalParamsConfig, paramsConfig, nestedGenerators);
-
- }
-
- public static Generator fromFolder(IFolder folder) throws Exception {
- return new Generator(folder);
- }
-
-
- private List calculateGeneratorTemplates() throws Exception {
-
- List templates = templatesConfig.getTemplates();
-
- for (Generator nestedGenerator : nestedGenerators) {
- templates.addAll(nestedGenerator.calculateGeneratorTemplates());
- }
-
- return templates;
- }
-
-
- public List calculateChoosenTemplatesToGenerate() throws Exception {
-
- List templatesToGenerate = new ArrayList();
-
- for (Template template : templates) {
- if(template.isSelectedToGenerate()){
- templatesToGenerate.add(template);
- }
- }
-
- return templatesToGenerate;
- }
-
-
- public IFolder getGeneratorFolder() {
- return generatorFolder;
- }
-
-
- public String getName() {
- return generatorFolder.getFullPath().removeFirstSegments(2).removeFileExtension().toString();
- }
-
- public String getDescription() {
- return descriptionConfig.getDescription();
- }
-
-
- public Map calculateRequiredParams() {
- return userParams.calculateGeneratorRequiredParams();
- }
-
-
- public Map calculateContext() throws Exception {
- return userParams.translated();
- }
-
-
- public void setUserConfiguredParams(Map userConfiguredParams) {
- userParams.setUserConfiguredParams(userConfiguredParams);
- }
-
- public List getTemplates() {
- return templates;
- }
-
-
-}
diff --git a/code2code/src/code2code/core/generator/GeneratorFactory.java b/code2code/src/code2code/core/generator/GeneratorFactory.java
deleted file mode 100644
index 94396c1..0000000
--- a/code2code/src/code2code/core/generator/GeneratorFactory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package code2code.core.generator;
-
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.ui.PlatformUI;
-
-import code2code.core.templateengine.TemplateEngineFactory;
-import code2code.utils.EclipseGuiUtils;
-
-
-public class GeneratorFactory {
-
-
- public static Set fromProject(IProject project) throws Exception {
-
- final Set generators = new TreeSet(new Comparator(){
- public int compare(Generator o1, Generator o2) {
- return o1.getName().compareTo(o2.getName());
- }
- });
-
- IFolder defaultGeneratorsFolder = project.getFolder("generators");
-
- if(!defaultGeneratorsFolder.exists()){
- return new HashSet();
- }
-
-
- IResourceVisitor visitor = new IResourceVisitor(){
- public boolean visit(IResource resource) throws CoreException {
-
- if(resource.getType() == IResource.FOLDER){
-
- IFolder folder = (IFolder)resource;
-
- if(folder.getName().matches(".+\\.generator$") && TemplateEngineFactory.findKnownTemplate(folder, "templates") != null){
-
- try {
- generators.add(Generator.fromFolder(folder));
- } catch (Exception e) {
- EclipseGuiUtils.showErrorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), e);
- throw new RuntimeException(e);
- }
- }
- }
-
- return true;
-
- }
- };
-
- defaultGeneratorsFolder.accept(visitor);
-
- return generators;
- }
-
- public static boolean exists(IProject project, String name) {
- IFolder defaultGeneratorsFolder = project.getFolder(new Path("generators"));
- return defaultGeneratorsFolder.exists(new Path(name + ".generator"));
- }
-
-}
diff --git a/code2code/src/code2code/core/generator/GlobalParamsConfig.java b/code2code/src/code2code/core/generator/GlobalParamsConfig.java
deleted file mode 100644
index 5ac8554..0000000
--- a/code2code/src/code2code/core/generator/GlobalParamsConfig.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package code2code.core.generator;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-
-import code2code.core.templateengine.TemplateEngine;
-import code2code.core.templateengine.TemplateEngineFactory;
-import code2code.utils.FileUtils;
-
-
-class GlobalParamsConfig{
-
- private Map processedParams;
- private TemplateEngine templateEngine;
-
-
- public GlobalParamsConfig(Generator generator) throws Exception {
-
- IFile file = TemplateEngineFactory.findKnownTemplate(generator.getGeneratorFolder().getProject().getFolder("generators"), "params");
-
- if(file == null){
- processedParams = new LinkedHashMap();
- }else{
- templateEngine = TemplateEngineFactory.forFile(file);
- processedParams = templateEngine.processMap(generator, FileUtils.propertiesInputStreamAsMap(file.getContents()), new LinkedHashMap());
- }
-
- }
-
- public Map getProcessedParams() {
- return processedParams;
- }
-
-}
\ No newline at end of file
diff --git a/code2code/src/code2code/core/generator/ParamsConfig.java b/code2code/src/code2code/core/generator/ParamsConfig.java
deleted file mode 100644
index d72548e..0000000
--- a/code2code/src/code2code/core/generator/ParamsConfig.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package code2code.core.generator;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-
-import code2code.core.templateengine.TemplateEngine;
-import code2code.core.templateengine.TemplateEngineFactory;
-import code2code.utils.FileUtils;
-
-
-class ParamsConfig{
-
- private Map initialParams;
- private final Generator generator;
- private TemplateEngine templateEngine;
-
- public ParamsConfig(Generator generator) throws Exception {
- this.generator = generator;
-
- IFile file = TemplateEngineFactory.findKnownTemplate(generator.getGeneratorFolder(), "params");
-
- if (file == null) {
- initialParams = new LinkedHashMap();
- }else{
- this.templateEngine = TemplateEngineFactory.forFile(file);
- initialParams = FileUtils.propertiesInputStreamAsMap(file.getContents());
- }
-
- }
-
- public TemplateEngine getTemplateEngine() {
- return templateEngine;
- }
-
- public Map translated(Map context) throws Exception {
- return templateEngine.processMap(generator, initialParams, context);
- }
-
- public Map getParams() {
- return initialParams;
- }
-
-}
\ No newline at end of file
diff --git a/code2code/src/code2code/core/generator/Template.java b/code2code/src/code2code/core/generator/Template.java
deleted file mode 100644
index bcd8067..0000000
--- a/code2code/src/code2code/core/generator/Template.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package code2code.core.generator;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import code2code.core.templateengine.TemplateEngine;
-import code2code.core.templateengine.TemplateEngineFactory;
-
-
-
-public class Template {
-
- private boolean selectedToGenerate = true;
- private String userChoosenResult;
- private String userChoosenDestination;
- private final String templateName;
- private final TemplatesConfig templatesConfig;
- private final String initialDestination;
-
-
- public Template(TemplatesConfig templatesConfig, String templateName, String initialDestination) {
- this.templatesConfig = templatesConfig;
- this.templateName = templateName;
- this.initialDestination = initialDestination;
- }
-
-
- public String getTemplateName() {
- return templateName;
- }
-
-
- public InputStream calculateResult() throws Exception {
-
- if(userChoosenResult!=null){
- return new ByteArrayInputStream(userChoosenResult.getBytes());
- }
-
- TemplateEngine templateEngine = TemplateEngineFactory.forFileName(templateName);
-
- if(templateEngine != null){
- return new ByteArrayInputStream(templateEngine.processTemplate(templatesConfig.getGenerator(), templateName, templatesConfig.getGenerator().calculateContext()).getBytes());
- }else{
- return templatesConfig.getGenerator().getGeneratorFolder().getFile(templateName).getContents();
- }
-
- }
-
- public String calculateDestination() throws Exception {
- if(userChoosenDestination != null){
- return userChoosenDestination;
- }else{
- return templatesConfig.getTemplateEngine().processString(templatesConfig.getGenerator(), initialDestination, templatesConfig.getGenerator().calculateContext());
- }
- }
-
-
- public boolean isSelectedToGenerate() {
- return selectedToGenerate;
- }
-
- public void setSelectedToGenerate(boolean selectedToGenerate) {
- this.selectedToGenerate = selectedToGenerate;
- }
-
- public void setUserChoosenResult(String userChoosenResult) {
- this.userChoosenResult = userChoosenResult;
- }
-
- public void setUserChoosenDestination(String userChoosenDestination) {
- this.userChoosenDestination = userChoosenDestination;
- }
-
-}
diff --git a/code2code/src/code2code/core/generator/TemplatesConfig.java b/code2code/src/code2code/core/generator/TemplatesConfig.java
deleted file mode 100644
index 8ac69b8..0000000
--- a/code2code/src/code2code/core/generator/TemplatesConfig.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package code2code.core.generator;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map.Entry;
-
-import org.eclipse.core.resources.IFile;
-
-import code2code.core.templateengine.TemplateEngine;
-import code2code.core.templateengine.TemplateEngineFactory;
-import code2code.utils.FileUtils;
-
-
-class TemplatesConfig{
-
- private final IFile templatesFile;
- private final Generator generator;
-
- private final List templates = new ArrayList();
- private TemplateEngine templateEngine;
- private List nestedGenerators = new ArrayList();
-
- public TemplatesConfig(Generator generator) throws Exception {
-
- this.generator = generator;
-
- templatesFile = TemplateEngineFactory.findKnownTemplate(generator.getGeneratorFolder(), "templates");
- templateEngine = TemplateEngineFactory.forFile(templatesFile);
-
-
- for (Entry