Package net.sf.myway.edit

Source Code of net.sf.myway.edit.EditPlugin

package net.sf.myway.edit;

import net.sf.myway.edit.bl.EditBL;
import net.sf.myway.edit.bl.impl.EditBLImpl;

import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class EditPlugin extends Plugin {
  private static Logger _log = Logger.getLogger(EditPlugin.class);

  // The plug-in ID
  public static final String PLUGIN_ID = "net.sf.myway.edit"; //$NON-NLS-1$

  // The shared instance
  private static EditPlugin plugin;

  private static EditBL _bl;

  public static EditBL getBL() {
    if (_bl == null)
      _bl = new EditBLImpl();
    return _bl;
  }

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

  /**
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  @Override
  public void start(final BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
  }

  /**
   * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
   */
  @Override
  public void stop(final BundleContext context) throws Exception {
    plugin = null;
    super.stop(context);
  }
}
TOP

Related Classes of net.sf.myway.edit.EditPlugin

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.