package org.helioviewer.jhv.plugins.eveplugin;

import java.util.concurrent.ExecutorService;

import org.helioviewer.jhv.base.plugin.interfaces.Plugin;
import org.helioviewer.jhv.plugins.eveplugin.lines.BandTypeAPI;
import org.helioviewer.jhv.plugins.eveplugin.radio.RadioData;
import org.helioviewer.jhv.plugins.eveplugin.view.TimelineDataPanel;
import org.helioviewer.jhv.threads.JHVExecutor;
import org.helioviewer.jhv.threads.JHVWorker;
import org.helioviewer.jhv.timelines.Timelines;
import org.helioviewer.jhv.timelines.view.linedataselector.TimelineTableModel;

public class EVEPlugin implements Plugin {

    private static final int MAX_WORKER_THREADS = 12;
    public static final ExecutorService executorService = JHVExecutor.getJHVWorkersExecutorService("EVE", MAX_WORKER_THREADS);
    public static final RadioData rd = new RadioData();

    private final Timelines tl = new Timelines();

    @Override
    public void installPlugin() {
        tl.installTimelines(); // SWEK depends on this

        TimelineTableModel.addLineData(rd);
        Timelines.td.setObservationPanel(new TimelineDataPanel());
        JHVWorker<Void, Void> loadSources = new JHVWorker<Void, Void>() {

            @Override
            protected Void backgroundWork() {
                BandTypeAPI.getDatasets();
                return null;
            }

            @Override
            protected void done() {
                Timelines.td.getObservationPanel().setupDatasets();
            }

        };

        loadSources.setThreadName("EVE--LoadSources");
        executorService.execute(loadSources);
    }

    @Override
    public void uninstallPlugin() {
        tl.uninstallTimelines();
    }

    @Override
    public String getName() {
        return "Timeline Plugin";
    }

    @Override
    public String getDescription() {
        return "This plugin visualizes 1D and 2D time series";
    }

    @Override
    public String getAboutLicenseText() {
        return "Mozilla Public License Version 2.0";
    }

    @Override
    public void setState(String state) {
    }

    @Override
    public String getState() {
        return null;
    }

}

@@ -891,24 +891,100 @@
 melines();%0A%0A
+    public EVEPlugin() %7B%0A        TimelineTableModel.addLineData(rd);%0A    %7D%0A%0A
     @Overrid
@@ -1053,77 +1053,9 @@
 s();
- // SWEK depends on this%0A%0A        TimelineTableModel.addLineData(rd);
+%0A
 %0A   

Revert confusion