package org.helioviewer.jhv.launcher;

import java.awt.EventQueue;

import org.helioviewer.jhv.JavaHelioViewer;
import org.helioviewer.jhv.plugin.controller.PluginManager;
import org.helioviewer.jhv.plugins.eveplugin.EVEPlugin;
import org.helioviewer.jhv.plugins.pfssplugin.PfssPlugin;
import org.helioviewer.jhv.plugins.swek.SWEKPlugin;
import org.helioviewer.jhv.plugins.swhvhekplugin.SWHVHEKPlugin;

/**
 * Class for launching jhv with several plugins added.
 *
 * @author Bram.Bourgoignie (Bram.Bourgoignie@oma.be)
 *
 */
public class SWHVLauncher {

    public static void main(String[] args) {
        System.out.println("=================================================================");
        System.out.println("JHelioviewer developer version with external plugins compiled-in.");
        System.out.println("=================================================================\n\n");

        String[] args2 = new String[7];

        args2[0] = "--exclude-plugins";
        args2[1] = "--deactivate-plugin";
        args2[2] = "SWEKPlugin.jar";
        args2[3] = "--deactivate-plugin";
        args2[4] = "EVEPlugin.jar";
        args2[5] = "--deactivate-plugin";
        args2[6] = "SWHVHEKPlugin.jar";
        args2[5] = "--deactivate-plugin";
        args2[6] = "PfssPlugin.jar";
        JavaHelioViewer.main(args2);

        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                PluginManager.getSingletonInstance().addPlugin(EVEPlugin.class.getClassLoader(), new EVEPlugin(), null);
                PluginManager.getSingletonInstance().addPlugin(SWEKPlugin.class.getClassLoader(), new SWEKPlugin(false), null);
                PluginManager.getSingletonInstance().addPlugin(SWHVHEKPlugin.class.getClassLoader(), new SWHVHEKPlugin(), null);
                PluginManager.getSingletonInstance().addPlugin(PfssPlugin.class.getClassLoader(), new PfssPlugin(), null);
            }
        });
    }

}

@@ -929,369 +929,33 @@
 ing%5B
-7%5D;%0A%0A        args2%5B0%5D = %22--exclude-plugins%22;%0A        args2%5B1%5D = %22--deactivate-plugin%22;%0A        args2%5B2%5D = %22SWEKPlugin.jar%22;%0A        args2%5B3%5D = %22--deactivate-plugin%22;%0A        args2%5B4%5D = %22EVEPlugin.jar%22;%0A        args2%5B5%5D = %22--deactivate-plugin%22;%0A        args2%5B6%5D = %22SWHVHEKPlugin.jar%22;%0A        args2%5B5%5D = %22--deactivate-plugin%22;%0A        args2%5B6%5D = %22PfssPlugin.jar%22
+%5D %7B %22--exclude-plugins%22 %7D
 ;%0A  

Simplify SWHVLauncher