KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dolphin > DolphinPlugin


1 /*
2 * Copyright (C) 2005 Bourgeon Jérôme, Macherel Bruno
3 *
4 * This file is part of Dolphin
5 *
6 * Dolphin : An open source J2EE Deployment Tool JSR-88 compliant
7 * Contact: ishmael-dev@objectweb.org
8 *
9 * Dolphin is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or any later version.
13 *
14 * Dolphin is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with Dolphin; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 */

24
25 package org.objectweb.dolphin;
26
27 import org.eclipse.ui.plugin.AbstractUIPlugin;
28 import org.osgi.framework.BundleContext;
29
30 /**
31  * The main plugin class to be used in the desktop.
32  */

33 public class DolphinPlugin extends AbstractUIPlugin {
34     //The shared instance.
35
private static DolphinPlugin plugin;
36
37     /**
38      * Create a new DolphinPlugin
39      */

40     public DolphinPlugin() {
41         super();
42         plugin = this;
43     }
44
45     /**
46      * This method is called upon plug-in activation
47      */

48     public void start(BundleContext context) throws Exception JavaDoc {
49         super.start(context);
50     }
51
52     /**
53      * This method is called when the plug-in is stopped
54      */

55     public void stop(BundleContext context) throws Exception JavaDoc {
56         super.stop(context);
57         plugin = null;
58     }
59
60     /**
61      * Returns the shared instance.
62      */

63     public static DolphinPlugin getDefault() {
64         return plugin;
65     }
66 }
67
Popular Tags