Changeset 24031 in osm for applications/editors


Ignore:
Timestamp:
2010-11-02T21:25:29+01:00 (14 years ago)
Author:
postfix
Message:

'smed with embeddes felix and DS'

Location:
applications/editors/josm/plugins/smed_fw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed_fw/build.xml

    r23958 r24031  
    3131
    3232        <!-- enter the SVN commit message -->
    33         <property name="commit.message" value="make it actual" />
     33        <property name="commit.message" value="smed with embeddes felix and DS" />
    3434        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3535        <property name="plugin.main.version" value="3514" />
  • applications/editors/josm/plugins/smed_fw/src/smed_fw/RunFW.java

    r23913 r24031  
    1717import org.osgi.framework.Constants;
    1818
     19import smed_fw.io.JARFileFilter;
     20
    1921public class RunFW implements BundleActivator{
    2022       
     
    3133       
    3234                File pluginDir = Main.pref.getPluginsDirectory();
    33         pluginDirName = pluginDir.getAbsolutePath();
     35                pluginDirName = pluginDir.getAbsolutePath()+ "/";
    3436               
    3537       
     
    6062        public void start(BundleContext context) throws Exception {
    6163                this.context = context;
    62                 // Bundle b = context.installBundle("file:" + pluginDirName + "/bundle/de.vogella.felix.firstbundle_1.0.0.201010271606.jar");
    63                 Bundle b = context.installBundle("file:" + pluginDirName + "/bundle/de.vogella.felix.firstbundle_1.0.0.201010271606.jar");
    64                 b.start();
     64                Bundle b = null;
     65                // Bundle b = context.installBundle("file:" + pluginDirName + "bundle/de.vogella.felix.firstbundle_1.0.0.201010271606.jar");
     66                // Bundle b = context.installBundle("file:" + pluginDirName + "bundle/de.vogella.felix.firstbundle_1.0.0.201010271606.jar");
     67                // b.start();
     68                File plugDir = new File(pluginDirName + SmedFW.FW_BUNDLE_LOCATION);
     69               
     70                File[] plugins = plugDir.listFiles(new JARFileFilter());
     71                if(plugins != null) {
     72                        for(File p : plugins) {
     73                                b = context.installBundle("file:" + p.getAbsolutePath());
     74                                b.start();
     75                        }
     76                }
    6577        }
    6678
  • applications/editors/josm/plugins/smed_fw/src/smed_fw/SmedFW.java

    r23913 r24031  
    66import java.io.FileOutputStream;
    77import java.io.IOException;
     8import java.util.ArrayList;
    89import java.util.Enumeration;
     10import java.util.List;
    911import java.util.jar.JarEntry;
    1012import java.util.jar.JarFile;
     
    3234        byte[] buffer = new byte[16384];
    3335        int len;
     36        List<String> lib = new ArrayList<String>();
     37       
     38        lib.add("org.apache.felix.scr-1.4.0.jar");
     39        lib.add("osgi.cmpn-4.2.1.jar");
    3440
    3541        String eName = null;
     
    6470                                fwFound = false;
    6571                        }
    66                         if(fwFound || fwplugDir.needUpdate(jars,eName)) {
     72                        if(fwFound || lib.contains(eName)|| fwplugDir.needUpdate(jars,eName)) {
    6773                                BufferedOutputStream pos = new BufferedOutputStream(pfos);
    6874                                inp = new BufferedInputStream(file.getInputStream( e ));
Note: See TracChangeset for help on using the changeset viewer.