1 package org.jlibrary.cache; 2 3 import org.eclipse.ui.plugin.AbstractUIPlugin; 4 import org.jlibrary.cache.impl.WorkspaceCache; 5 import org.jlibrary.client.cache.LocalCacheService; 6 import org.osgi.framework.BundleContext; 7 8 11 public class CachePlugin extends AbstractUIPlugin { 12 13 private static CachePlugin plugin; 15 16 19 public CachePlugin() { 20 plugin = this; 21 22 LocalCacheService.getInstance().registerCache(new WorkspaceCache()); 23 } 24 25 28 public void start(BundleContext context) throws Exception { 29 super.start(context); 30 } 31 32 35 public void stop(BundleContext context) throws Exception { 36 super.stop(context); 37 plugin = null; 38 } 39 40 43 public static CachePlugin getDefault() { 44 return plugin; 45 } 46 47 } 48 | Popular Tags |