/*
 * Copyright 2015 The ISTLab. Use of this source code is governed by a GNU AFFERO GPL 3.0 license
 * that can be found in the LICENSE file.
 */

package gr.aueb.dmst.istlab.unixtools.plugin;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

import gr.aueb.dmst.istlab.unixtools.util.PropertiesLoader;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

  /** The plug-in ID */
  public static final String PLUGIN_ID = "gr.aueb.dmst.istlab.unixtools.plugin";
  /** The shared instance */
  private static Activator plugin;

  public Activator() {}

  @Override
  public void start(BundleContext context) throws Exception {
    // load plugin's properties
    PropertiesLoader.loadPropertiesFile();
    super.start(context);
    plugin = this;
  }

  @Override
  public void stop(BundleContext context) throws Exception {
    plugin = null;
    // close properties file
    PropertiesLoader.closePropertiesFile();
    super.stop(context);
  }

  /**
   * Returns the shared instance
   *
   * @return the shared instance
   */
  public static Activator getDefault() {
    return plugin;
  }

}

/*
 * Copyright 2015 The ISTLab. Use of this source code is governed by a GNU AFFERO GPL 3.0 license
 * that can be found in the LICENSE file.
 */

package gr.aueb.dmst.istlab.unixtools.plugin;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

import gr.aueb.dmst.istlab.unixtools.util.LoggerUtil;
import gr.aueb.dmst.istlab.unixtools.util.PropertiesLoader;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

  /** The plug-in ID */
  public static final String PLUGIN_ID = "gr.aueb.dmst.istlab.unixtools.plugin";
  /** The shared instance */
  private static Activator plugin;

  public Activator() {}

  @Override
  public void start(BundleContext context) throws Exception {
    // load plugin's properties
    super.start(context);
    plugin = this;
    LoggerUtil.configureLogger();
    PropertiesLoader.loadPropertiesFile();
  }

  @Override
  public void stop(BundleContext context) throws Exception {
    plugin = null;
    // close properties file
    PropertiesLoader.closePropertiesFile();
    super.stop(context);
  }

  /**
   * Returns the shared instance
   *
   * @return the shared instance
   */
  public static Activator getDefault() {
    return plugin;
  }

}

Fix issue with config file not loading correctly
Fix issue with config file not loading correctly
