Project

General

Profile

Download (1.27 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11

    
12
package org.eclipse.gef.internal;
13

    
14
import org.eclipse.ui.plugin.AbstractUIPlugin;
15

    
16
import org.osgi.framework.BundleContext;
17

    
18
public class InternalGEFPlugin extends AbstractUIPlugin {
19

    
20
	private static BundleContext context;
21
	private static AbstractUIPlugin singleton;
22

    
23
	public InternalGEFPlugin() {
24
		singleton = this;
25
	}
26

    
27
	public void start(BundleContext bc) throws Exception {
28
		super.start(bc);
29
		context = bc;
30
	}
31

    
32
	public static BundleContext getContext() {
33
		return context;
34
	}
35

    
36
	public static AbstractUIPlugin getDefault() {
37
		return singleton;
38
	}
39

    
40
	/**
41
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
42
	 */
43
	public void stop(BundleContext context) throws Exception {
44
		savePluginPreferences();
45
		super.stop(context);
46
	}
47

    
48
}
(3-3/7)