Clover coverage report - net.sourceforge.astyleclipse Coverage Report
Coverage timestamp: 星期六 九月 23 2006 23:19:47 CST
file stats: LOC: 80   Methods: 6
NCLOC: 39   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Activator.java 0% 0% 0% 0%
coverage
 1    /*
 2    * Source code is copied from CDT contribute indent.1.0.2.zip as example
 3    */
 4    package net.sourceforge.astyleclipse;
 5   
 6    import java.util.MissingResourceException;
 7    import java.util.ResourceBundle;
 8   
 9    import org.eclipse.ui.plugin.AbstractUIPlugin;
 10    import org.osgi.framework.BundleContext;
 11   
 12    /**
 13    * The activator class controls the plug-in life cycle
 14    */
 15    public class Activator extends AbstractUIPlugin {
 16   
 17    // The plug-in ID
 18    public static final String PLUGIN_ID = "net.sourceforge.astyleclipse";
 19   
 20    // The shared instance
 21    private static Activator plugin;
 22    private ResourceBundle resourceBundle;
 23    /**
 24    * The constructor
 25    */
 26  0 public Activator() {
 27    // System.out.println("Hello, I am called");
 28  0 plugin = this;
 29  0 try {
 30  0 resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.indent.FormatterPluginResources");
 31    } catch (MissingResourceException x) {
 32  0 resourceBundle = null;
 33    }
 34    }
 35   
 36    /*
 37    * (non-Javadoc)
 38    * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 39    */
 40  0 public void start(BundleContext context) throws Exception {
 41    // System.out.println("Hello, I am started");
 42  0 super.start(context);
 43    }
 44   
 45    /*
 46    * (non-Javadoc)
 47    * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 48    */
 49  0 public void stop(BundleContext context) throws Exception {
 50  0 plugin = null;
 51  0 super.stop(context);
 52    }
 53    /**
 54    * Returns the string from the plugin's resource bundle,
 55    * or 'key' if not found.
 56    */
 57   
 58  0 public static String getResourceString(String key) {
 59  0 ResourceBundle bundle = Activator.getDefault().getResourceBundle();
 60  0 try {
 61  0 return (bundle != null) ? bundle.getString(key) : key;
 62    } catch (MissingResourceException e) {
 63  0 return key;
 64    }
 65    }
 66    /**
 67    * Returns the shared instance
 68    *
 69    * @return the shared instance
 70    */
 71  0 public static Activator getDefault() {
 72  0 return plugin;
 73    }
 74    /**
 75    * Returns the plugin's resource bundle,
 76    */
 77  0 public ResourceBundle getResourceBundle() {
 78  0 return resourceBundle;
 79    }
 80    }