• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.android.ide.eclipse.traceview;
17 
18 import org.eclipse.ui.plugin.AbstractUIPlugin;
19 import org.osgi.framework.BundleContext;
20 
21 /**
22  * The activator class controls the plug-in life cycle
23  */
24 public class TraceviewPlugin extends AbstractUIPlugin {
25 
26     // The plug-in ID
27     public static final String PLUGIN_ID = "com.android.ide.eclipse.traceview"; // $NON-NLS-1$
28 
29     // The shared instance
30     private static TraceviewPlugin sPlugin;
31 
32     /**
33      * The constructor
34      */
TraceviewPlugin()35     public TraceviewPlugin() {
36     }
37 
38     /*
39      * (non-Javadoc)
40      * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
41      */
42     @Override
start(BundleContext context)43     public void start(BundleContext context) throws Exception {
44         super.start(context);
45         sPlugin = this;
46     }
47 
48     /*
49      * (non-Javadoc)
50      * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
51      */
52     @Override
stop(BundleContext context)53     public void stop(BundleContext context) throws Exception {
54         sPlugin = null;
55         super.stop(context);
56     }
57 
58     /**
59      * Returns the shared instance
60      *
61      * @return the shared instance
62      */
getDefault()63     public static TraceviewPlugin getDefault() {
64         return sPlugin;
65     }
66 
67 }
68