1 package eu
.etaxonomy
.taxeditor
.prototype2
;
3 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
4 import org
.eclipse
.swt
.graphics
.Image
;
5 import org
.eclipse
.ui
.plugin
.AbstractUIPlugin
;
6 import org
.osgi
.framework
.BundleContext
;
8 import eu
.etaxonomy
.cdm
.api
.application
.CdmApplicationController
;
9 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
10 import eu
.etaxonomy
.taxeditor
.prototype2
.model
.TaxonList
;
14 * The activator class controls the plug-in life cycle
16 public class Activator
extends AbstractUIPlugin
{
21 public static final String PLUGIN_ID
= "eu.etaxonomy.mvctest";
26 private static Activator plugin
;
29 * The dataset of taxa for this session
31 private CdmApplicationController cdmApp
= new CdmApplicationController();
32 private TaxonList taxonList
= new TaxonList();
33 private TaxonList recentNamesList
= new TaxonList();
41 taxonList
.setTaxonList(cdmApp
.getTaxonService().getRootTaxa(null));
46 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
48 public void start(BundleContext context
) throws Exception
{
55 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
57 public void stop(BundleContext context
) throws Exception
{
63 * Returns the shared instance
65 * @return the shared instance
67 public static Activator
getDefault() {
72 * Returns an image descriptor for the image file at the given
73 * plug-in relative path
75 * @param path the path
76 * @return the image descriptor
78 public static ImageDescriptor
getImageDescriptor(String path
) {
79 return imageDescriptorFromPlugin(PLUGIN_ID
, path
);
83 public Image
getImage(String key
) {
84 return getImageRegistry().get(key
);
87 public TaxonList
getTaxonList() {
91 public TaxonList
getRecentNamesList() {
92 return recentNamesList
;
95 public CdmApplicationController
getCdmApp() {