1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.browsing.ui.common;
16 import org.eclipse.core.runtime.Plugin;
17 import org.osgi.framework.BundleContext;
20 * The activator class controls the plug-in life cycle
22 public class Activator extends Plugin {
25 public static final String PLUGIN_ID = "org.simantics.browsing.ui.common";
28 private ErrorLogger errorLogger = new ErrorLogger(this);
30 private static Activator plugin;
33 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
35 public void start(BundleContext context) throws Exception {
41 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
43 public void stop(BundleContext context) throws Exception {
48 public static Activator getDefault() {
52 public static URL getDefaultResource(String name) {
53 Activator plugin = getDefault();
54 if(plugin == null) throw new IllegalStateException("The plugin is not active.");
55 return plugin.getBundle().getResource(name);
58 public ErrorLogger getErrorLogger() {