Index: /applications/editors/josm/plugins/calculator/build.xml
===================================================================
--- /applications/editors/josm/plugins/calculator/build.xml	(revision 23163)
+++ /applications/editors/josm/plugins/calculator/build.xml	(revision 23163)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+** This is a template build file for a JOSM  plugin.
+**
+** Maintaining versions
+** ====================
+** see README.template
+**
+** Usage
+** =====
+** To build it run
+**
+**    > ant  dist
+**
+** To install the generated plugin locally (in you default plugin directory) run
+**
+**    > ant  install
+**
+** The generated plugin jar is not automatically available in JOSMs plugin configuration
+** dialog. You have to check it in first.
+**
+** Use the ant target 'publish' to check in the plugin and make it available to other
+** JOSM users:
+**    set the properties commit.message and plugin.main.version
+** and run
+**    > ant  publish
+**
+**
+-->
+
+<project name="calc" default="dist">
+	
+	<!--
+      ************************************************
+      ** should not be necessary to change the following properties
+     -->
+	<property name="toms"					location="../../dist/toms.jar/"/>
+ 	<property name="plugin.build.dir"       value="build"/>
+	<property name="plugin.src.dir"         value="src"/>
+	<!-- this is the directory where the plugin jar is copied to -->
+	<property name="plugin.dist.dir"        value="../../dist"/>
+	<property name="ant.build.javac.target" value="1.5"/>
+	<property name="plugin.dist.dir"        value="../../dist"/>
+	<property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
+
+	<!--
+    **********************************************************
+    ** init - initializes the build
+    **********************************************************
+    -->
+	<target name="init">
+		<mkdir dir="${plugin.build.dir}"/>
+	</target>
+
+	<!--
+    **********************************************************
+    ** compile - compiles the source tree
+    **********************************************************
+    -->
+	<target name="compile" depends="init">
+		<echo message="compiling sources for  ${plugin.jar} ... "/>
+		<javac srcdir="src" classpath="${toms}" debug="true" destdir="${plugin.build.dir}">
+			<compilerarg value="-Xlint:deprecation"/>
+			<compilerarg value="-Xlint:unchecked"/>
+		</javac>
+	</target>
+
+	<target name="dist" depends="compile">
+		<echo message="creating ${ant.project.name}.jar ... "/>
+		<jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
+			<!--
+        ************************************************
+        ** configure these properties. Most of them will be copied to the plugins
+        ** manifest file. Property values will also show up in the list available
+        ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
+        **
+        ************************************************
+    -->
+			<manifest>
+				<attribute name="Author" value="Werner, Malcolm"/>
+				<attribute name="Plugin-Class" value="ifc.Pluggable"/>
+				<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
+				<attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
+				<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
+			</manifest>
+		</jar>
+	</target>
+
+	<!--
+    **********************************************************
+    ** clean - clean up the build environment
+    **********************************************************
+    -->
+	<target name="clean">
+		<delete dir="${plugin.build.dir}"/>
+		<delete file="${plugin.jar}"/>
+	</target>
+
+	
+	<!--
+    **********************************************************
+    ** install - install the plugin in your local JOSM installation
+    **********************************************************
+    -->
+	<target name="install" depends="dist">
+		<property environment="env"/>
+		<condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
+			<and>
+				<os family="windows"/>
+			</and>
+		</condition>
+		<copy file="${plugin.jar}" todir="${josm.plugins.dir}/tplug"/>
+	</target>
+	
+</project>
Index: /applications/editors/josm/plugins/calculator/src/calc/CalcPlugin.java
===================================================================
--- /applications/editors/josm/plugins/calculator/src/calc/CalcPlugin.java	(revision 23163)
+++ /applications/editors/josm/plugins/calculator/src/calc/CalcPlugin.java	(revision 23163)
@@ -0,0 +1,63 @@
+package calc;
+
+import toms.plug.ifc.Pluggable;
+import toms.plug.ifc.PluginManager;
+
+public class CalcPlugin implements Pluggable {
+
+	private Calculator calc;
+	private PluginManager manager;
+	private boolean running = false;
+	
+	public CalcPlugin() {
+		this.calc = new Calculator();	
+	}
+	
+	@Override
+	public boolean start() {
+		this.running = true;
+		new Thread(new Runnable() {
+
+			@Override
+			public void run() {
+				int one = 0;
+				int two = 0;
+				int res = 0;
+				
+				while(CalcPlugin.this.running) {
+					one = (int)(Math.random() * 1000);
+					two = (int)(Math.random() * 1000);
+					
+					res = CalcPlugin.this.calc.add(one, two);
+					
+					CalcPlugin.this.manager.showVisualMessage(one + " + " + two + " = " + res);
+					
+					// sleep a little bit
+					try {
+						Thread.sleep(res);
+					} catch (InterruptedException e) {
+						e.printStackTrace();
+					}
+				}
+			}
+				
+			
+		}).start();
+		
+		return true;
+	}
+
+	@Override
+	public boolean stop() {
+		this.manager.showVisualMessage("Calculation stopped");
+		this.running = false;
+		
+		return true;
+	}
+
+	@Override
+	public void setPluginManager(PluginManager manager) {
+		this.manager = manager;
+	}
+
+}
Index: /applications/editors/josm/plugins/calculator/src/calc/Calculator.java
===================================================================
--- /applications/editors/josm/plugins/calculator/src/calc/Calculator.java	(revision 23163)
+++ /applications/editors/josm/plugins/calculator/src/calc/Calculator.java	(revision 23163)
@@ -0,0 +1,8 @@
+package calc;
+
+public class Calculator {
+
+	 public int add(int one, int two) {
+		 return one + two;
+	 }
+}
