Index: /applications/editors/josm/plugins/smed_fw/build.xml
===================================================================
--- /applications/editors/josm/plugins/smed_fw/build.xml	(revision 23894)
+++ /applications/editors/josm/plugins/smed_fw/build.xml	(revision 23895)
@@ -40,13 +40,14 @@
       ** should not be necessary to change the following properties
      -->
-	<property name="josm"                   location="../../core/dist/josm-custom.jar"/>
-	<property name="plugin.build.dir"       value="build/"/>
-	<property name="plugin.src.dir"         value="src/"/>
-	<property name="smed.dist.dir"        value="dist/"/>
+	<property name="josm" location="../../core/dist/josm-custom.jar" />
+	<property name="felix"					location="core/dist/felix.jar"/>
+	<property name="plugin.build.dir" value="build/" />
+	<property name="plugin.src.dir" value="src/" />
+	<property name="smed_fw.dist.dir" value="dist/" />
 	<!-- this is the directory where the plugin jar is copied to -->
-	<property name="plugin.dist.dir"        value="../../dist/"/>
-	<property name="smed_core.dist.dir"     value="core/dist/"/>
-	<property name="ant.build.javac.target" value="1.5"/>
-	<property name="plugin.jar"             value="${plugin.dist.dir}${ant.project.name}.jar"/>
+	<property name="plugin.dist.dir" value="../../dist/" />
+	<property name="smed_fw_core.dist.dir" value="core/dist/" />
+	<property name="ant.build.javac.target" value="1.5" />
+	<property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar" />
 
 	<!--
@@ -56,7 +57,7 @@
     -->
 	<target name="init">
-		<mkdir dir="${plugin.build.dir}"/>
-		<mkdir dir="${smed_core.dist.dir}"/>
-		<mkdir dir="${smed.dist.dir}"/>
+		<mkdir dir="${plugin.build.dir}" />
+		<mkdir dir="${smed_fw_core.dist.dir}" />
+		<mkdir dir="${smed_fw.dist.dir}" />
 	</target>
 
@@ -67,8 +68,8 @@
     -->
 	<target name="compile" depends="init">
-		<echo message="compiling sources for  ${plugin.jar} ... "/>
-		<javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
-			<compilerarg value="-Xlint:deprecation"/>
-			<compilerarg value="-Xlint:unchecked"/>
+		<echo message="compiling sources for  ${plugin.jar} ... " />
+		<javac srcdir="src" classpath="${josm}:${felix}" debug="true" destdir="${plugin.build.dir}">
+			<compilerarg value="-Xlint:deprecation" />
+			<compilerarg value="-Xlint:unchecked" />
 		</javac>
 	</target>
@@ -80,25 +81,25 @@
     -->
 	<target name="dist" depends="compile, revision">
-		<echo message="creating ${ant.project.name}.jar ... "/>
-
-        <copy todir="${plugin.build.dir}/images">
-            <fileset dir="${plugin.src.dir}/images"/>
-        </copy>
+		<echo message="creating ${ant.project.name}.jar ... " />
 
 		<copy todir="${plugin.build.dir}/images">
-			<fileset dir="images"/>
-		</copy>
-		
-		<copy todir="${plugin.build.dir}/smed/msg">
-			<fileset dir="${plugin.src.dir}/smed/msg"/>
-		</copy>
-		
+			<fileset dir="${plugin.src.dir}/images" />
+		</copy>
+
+		<copy todir="${plugin.build.dir}/images">
+			<fileset dir="images" />
+		</copy>
+
+		<copy todir="${plugin.build.dir}/smed_fw/msg">
+			<fileset dir="${plugin.src.dir}/smed_fw/msg" />
+		</copy>
+
 		<copy todir="${plugin.build.dir}">
-			<fileset dir="${smed.dist.dir}"/>
-		</copy>
-						
+			<fileset dir="${smed_fw.dist.dir}" />
+		</copy>
+
 		<copy todir="${plugin.build.dir}">
 			<fileset dir=".">
-                <include name="*.txt" />
+				<include name="*.txt" />
 			</fileset>
 		</copy>
@@ -113,23 +114,23 @@
     -->
 			<manifest>
-				<attribute name="Author" value="Werner, Malcolm"/>
-				<attribute name="Plugin-Class" value="smed.Smed"/>
-				<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
-				<attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/>
-				<attribute name="Plugin-Icon" value="images/Smed.png"/>
-				<attribute name="Plugin-Link" value="http://openseamap.org/"/>
-				<attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
+				<attribute name="Author" value="Werner, Malcolm" />
+				<attribute name="Plugin-Class" value="smed_fw.SmedFW" />
+				<attribute name="Plugin-Date" value="${version.entry.commit.date}" />
+				<attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap" />
+				<attribute name="Plugin-Icon" value="images/Smed.png" />
+				<attribute name="Plugin-Link" value="http://openseamap.org/" />
+				<attribute name="Plugin-Mainversion" value="${plugin.main.version}" />
 				<!--
 				<attribute name="Plugin-Version" value="23456"/>
 				-->
