You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/17 12:48:29 UTC

[10/50] [abbrv] incubator-taverna-workbench-common-activities git commit: taverna-beanshell-activity-ui/

taverna-beanshell-activity-ui/


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/commit/6b540057
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/tree/6b540057
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/diff/6b540057

Branch: refs/heads/master
Commit: 6b540057cdd47126bbe835a7c61348d548c48cd7
Parents: 8334579
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Feb 9 17:27:30 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Feb 9 17:27:30 2015 +0000

----------------------------------------------------------------------
 .gitignore                                      |  24 --
 .travis.yml                                     |   1 -
 README.md                                       |   5 -
 pom.xml                                         | 100 --------
 .../BeanshellActivityConfigurationAction.java   |  71 ------
 .../menu/AddBeanshellTemplateAction.java        | 113 ---------
 .../menu/AddBeanshellTemplateMenuAction.java    | 121 ----------
 .../menu/ConfigureBeanshellMenuAction.java      |  67 ------
 .../BeanshellActivityIcon.java                  |  58 -----
 .../BeanshellTemplateService.java               |  57 -----
 .../views/BeanshellActivityViewFactory.java     |  84 -------
 .../views/BeanshellConfigurationPanel.java      | 231 -------------------
 .../views/BeanshellContextualView.java          | 104 ---------
 ...rvicedescriptions.ServiceDescriptionProvider |   1 -
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 -
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 -
 ...ntextualviews.activity.ContextualViewFactory |   1 -
 .../beanshell-activity-ui-context-osgi.xml      |  29 ---
 .../spring/beanshell-activity-ui-context.xml    |  43 ----
 src/main/resources/beanshell.png                | Bin 1015 -> 0 bytes
 .../t2/activities/beanshell/views/keys.txt      |  90 --------
 taverna-beanshell-activity-ui/pom.xml           | 100 ++++++++
 .../BeanshellActivityConfigurationAction.java   |  71 ++++++
 .../menu/AddBeanshellTemplateAction.java        | 113 +++++++++
 .../menu/AddBeanshellTemplateMenuAction.java    | 121 ++++++++++
 .../menu/ConfigureBeanshellMenuAction.java      |  67 ++++++
 .../BeanshellActivityIcon.java                  |  58 +++++
 .../BeanshellTemplateService.java               |  57 +++++
 .../views/BeanshellActivityViewFactory.java     |  84 +++++++
 .../views/BeanshellConfigurationPanel.java      | 231 +++++++++++++++++++
 .../views/BeanshellContextualView.java          | 104 +++++++++
 ...rvicedescriptions.ServiceDescriptionProvider |   1 +
 .../net.sf.taverna.t2.ui.menu.MenuComponent     |   3 +
 ...a.t2.workbench.activityicons.ActivityIconSPI |   1 +
 ...ntextualviews.activity.ContextualViewFactory |   1 +
 .../beanshell-activity-ui-context-osgi.xml      |  29 +++
 .../spring/beanshell-activity-ui-context.xml    |  43 ++++
 .../src/main/resources/beanshell.png            | Bin 0 -> 1015 bytes
 .../t2/activities/beanshell/views/keys.txt      |  90 ++++++++
 39 files changed, 1174 insertions(+), 1204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ebe0e5b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# ignore project files #
