package info.johannesgruber.jgnash.plugin.csvimport;

import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.JMenuItem;
import javax.swing.JPanel;

import jgnash.plugin.Plugin;

public class CsvImportPlugin implements Plugin {

	private static final Logger LOG = Logger.getLogger(CsvImportPlugin.class.getName());
	
	public JMenuItem[] getMenuItems() {
    JMenuItem menuItem = new JMenuItem();

    menuItem.putClientProperty(Plugin.PRECEDINGMENUIDREF, "qifimport-command");

    LOG.info("Loading CsvImport plugin");

    try {
        menuItem.setAction(new ImportCsvAction());                       
        
        return new JMenuItem[] { menuItem };
    } catch (NoClassDefFoundError e) {
        Logger.getLogger(CsvImportPlugin.class.getName()).log(Level.SEVERE, e.getLocalizedMessage(), e);
        return null;
    }
	}

	public String getName() {
		return "CSV Import Plugin";
	}

	public JPanel getOptionsPanel() {
		return null;
	}

	public void start() {
	}

	public void stop() {
	}

}
