Coverage Report - org.seasar.eclipse.common.CommonPlugin
 
Classes in this File Line Coverage Branch Coverage Complexity
CommonPlugin
0%
0/12
N/A
0
 
 1  
 package org.seasar.eclipse.common;
 2  
 
 3  
 import org.eclipse.core.runtime.Plugin;
 4  
 import org.osgi.framework.BundleContext;
 5  
 import org.seasar.eclipse.common.util.LogUtil;
 6  
 
 7  
 /**
 8  
  * The main plugin class to be used in the desktop.
 9  
  */
 10  
 public class CommonPlugin extends Plugin {
 11  
 
 12  
     // The shared instance.
 13  
     private static CommonPlugin plugin;
 14  
 
 15  
     /**
 16  
      * The constructor.
 17  
      */
 18  0
     public CommonPlugin() {
 19  0
         plugin = this;
 20  0
     }
 21  
 
 22  
     /**
 23  
      * This method is called upon plug-in activation
 24  
      */
 25  
     @Override
 26  
     public void start(BundleContext context) throws Exception {
 27  0
         throw new UnsupportedOperationException("This plugin cannot started.");
 28  
     }
 29  
 
 30  
     /**
 31  
      * This method is called when the plug-in is stopped
 32  
      */
 33  
     @Override
 34  
     public void stop(BundleContext context) throws Exception {
 35  0
         super.stop(context);
 36  0
         plugin = null;
 37  0
     }
 38  
 
 39  
     /**
 40  
      * Returns the shared instance.
 41  
      */
 42  
     public static CommonPlugin getDefault() {
 43  0
         return plugin;
 44  
     }
 45  
 
 46  
     public static void log(String msg) {
 47  0
         LogUtil.log(getDefault(), msg);
 48  0
     }
 49  
 
 50  
     public static void log(Throwable throwable) {
 51  0
         LogUtil.log(getDefault(), throwable);
 52  0
     }
 53  
 
 54  
 }