1 package winterwell.markdown;
3 import org.eclipse.ui.plugin.AbstractUIPlugin;
4 import org.osgi.framework.BundleContext;
6 import winterwell.markdown.preferences.MarkdownPreferencePage;
9 * The activator class controls the plug-in life cycle
11 public class Activator extends AbstractUIPlugin {
14 public static final String PLUGIN_ID = "winterwell.markdown";
16 // The shared instance
17 private static Activator plugin;
27 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
29 public void start(BundleContext context) throws Exception {
33 MarkdownPreferencePage.setDefaultPreferences(getPreferenceStore());
36 // ?? Have this method called by start(), saving a reminder so it doesn't repeat itself??
37 private void doInstall() {
38 // ??Try to make this the default for file types -- but is this possible??
39 // c.f. http://stackoverflow.com/questions/15877123/eclipse-rcp-programmatically-associate-file-type-with-editor
44 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
46 public void stop(BundleContext context) throws Exception {
52 * Returns the shared instance
54 * @return the shared instance
56 public static Activator getDefault() {