-				<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
-				 
+				<attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
+
 			</manifest>
 		</jar>
-		
+
 		<!-- install interface -->
-		<copy file="${plugin.jar}" todir="${smed_core.dist.dir}"/>
-	</target>
-	
+		<copy file="${plugin.jar}" todir="${smed_fw_core.dist.dir}" />
+	</target>
+
 	<!--
     **********************************************************
@@ -142,14 +143,14 @@
 
 		<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="info"/>
-			<arg value="--xml"/>
-			<arg value="."/>
-		</exec>
-		<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
-		<delete file="REVISION"/>
-	</target>
-
-	
+			<env key="LANG" value="C" />
+			<arg value="info" />
+			<arg value="--xml" />
+			<arg value="." />
+		</exec>
+		<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />
+		<delete file="REVISION" />
+	</target>
+
+
 	<!--
     **********************************************************
@@ -158,6 +159,6 @@
     -->
 	<target name="clean">
-		<delete dir="${plugin.build.dir}"/>
-		<delete file="${plugin.jar}"/>
+		<delete dir="${plugin.build.dir}" />
+		<delete file="${plugin.jar}" />
 	</target>
 
@@ -168,13 +169,13 @@
     -->
 	<target name="install" depends="dist">
-		<property environment="env"/>
+		<property environment="env" />
 		<condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
 			<and>
-				<os family="windows"/>
+				<os family="windows" />
 			</and>
 		</condition>
-		<copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
-	</target>
-	
+		<copy file="${plugin.jar}" todir="${josm.plugins.dir}" />
+	</target>
+
 	<!--
 		** commits the source tree for this plugin
@@ -183,8 +184,8 @@
 		<echo>Commiting the plugin source with message '${commit.message}' ...</echo>
 		<exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="commit"/>
-			<arg value="-m '${commit.message}'"/>
-			<arg value="."/>
+			<env key="LANG" value="C" />
+			<arg value="commit" />
+			<arg value="-m '${commit.message}'" />
+			<arg value="." />
 		</exec>
 	</target>
@@ -196,13 +197,13 @@
 		<echo>Updating plugin source ...</echo>
 		<exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="up"/>
-			<arg value="."/>
+			<env key="LANG" value="C" />
+			<arg value="up" />
+			<arg value="." />
 		</exec>
 		<echo>Updating ${plugin.jar} ...</echo>
 		<exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="up"/>
-			<arg value="../dist/${plugin.jar}"/>
+			<env key="LANG" value="C" />
+			<arg value="up" />
+			<arg value="../dist/${plugin.jar}" />
 		</exec>
 	</target>
Index: /applications/editors/josm/plugins/smed_fw/src/smed_fw/SmedFW.java
===================================================================
--- /applications/editors/josm/plugins/smed_fw/src/smed_fw/SmedFW.java	(revision 23894)
+++ /applications/editors/josm/plugins/smed_fw/src/smed_fw/SmedFW.java	(revision 23895)
@@ -1,14 +1,65 @@
 package smed_fw;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.felix.framework.Felix;
+import org.apache.felix.framework.util.FelixConstants;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
 
-public class SmedFW extends Plugin {
+public class SmedFW extends Plugin implements BundleActivator{
 
+	private BundleContext context;
+	private Felix felix;
+	
 	public SmedFW(PluginInformation info) {
 		super(info);
 		
+		init();
 		System.out.println("SmedFW (OSGi-Implementation) noch nicht weiter programmiert");
 	}
 
+	private void init() {
+		Map config = new HashMap();
+		List list = new ArrayList();
+		
+		list.add(this);
+		config.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list);
+		
+		// Now create an instance of the framework with
+		// our configurations properties
+		felix = new Felix(config);
+		
+		// now start Felix instance
+		try {
+			felix.start();
+		} catch (BundleException e) {
+			System.err.println("Could not generate framework: " + e);
+			e.printStackTrace();
+		}
+	}
+
+	@Override
+	public void start(BundleContext context) throws Exception {
+		this.context = context;
+	}
+
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		context = null;
+	}
+	
+	public Bundle[] getBundles() {
+		if(context != null) return context.getBundles();
+		
+		return null;
+	}
+
 }
