01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.fieldassist;
11:
12: import org.eclipse.ui.plugin.*;
13: import org.osgi.framework.BundleContext;
14:
15: /**
16: * The main plugin class to be used in the desktop.
17: */
18: public class FieldAssistPlugin extends AbstractUIPlugin {
19:
20: //The shared instance.
21: private static FieldAssistPlugin plugin;
22:
23: // Our own content assist decorator (which adds the key binding)
24: static String DEC_CONTENTASSIST = "org.eclipse.ui.examples.fieldassist.contentAssistDecoration";
25:
26: /**
27: * The constructor.
28: */
29: public FieldAssistPlugin() {
30: plugin = this ;
31: }
32:
33: /**
34: * This method is called upon plug-in activation
35: */
36: public void start(BundleContext context) throws Exception {
37: super .start(context);
38: }
39:
40: /**
41: * This method is called when the plug-in is stopped
42: */
43: public void stop(BundleContext context) throws Exception {
44: super .stop(context);
45: plugin = null;
46: }
47:
48: /**
49: * Returns the shared instance.
50: *
51: * @return the shared plugin instance
52: */
53: public static FieldAssistPlugin getDefault() {
54: return plugin;
55: }
56: }
|