1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.core.runtime.Assert; 14 import org.eclipse.jface.preference.IPreferenceStore; 15 import org.eclipse.jface.resource.ImageRegistry; 16 import org.eclipse.ui.internal.util.PrefUtil; 17 import org.eclipse.ui.plugin.AbstractUIPlugin; 18 import org.osgi.framework.BundleContext; 19 20 25 public final class UIPlugin extends AbstractUIPlugin { 26 27 private static UIPlugin inst; 28 29 34 public UIPlugin() { 35 super(); 36 inst = this; 37 } 38 39 51 protected ImageRegistry createImageRegistry() { 52 55 Assert.isLegal(false); 56 return null; 57 } 58 59 public ImageRegistry getImageRegistry() { 60 63 Assert.isLegal(false); 64 return null; 65 } 66 67 73 public static UIPlugin getDefault() { 74 return inst; 75 } 76 77 82 protected void initializeDefaultPreferences(IPreferenceStore store) { 83 } 86 87 90 public void start(BundleContext context) throws Exception { 91 super.start(context); 92 93 PrefUtil.setUICallback(new PrefUtil.ICallback() { 96 public IPreferenceStore getPreferenceStore() { 97 return UIPlugin.this.getPreferenceStore(); 98 } 99 100 public void savePreferences() { 101 UIPlugin.this.savePluginPreferences(); 102 } 103 }); 104 } 105 } 106 | Popular Tags |