trace/tracebuilder/com.nokia.tracebuilder.eclipse/src/com/nokia/tracebuilder/eclipse/Activator.java
changeset 10 ed1c9f64298a
equal deleted inserted replaced
9:14dc2103a631 10:ed1c9f64298a
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 * The main plugin class
       
    17 *
       
    18 */
       
    19 package com.nokia.tracebuilder.eclipse;
       
    20 
       
    21 import org.eclipse.core.runtime.Plugin;
       
    22 import org.osgi.framework.BundleContext;
       
    23 
       
    24 /**
       
    25  * The activator class controls the plug-in life cycle
       
    26  * 
       
    27  */
       
    28 public class Activator extends Plugin {
       
    29 
       
    30 	/**
       
    31 	 * The plug-in ID
       
    32 	 */
       
    33 	public static final String PLUGIN_ID = "com.nokia.tracebuilder.eclipse"; //$NON-NLS-1$
       
    34 
       
    35 	/**
       
    36 	 * The shared instance
       
    37 	 */
       
    38 	private static Activator plugin;
       
    39 
       
    40 	/**
       
    41 	 * The constructor
       
    42 	 */
       
    43 	public Activator() {
       
    44 	}
       
    45 
       
    46 	/*
       
    47 	 * (non-Javadoc)
       
    48 	 * 
       
    49 	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
       
    50 	 */
       
    51 	@Override
       
    52 	public void start(BundleContext context) throws Exception {
       
    53 		super.start(context);
       
    54 		plugin = this;
       
    55 	}
       
    56 
       
    57 	/*
       
    58 	 * (non-Javadoc)
       
    59 	 * 
       
    60 	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
       
    61 	 */
       
    62 	@Override
       
    63 	public void stop(BundleContext context) throws Exception {
       
    64 		plugin = null;
       
    65 		super.stop(context);
       
    66 	}
       
    67 
       
    68 	/**
       
    69 	 * Returns the shared instance
       
    70 	 * 
       
    71 	 * @return the shared instance
       
    72 	 */
       
    73 	public static Activator getDefault() {
       
    74 		return plugin;
       
    75 	}
       
    76 
       
    77 }