-.classpath
-.project
-.settings/
-catalog-v001.xml
-
-# ignore target files #
-target/
-bin/
-build/
-dist/
-apidoc/
-*.swp
-
-# ignore svn files if there
-.svn
-
-# ignore log files #
-*.log
-/logs/*
-*/logs/*
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
deleted file mode 100644
index 1685758..0000000
--- a/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Taverna Workflow system Beanshell Activity: User Interface part for use in the Taverna Workbench.
-
-Extends https://github.com/taverna/taverna-beanshell-activity
-
-This code was previously hosted at http://taverna.googlecode.com/svn/taverna/ui/net.sf.taverna.t2.ui-activities/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 0afe9ef..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>net.sf.taverna</groupId>
-                <artifactId>taverna-parent</artifactId>
-                <version>3.0.1-SNAPSHOT</version>
-	</parent>
-	<groupId>net.sf.taverna.t2.ui-activities</groupId>
-	<artifactId>beanshell-activity-ui</artifactId>
-        <version>2.0-SNAPSHOT</version>
-	<packaging>bundle</packaging>
-	<name>Taverna 2 Beanshell Activity UI</name>
-	<dependencies>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-icons-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-palette-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>activity-tools</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>edits-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>file-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-api</groupId>
-			<artifactId>menu-api</artifactId>
-			<version>${t2.ui.api.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.ui-components</groupId>
-			<artifactId>workflow-view</artifactId>
-			<version>${t2.ui.components.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>net.sf.taverna.t2.lang</groupId>
-			<artifactId>ui</artifactId>
-			<version>${t2.lang.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.configuration</groupId>
-			<artifactId>taverna-app-configuration-api</artifactId>
-			<version>${taverna.configuration.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.commons</groupId>
-			<artifactId>taverna-services-api</artifactId>
-			<version>0.1.0-SNAPSHOT</version>
-		</dependency>
-		<dependency>
-			<groupId>uk.org.taverna.scufl2</groupId>
-			<artifactId>scufl2-api</artifactId>
-			<version>${scufl2.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-                        <version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<repositories>
-		<repository>
-			<releases />
-			<snapshots>
-				<enabled>false</enabled>
-			</snapshots>
-			<id>mygrid-repository</id>
-			<name>myGrid Repository</name>
-			<url>http://www.mygrid.org.uk/maven/repository
-			</url>
-		</repository>
-		<repository>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots />
-			<id>mygrid-snapshot-repository</id>
-			<name>myGrid Snapshot Repository</name>
-			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
-		</repository>
-	</repositories>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
deleted file mode 100644
index fe6159c..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.actions;
-
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-
-import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-@SuppressWarnings("serial")
-public class BeanshellActivityConfigurationAction extends ActivityConfigurationAction {
-
-	public static final String EDIT_BEANSHELL_SCRIPT = "Edit beanshell script";
-	private final EditManager editManager;
-	private final FileManager fileManager;
-	private final ApplicationConfiguration applicationConfiguration;
-
-	public BeanshellActivityConfigurationAction(Activity activity, Frame owner,
-			EditManager editManager, FileManager fileManager,
-			ActivityIconManager activityIconManager,
-			ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, activityIconManager, serviceDescriptionRegistry);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.applicationConfiguration = applicationConfiguration;
-		putValue(NAME, EDIT_BEANSHELL_SCRIPT);
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
-		if (currentDialog != null) {
-			currentDialog.toFront();
-			return;
-		}
-		final BeanshellConfigurationPanel beanshellConfigView = new BeanshellConfigurationPanel(
-				getActivity(), applicationConfiguration);
-		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
-				beanshellConfigView, editManager);
-
-		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
deleted file mode 100644
index 97eab18..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.awt.event.ActionEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.scufl2.api.core.Workflow;
-
-/**
- * An action to add a beanshell activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddBeanshellTemplateAction extends AbstractContextualMenuAction {
-
-	private static final String ADD_BEANSHELL = "Beanshell";
-
-	private static final URI insertSection = URI
-			.create("http://taverna.sf.net/2009/contextMenu/insert");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public AddBeanshellTemplateAction() {
-		super(insertSection, 300);
-	}
-
-	@Override
-	public boolean isEnabled() {
-		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
-	}
-
-	@Override
-	protected Action createAction() {
-
-		return new AddBeanshellAction();
-	}
-
-	protected class AddBeanshellAction extends AbstractAction {
-		AddBeanshellAction() {
-			super(ADD_BEANSHELL, activityIconManager
-					.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(serviceDescriptionRegistry
-					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
-					editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
deleted file mode 100644
index 7933000..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007-2009 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.net.URI;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.KeyStroke;
-
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
-import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
-import net.sf.taverna.t2.ui.menu.MenuManager;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.selection.SelectionManager;
-import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
-import uk.org.taverna.commons.services.ServiceRegistry;
-
-/**
- * An action to add a beanshell activity + a wrapping processor to the workflow.
- *
- * @author Alex Nenadic
- * @author alanrw
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class AddBeanshellTemplateMenuAction extends AbstractMenuAction {
-
-	private static final String ADD_BEANSHELL = "Beanshell";
-
-	private static final URI INSERT = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
-
-	private static final URI ADD_BEANSHELL_URI = URI
-			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddBeanshell");
-
-	private EditManager editManager;
-	private MenuManager menuManager;
-	private SelectionManager selectionManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ServiceRegistry serviceRegistry;
-
-	public AddBeanshellTemplateMenuAction() {
-		super(INSERT, 300, ADD_BEANSHELL_URI);
-	}
-
-	@Override
-	protected Action createAction() {
-		return new AddBeanshellMenuAction();
-	}
-
-	protected class AddBeanshellMenuAction extends AbstractAction implements DesignOnlyAction {
-		AddBeanshellMenuAction() {
-			super();
-			putValue(SMALL_ICON,
-					activityIconManager.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
-			putValue(NAME, ADD_BEANSHELL);
-			putValue(SHORT_DESCRIPTION, "Beanshell service");
-			putValue(
-					Action.ACCELERATOR_KEY,
-					KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.SHIFT_DOWN_MASK
-							| InputEvent.ALT_DOWN_MASK));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-			WorkflowView.importServiceDescription(serviceDescriptionRegistry
-					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
-					editManager, menuManager, selectionManager, serviceRegistry);
-		}
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setMenuManager(MenuManager menuManager) {
-		this.menuManager = menuManager;
-	}
-
-	public void setSelectionManager(SelectionManager selectionManager) {
-		this.selectionManager = selectionManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
-		this.serviceRegistry = serviceRegistry;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
deleted file mode 100644
index 64ef0c8..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package net.sf.taverna.t2.activities.beanshell.menu;
-
-import java.net.URI;
-
-import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
-import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-
-import javax.swing.Action;
-
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class ConfigureBeanshellMenuAction extends AbstractConfigureActivityMenuAction {
-
-	public static final URI LOCALWORKER_ACTIVITY = URI
-			.create("http://ns.taverna.org.uk/2010/activity/localworker");
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private ApplicationConfiguration applicationConfiguration;
-
-	public ConfigureBeanshellMenuAction() {
-		super(BeanshellTemplateService.ACTIVITY_TYPE);
-	}
-
-	@Override
-	protected Action createAction() {
-		Activity a = findActivity();
-		Action result = null;
-		if (!(a.getType().equals(LOCALWORKER_ACTIVITY))) {
-			result = new BeanshellActivityConfigurationAction(findActivity(), getParentFrame(),
-					editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
-					applicationConfiguration);
-			result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
-			addMenuDots(result);
-		}
-		return result;
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
deleted file mode 100644
index 055aa81..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
-
-/**
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-public class BeanshellActivityIcon implements ActivityIconSPI {
-
-	private static Icon icon = null;
-
-	@Override
-	public int canProvideIconScore(URI activityType) {
-		if (BeanshellTemplateService.ACTIVITY_TYPE.equals(activityType))
-			return DEFAULT_ICON + 1;
-		else
-			return NO_ICON;
-	}
-
-	@Override
-	public Icon getIcon(URI activityType) {
-		return getBeanshellIcon();
-	}
-
-	public static Icon getBeanshellIcon() {
-		if (icon == null) {
-			icon = new ImageIcon(BeanshellActivityIcon.class.getResource("/beanshell.png"));
-		}
-		return icon;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
deleted file mode 100644
index c2cb38f..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
-
-import java.net.URI;
-
-import javax.swing.Icon;
-
-import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
-import uk.org.taverna.scufl2.api.configurations.Configuration;
-
-public class BeanshellTemplateService extends AbstractTemplateService {
-
-	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/beanshell");
-
-	private static final String BEANSHELL = "Beanshell";
-
-	private static final URI providerId = URI
-	.create("http://taverna.sf.net/2010/service-provider/beanshell");
-
-	public String getName() {
-		return BEANSHELL;
-	}
-
-	@Override
-	public URI getActivityType() {
-		return ACTIVITY_TYPE;
-	}
-
-	@Override
-	public Configuration getActivityConfiguration() {
-		Configuration configuration = new Configuration();
-		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
-		configuration.getJsonAsObjectNode().put("script", "");
-		configuration.getJsonAsObjectNode().put("classLoaderSharing", "workflow");
-		return configuration;
-	}
-
-	@Override
-	public Icon getIcon() {
-		return BeanshellActivityIcon.getBeanshellIcon();
-	}
-
-	@Override
-	public String getDescription() {
-		return "A service that allows Beanshell scripts, with dependencies on libraries";
-	}
-
-	public static ServiceDescription getServiceDescription() {
-		BeanshellTemplateService bts = new BeanshellTemplateService();
-		return bts.templateService;
-	}
-
-	public String getId() {
-		return providerId.toString();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
deleted file mode 100644
index 5c83730..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellActivityViewFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.ContextualView;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-
-public class BeanshellActivityViewFactory implements ContextualViewFactory<Activity> {
-
-	private static final URI ACTIVITY_TYPE = URI
-			.create("http://ns.taverna.org.uk/2010/activity/beanshell");
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private ActivityIconManager activityIconManager;
-	private ColourManager colourManager;
-	private ServiceDescriptionRegistry serviceDescriptionRegistry;
-
-	private ApplicationConfiguration applicationConfiguration;
-
-	public boolean canHandle(Object object) {
-		return object instanceof Activity && ((Activity) object).getType().equals(ACTIVITY_TYPE);
-	}
-
-	public List<ContextualView> getViews(Activity activity) {
-		return Arrays.asList(new ContextualView[] { new BeanshellContextualView(activity,
-				editManager, fileManager, activityIconManager, colourManager,
-				serviceDescriptionRegistry, applicationConfiguration) });
-	}
-
-	public void setEditManager(EditManager editManager) {
-		this.editManager = editManager;
-	}
-
-	public void setFileManager(FileManager fileManager) {
-		this.fileManager = fileManager;
-	}
-
-	public void setActivityIconManager(ActivityIconManager activityIconManager) {
-		this.activityIconManager = activityIconManager;
-	}
-
-	public void setColourManager(ColourManager colourManager) {
-		this.colourManager = colourManager;
-	}
-
-	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-	}
-
-	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
-		this.applicationConfiguration = applicationConfiguration;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
deleted file mode 100644
index 8489d7a..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellConfigurationPanel.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2012 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSpinner;
-import javax.swing.SpinnerNumberModel;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-
-import net.sf.taverna.t2.lang.ui.EditorKeySetUtil;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityPortConfiguration;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.DependencyConfigurationPanel;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ListConfigurationComponent;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.MultiPageActivityConfigurationPanel;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ScriptConfigurationComponent;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextField;
-import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ValidatingTextGroup;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-
-/**
- * Component for configuring a Beanshell activity.
- *
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class BeanshellConfigurationPanel extends MultiPageActivityConfigurationPanel {
-
-	private ScriptConfigurationComponent scriptConfigurationComponent;
-	private ValidatingTextGroup inputTextGroup, outputTextGroup;
-	private DependencyConfigurationPanel dependencyConfigurationPanel;
-	private File libDir;
-
-	public BeanshellConfigurationPanel(Activity activity,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity);
-		libDir = new File(applicationConfiguration.getApplicationHomeDir(), "lib");
-		if (!libDir.exists()) {
-			libDir.mkdir();
-		}
-		initialise();
-	}
-
-	@Override
-	protected void initialise() {
-		super.initialise();
-		removeAllPages();
-		addPage("Script", createScriptEditPanel());
-		addPage("Input ports", createInputPanel());
-		addPage("Output ports", createOutputPanel());
-		addPage("Dependencies", createDependenciesPanel());
-		setPreferredSize(new Dimension(600, 500));
-	}
-
-	@Override
-	public void noteConfiguration() {
-		setProperty("script", scriptConfigurationComponent.getScript());
-		setProperty("classLoaderSharing", dependencyConfigurationPanel.getClassLoaderSharing());
-		List<String> localDependencies = dependencyConfigurationPanel.getLocalDependencies();
-		if (localDependencies == null || localDependencies.isEmpty()) {
-			getJson().remove("localDependency");
-		} else {
-			ArrayNode localDependenciesArray = getJson().arrayNode();
-			for (String localDependency : localDependencies) {
-				localDependenciesArray.add(localDependency);
-			}
-			getJson().put("localDependency", localDependenciesArray);
-		}
-	}
-
-	@Override
-	public boolean checkValues() {
-		return true;
-	}
-
-	private Component createScriptEditPanel() {
-		Set<String> keywords = EditorKeySetUtil.loadKeySet(getClass().getResourceAsStream(
-				"keys.txt"));
-		Set<String> ports = new HashSet<>();
-		for (InputActivityPort ip : getActivity().getInputPorts()) {
-			ports.add(ip.getName());
-		}
-		for (OutputActivityPort op : getActivity().getOutputPorts()) {
-			ports.add(op.getName());
-		}
-		scriptConfigurationComponent = new ScriptConfigurationComponent(getProperty("script"),
-				keywords, ports, "Beanshell", ".bsh");
-		return scriptConfigurationComponent;
-	}
-
-	private Component createInputPanel() {
-		inputTextGroup = new ValidatingTextGroup();
-		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
-				"Input Port", getInputPorts()) {
-			@Override
-			protected Component createItemComponent(ActivityPortConfiguration port) {
-				return new PortComponent(port, inputTextGroup);
-			}
-
-			@Override
-			protected ActivityPortConfiguration createDefaultItem() {
-				return new ActivityPortConfiguration("in", 0);
-			}
-		};
-		return inputPanel;
-	}
-
-	private Component createOutputPanel() {
-		outputTextGroup = new ValidatingTextGroup();
-		ListConfigurationComponent<ActivityPortConfiguration> inputPanel = new ListConfigurationComponent<ActivityPortConfiguration>(
-				"Output Port", getOutputPorts()) {
-			@Override
-			protected Component createItemComponent(ActivityPortConfiguration port) {
-				return new PortComponent(port, outputTextGroup);
-			}
-
-			@Override
-			protected ActivityPortConfiguration createDefaultItem() {
-				return new ActivityPortConfiguration("out", 0);
-			}
-		};
-		return inputPanel;
-	}
-
-	private Component createDependenciesPanel() {
-		String classLoaderSharing = getProperty("classLoaderSharing");
-		List<String> localDependencies = new ArrayList<>();
-		if (getJson().has("localDependency")) {
-			for (JsonNode localDependency : getJson().get("localDependency")) {
-				localDependencies.add(localDependency.textValue());
-			}
-		}
-		dependencyConfigurationPanel = new DependencyConfigurationPanel(classLoaderSharing,
-				localDependencies, libDir);
-		return dependencyConfigurationPanel;
-	}
-
-	class PortComponent extends JPanel {
-
-		private ValidatingTextField nameField;
-		private SpinnerNumberModel depthModel;
-		private final ValidatingTextGroup validatingTextGroup;
-
-		public PortComponent(final ActivityPortConfiguration portConfiguration,
-				ValidatingTextGroup validatingTextGroup) {
-			this.validatingTextGroup = validatingTextGroup;
-
-			nameField = new ValidatingTextField(portConfiguration.getName());
-			nameField.getDocument().addDocumentListener(new DocumentListener() {
-				@Override
-				public void removeUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-
-				@Override
-				public void insertUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-
-				@Override
-				public void changedUpdate(DocumentEvent e) {
-					portConfiguration.setName(nameField.getText());
-				}
-			});
-			validatingTextGroup.addValidTextComponent(nameField);
-			depthModel = new SpinnerNumberModel(portConfiguration.getDepth(), 0, 100, 1);
-			depthModel.addChangeListener(new ChangeListener() {
-				@Override
-				public void stateChanged(ChangeEvent e) {
-					portConfiguration.setDepth(depthModel.getNumber().intValue());
-				}
-			});
-
-			setLayout(new GridBagLayout());
-			GridBagConstraints c = new GridBagConstraints();
-			c.anchor = GridBagConstraints.WEST;
-			add(new JLabel("Name"), c);
-			c.fill = GridBagConstraints.HORIZONTAL;
-			c.weightx = 1;
-			add(nameField, c);
-			c.fill = GridBagConstraints.NONE;
-			c.weightx = 0;
-			add(new JLabel("Depth"), c);
-			add(new JSpinner(depthModel), c);
-
-		}
-
-		public void removeNotify() {
-			validatingTextGroup.removeTextComponent(nameField);
-		}
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
----------------------------------------------------------------------
diff --git a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java b/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
deleted file mode 100644
index e738e38..0000000
--- a/src/main/java/net/sf/taverna/t2/activities/beanshell/views/BeanshellContextualView.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.activities.beanshell.views;
-
-import java.awt.Frame;
-
-import javax.swing.Action;
-
-import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
-import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
-import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
-import net.sf.taverna.t2.workbench.configuration.colour.ColourManager;
-import net.sf.taverna.t2.workbench.edits.EditManager;
-import net.sf.taverna.t2.workbench.file.FileManager;
-import net.sf.taverna.t2.workbench.ui.actions.activity.HTMLBasedActivityContextualView;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-import uk.org.taverna.scufl2.api.activity.Activity;
-import uk.org.taverna.scufl2.api.port.InputActivityPort;
-import uk.org.taverna.scufl2.api.port.OutputActivityPort;
-
-/**
- * A simple non editable HTML table view over a {@link BeanshellActivity}.
- * Clicking on the configure button shows the editable {@link BeanshellConfigView}
- *
- * @author Ian Dunlop
- * @author Stuart Owen
- * @author David Withers
- */
-@SuppressWarnings("serial")
-public class BeanshellContextualView extends HTMLBasedActivityContextualView {
-
-	private EditManager editManager;
-	private FileManager fileManager;
-	private final ActivityIconManager activityIconManager;
-	private final ServiceDescriptionRegistry serviceDescriptionRegistry;
-	private final ApplicationConfiguration applicationConfiguration;
-
-	public BeanshellContextualView(Activity activity, EditManager editManager,
-			FileManager fileManager, ActivityIconManager activityIconManager,
-			ColourManager colourManager, ServiceDescriptionRegistry serviceDescriptionRegistry,
-			ApplicationConfiguration applicationConfiguration) {
-		super(activity, colourManager);
-		this.editManager = editManager;
-		this.fileManager = fileManager;
-		this.activityIconManager = activityIconManager;
-		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
-		this.applicationConfiguration = applicationConfiguration;
-		init();
-	}
-
-	private void init() {
-	}
-
-	@Override
-	protected String getRawTableRowsHtml() {
-		StringBuilder html = new StringBuilder();
-		html.append("<tr><th>Input Port Name</th><th>Depth</th></tr>");
-		for (InputActivityPort inputActivityPort : getActivity().getInputPorts()) {
-			html.append("<tr><td>" + inputActivityPort.getName() + "</td><td>");
-			html.append(inputActivityPort.getDepth() + "</td></tr>");
-		}
-		html.append("<tr><th>Output Port Name</th><th>Depth</th></tr>");
-		for (OutputActivityPort outputActivityPort : getActivity().getOutputPorts()) {
-			html.append("<tr><td>" + outputActivityPort.getName() + "</td><td>");
-			html.append(outputActivityPort.getDepth() + "</td></tr>");
-		}
-		return html.toString();
-	}
-
-	@Override
-	public String getViewTitle() {
-		return "Beanshell service";
-	}
-
-	@Override
-	public Action getConfigureAction(Frame owner) {
-		return new BeanshellActivityConfigurationAction(getActivity(), owner, editManager,
-				fileManager, activityIconManager, serviceDescriptionRegistry, applicationConfiguration);
-	}
-
-	@Override
-	public int getPreferredPosition() {
-		return 100;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider b/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
deleted file mode 100644
index a77db8d..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent b/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
deleted file mode 100644
index a3c71cd..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.ui.menu.MenuComponent
+++ /dev/null
@@ -1,3 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction
-net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction
-net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
deleted file mode 100644
index a268bf1..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory b/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
deleted file mode 100644
index dcdf598..0000000
--- a/src/main/resources/META-INF/services/net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory
+++ /dev/null
@@ -1 +0,0 @@
-net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml b/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
deleted file mode 100644
index 58a3e18..0000000
--- a/src/main/resources/META-INF/spring/beanshell-activity-ui-context-osgi.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:beans="http://www.springframework.org/schema/beans"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd
-                      http://www.springframework.org/schema/osgi
-                      http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-	<service ref="BeanshellActivityIcon" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI" />
-
-	<service ref="BeanshellTemplateService" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionProvider" />
-
-	<service ref="AddBeanshellTemplateAction" auto-export="interfaces" />
-	<service ref="AddBeanshellTemplateMenuAction" auto-export="interfaces" />
-	<service ref="ConfigureBeanshellMenuAction" auto-export="interfaces" />
-
-	<service ref="BeanshellActivityViewFactory" interface="net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
-
-	<reference id="editManager" interface="net.sf.taverna.t2.workbench.edits.EditManager" />
-	<reference id="fileManager" interface="net.sf.taverna.t2.workbench.file.FileManager" />
-	<reference id="menuManager" interface="net.sf.taverna.t2.ui.menu.MenuManager" />
-	<reference id="selectionManager" interface="net.sf.taverna.t2.workbench.selection.SelectionManager" />
-	<reference id="activityIconManager" interface="net.sf.taverna.t2.workbench.activityicons.ActivityIconManager" />
-	<reference id="colourManager" interface="net.sf.taverna.t2.workbench.configuration.colour.ColourManager" />
-	<reference id="serviceDescriptionRegistry" interface="net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry" />
-	<reference id="serviceRegistry" interface="uk.org.taverna.commons.services.ServiceRegistry" />
-	<reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml b/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
deleted file mode 100644
index fc6d5d4..0000000
--- a/src/main/resources/META-INF/spring/beanshell-activity-ui-context.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-	<bean id="BeanshellActivityIcon" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellActivityIcon" />
-
-	<bean id="BeanshellTemplateService" class="net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService" />
-
-	<bean id="AddBeanshellTemplateAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="AddBeanshellTemplateMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.AddBeanshellTemplateMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="menuManager" ref="menuManager" />
-			<property name="selectionManager" ref="selectionManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="serviceRegistry" ref="serviceRegistry" />
-	</bean>
-	<bean id="ConfigureBeanshellMenuAction" class="net.sf.taverna.t2.activities.beanshell.menu.ConfigureBeanshellMenuAction">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-	<bean id="BeanshellActivityViewFactory" class="net.sf.taverna.t2.activities.beanshell.views.BeanshellActivityViewFactory">
-			<property name="editManager" ref="editManager" />
-			<property name="fileManager" ref="fileManager" />
-			<property name="activityIconManager" ref="activityIconManager" />
-			<property name="colourManager" ref="colourManager" />
-			<property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" />
-			<property name="applicationConfiguration" ref="applicationConfiguration" />
-	</bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/beanshell.png
----------------------------------------------------------------------
diff --git a/src/main/resources/beanshell.png b/src/main/resources/beanshell.png
deleted file mode 100644
index 8f6edfb..0000000
Binary files a/src/main/resources/beanshell.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt b/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
deleted file mode 100644
index 15cb51b..0000000
--- a/src/main/resources/net/sf/taverna/t2/activities/beanshell/views/keys.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-++
---
-+
--
-~
-!
-*
-/
-%
-<<
->>
->>>
-<
->
-<=
->=
-==
-!=
-&
-^
-|
-&&
-||
-:
-=
-+=
--=
-*=
-/=
-%=
-&=
-^=
-|=
-<<=
->>=
->>>=
-=
-abstract
-assert
-boolean
-break
-byte
-case
-catch
-char
-class
-const
-continue
-default
-do
-double
-else
-enum
-extends
-false
-final
-finally
-float
-for
-goto
-if
-implements
-import
-instanceof
-int
-interface
-long
-native
-new
-null
-package
-private
-protected
-public
-return
-short
-static
-strictfp
-super
-switch
-synchronized
-this
-throw
-throws
-transient
-true
-try
-void
-volatile
-while 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/pom.xml b/taverna-beanshell-activity-ui/pom.xml
new file mode 100644
index 0000000..0afe9ef
--- /dev/null
+++ b/taverna-beanshell-activity-ui/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.sf.taverna</groupId>
+                <artifactId>taverna-parent</artifactId>
+                <version>3.0.1-SNAPSHOT</version>
+	</parent>
+	<groupId>net.sf.taverna.t2.ui-activities</groupId>
+	<artifactId>beanshell-activity-ui</artifactId>
+        <version>2.0-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<name>Taverna 2 Beanshell Activity UI</name>
+	<dependencies>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-icons-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-palette-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>activity-tools</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>edits-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>file-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-api</groupId>
+			<artifactId>menu-api</artifactId>
+			<version>${t2.ui.api.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.ui-components</groupId>
+			<artifactId>workflow-view</artifactId>
+			<version>${t2.ui.components.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.taverna.t2.lang</groupId>
+			<artifactId>ui</artifactId>
+			<version>${t2.lang.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.configuration</groupId>
+			<artifactId>taverna-app-configuration-api</artifactId>
+			<version>${taverna.configuration.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.commons</groupId>
+			<artifactId>taverna-services-api</artifactId>
+			<version>0.1.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.scufl2</groupId>
+			<artifactId>scufl2-api</artifactId>
+			<version>${scufl2.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+                        <version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<releases />
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+			<id>mygrid-repository</id>
+			<name>myGrid Repository</name>
+			<url>http://www.mygrid.org.uk/maven/repository
+			</url>
+		</repository>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots />
+			<id>mygrid-snapshot-repository</id>
+			<name>myGrid Snapshot Repository</name>
+			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+		</repository>
+	</repositories>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
new file mode 100644
index 0000000..fe6159c
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/actions/BeanshellActivityConfigurationAction.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.actions;
+
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+
+import net.sf.taverna.t2.activities.beanshell.views.BeanshellConfigurationPanel;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+import net.sf.taverna.t2.workbench.ui.actions.activity.ActivityConfigurationAction;
+import net.sf.taverna.t2.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+@SuppressWarnings("serial")
+public class BeanshellActivityConfigurationAction extends ActivityConfigurationAction {
+
+	public static final String EDIT_BEANSHELL_SCRIPT = "Edit beanshell script";
+	private final EditManager editManager;
+	private final FileManager fileManager;
+	private final ApplicationConfiguration applicationConfiguration;
+
+	public BeanshellActivityConfigurationAction(Activity activity, Frame owner,
+			EditManager editManager, FileManager fileManager,
+			ActivityIconManager activityIconManager,
+			ServiceDescriptionRegistry serviceDescriptionRegistry,
+			ApplicationConfiguration applicationConfiguration) {
+		super(activity, activityIconManager, serviceDescriptionRegistry);
+		this.editManager = editManager;
+		this.fileManager = fileManager;
+		this.applicationConfiguration = applicationConfiguration;
+		putValue(NAME, EDIT_BEANSHELL_SCRIPT);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity());
+		if (currentDialog != null) {
+			currentDialog.toFront();
+			return;
+		}
+		final BeanshellConfigurationPanel beanshellConfigView = new BeanshellConfigurationPanel(
+				getActivity(), applicationConfiguration);
+		final ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(),
+				beanshellConfigView, editManager);
+
+		ActivityConfigurationAction.setDialog(getActivity(), dialog, fileManager);
+
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
new file mode 100644
index 0000000..97eab18
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateAction.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.awt.event.ActionEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractContextualMenuAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+import uk.org.taverna.scufl2.api.core.Workflow;
+
+/**
+ * An action to add a beanshell activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddBeanshellTemplateAction extends AbstractContextualMenuAction {
+
+	private static final String ADD_BEANSHELL = "Beanshell";
+
+	private static final URI insertSection = URI
+			.create("http://taverna.sf.net/2009/contextMenu/insert");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public AddBeanshellTemplateAction() {
+		super(insertSection, 300);
+	}
+
+	@Override
+	public boolean isEnabled() {
+		return super.isEnabled() && getContextualSelection().getSelection() instanceof Workflow;
+	}
+
+	@Override
+	protected Action createAction() {
+
+		return new AddBeanshellAction();
+	}
+
+	protected class AddBeanshellAction extends AbstractAction {
+		AddBeanshellAction() {
+			super(ADD_BEANSHELL, activityIconManager
+					.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(serviceDescriptionRegistry
+					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
+					editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
new file mode 100644
index 0000000..7933000
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/AddBeanshellTemplateMenuAction.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (C) 2007-2009 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.net.URI;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.KeyStroke;
+
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.ui.menu.AbstractMenuAction;
+import net.sf.taverna.t2.ui.menu.DesignOnlyAction;
+import net.sf.taverna.t2.ui.menu.MenuManager;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.selection.SelectionManager;
+import net.sf.taverna.t2.workbench.ui.workflowview.WorkflowView;
+import uk.org.taverna.commons.services.ServiceRegistry;
+
+/**
+ * An action to add a beanshell activity + a wrapping processor to the workflow.
+ *
+ * @author Alex Nenadic
+ * @author alanrw
+ * @author David Withers
+ */
+@SuppressWarnings("serial")
+public class AddBeanshellTemplateMenuAction extends AbstractMenuAction {
+
+	private static final String ADD_BEANSHELL = "Beanshell";
+
+	private static final URI INSERT = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#insert");
+
+	private static final URI ADD_BEANSHELL_URI = URI
+			.create("http://taverna.sf.net/2008/t2workbench/menu#graphMenuAddBeanshell");
+
+	private EditManager editManager;
+	private MenuManager menuManager;
+	private SelectionManager selectionManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ServiceRegistry serviceRegistry;
+
+	public AddBeanshellTemplateMenuAction() {
+		super(INSERT, 300, ADD_BEANSHELL_URI);
+	}
+
+	@Override
+	protected Action createAction() {
+		return new AddBeanshellMenuAction();
+	}
+
+	protected class AddBeanshellMenuAction extends AbstractAction implements DesignOnlyAction {
+		AddBeanshellMenuAction() {
+			super();
+			putValue(SMALL_ICON,
+					activityIconManager.iconForActivity(BeanshellTemplateService.ACTIVITY_TYPE));
+			putValue(NAME, ADD_BEANSHELL);
+			putValue(SHORT_DESCRIPTION, "Beanshell service");
+			putValue(
+					Action.ACCELERATOR_KEY,
+					KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.SHIFT_DOWN_MASK
+							| InputEvent.ALT_DOWN_MASK));
+		}
+
+		public void actionPerformed(ActionEvent e) {
+			WorkflowView.importServiceDescription(serviceDescriptionRegistry
+					.getServiceDescription(BeanshellTemplateService.ACTIVITY_TYPE), false,
+					editManager, menuManager, selectionManager, serviceRegistry);
+		}
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setMenuManager(MenuManager menuManager) {
+		this.menuManager = menuManager;
+	}
+
+	public void setSelectionManager(SelectionManager selectionManager) {
+		this.selectionManager = selectionManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
+		this.serviceRegistry = serviceRegistry;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
new file mode 100644
index 0000000..64ef0c8
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/menu/ConfigureBeanshellMenuAction.java
@@ -0,0 +1,67 @@
+package net.sf.taverna.t2.activities.beanshell.menu;
+
+import java.net.URI;
+
+import net.sf.taverna.t2.activities.beanshell.actions.BeanshellActivityConfigurationAction;
+import net.sf.taverna.t2.activities.beanshell.servicedescriptions.BeanshellTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescriptionRegistry;
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconManager;
+import net.sf.taverna.t2.workbench.activitytools.AbstractConfigureActivityMenuAction;
+import net.sf.taverna.t2.workbench.edits.EditManager;
+import net.sf.taverna.t2.workbench.file.FileManager;
+
+import javax.swing.Action;
+
+import uk.org.taverna.configuration.app.ApplicationConfiguration;
+import uk.org.taverna.scufl2.api.activity.Activity;
+
+public class ConfigureBeanshellMenuAction extends AbstractConfigureActivityMenuAction {
+
+	public static final URI LOCALWORKER_ACTIVITY = URI
+			.create("http://ns.taverna.org.uk/2010/activity/localworker");
+
+	private EditManager editManager;
+	private FileManager fileManager;
+	private ActivityIconManager activityIconManager;
+	private ServiceDescriptionRegistry serviceDescriptionRegistry;
+	private ApplicationConfiguration applicationConfiguration;
+
+	public ConfigureBeanshellMenuAction() {
+		super(BeanshellTemplateService.ACTIVITY_TYPE);
+	}
+
+	@Override
+	protected Action createAction() {
+		Activity a = findActivity();
+		Action result = null;
+		if (!(a.getType().equals(LOCALWORKER_ACTIVITY))) {
+			result = new BeanshellActivityConfigurationAction(findActivity(), getParentFrame(),
+					editManager, fileManager, activityIconManager, serviceDescriptionRegistry,
+					applicationConfiguration);
+			result.putValue(Action.NAME, BeanshellActivityConfigurationAction.EDIT_BEANSHELL_SCRIPT);
+			addMenuDots(result);
+		}
+		return result;
+	}
+
+	public void setEditManager(EditManager editManager) {
+		this.editManager = editManager;
+	}
+
+	public void setFileManager(FileManager fileManager) {
+		this.fileManager = fileManager;
+	}
+
+	public void setActivityIconManager(ActivityIconManager activityIconManager) {
+		this.activityIconManager = activityIconManager;
+	}
+
+	public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) {
+		this.serviceDescriptionRegistry = serviceDescriptionRegistry;
+	}
+
+	public void setApplicationConfiguration(ApplicationConfiguration applicationConfiguration) {
+		this.applicationConfiguration = applicationConfiguration;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
new file mode 100644
index 0000000..055aa81
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellActivityIcon.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (C) 2007 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+
+import net.sf.taverna.t2.workbench.activityicons.ActivityIconSPI;
+
+/**
+ *
+ * @author Alex Nenadic
+ * @author David Withers
+ */
+public class BeanshellActivityIcon implements ActivityIconSPI {
+
+	private static Icon icon = null;
+
+	@Override
+	public int canProvideIconScore(URI activityType) {
+		if (BeanshellTemplateService.ACTIVITY_TYPE.equals(activityType))
+			return DEFAULT_ICON + 1;
+		else
+			return NO_ICON;
+	}
+
+	@Override
+	public Icon getIcon(URI activityType) {
+		return getBeanshellIcon();
+	}
+
+	public static Icon getBeanshellIcon() {
+		if (icon == null) {
+			icon = new ImageIcon(BeanshellActivityIcon.class.getResource("/beanshell.png"));
+		}
+		return icon;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-workbench-common-activities/blob/6b540057/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
new file mode 100644
index 0000000..c2cb38f
--- /dev/null
+++ b/taverna-beanshell-activity-ui/src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
@@ -0,0 +1,57 @@
+package net.sf.taverna.t2.activities.beanshell.servicedescriptions;
+
+import java.net.URI;
+
+import javax.swing.Icon;
+
+import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService;
+import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
+import uk.org.taverna.scufl2.api.configurations.Configuration;
+
+public class BeanshellTemplateService extends AbstractTemplateService {
+
+	public static final URI ACTIVITY_TYPE = URI.create("http://ns.taverna.org.uk/2010/activity/beanshell");
+
+	private static final String BEANSHELL = "Beanshell";
+
+	private static final URI providerId = URI
+	.create("http://taverna.sf.net/2010/service-provider/beanshell");
+
+	public String getName() {
+		return BEANSHELL;
+	}
+
+	@Override
+	public URI getActivityType() {
+		return ACTIVITY_TYPE;
+	}
+
+	@Override
+	public Configuration getActivityConfiguration() {
+		Configuration configuration = new Configuration();
+		configuration.setType(ACTIVITY_TYPE.resolve("#Config"));
+		configuration.getJsonAsObjectNode().put("script", "");
+		configuration.getJsonAsObjectNode().put("classLoaderSharing", "workflow");
+		return configuration;
+	}
+
+	@Override
+	public Icon getIcon() {
+		return BeanshellActivityIcon.getBeanshellIcon();
+	}
+
+	@Override
+	public String getDescription() {
+		return "A service that allows Beanshell scripts, with dependencies on libraries";
+	}
+
+	public static ServiceDescription getServiceDescription() {
+		BeanshellTemplateService bts = new BeanshellTemplateService();
+		return bts.templateService;
+	}
+
+	public String getId() {
+		return providerId.toString();
+	}
+
+}