]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.utils.ui/src/org/simantics/utils/ui/internal/Activator.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.utils.ui / src / org / simantics / utils / ui / internal / Activator.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.utils.ui.internal;
13
14 import org.eclipse.ui.plugin.AbstractUIPlugin;
15 import org.osgi.framework.BundleContext;
16 import org.simantics.utils.ui.ErrorLogger;
17 import org.simantics.utils.ui.gfx.ImageCache;
18
19
20 /**
21  * @author Tuukka Lehtonen
22  */
23 @SuppressWarnings("deprecation")
24 public class Activator extends AbstractUIPlugin {
25
26     // The plug-in ID
27     public static final String PLUGIN_ID = "org.simantics.utils.ui";
28
29     private static Activator instance;
30     
31     /** Error logger */
32     private ErrorLogger errorLogger = new ErrorLogger(this);
33
34
35     public Activator() {
36         super();
37         instance = this;
38     }
39
40     public static Activator getDefault() {
41         return instance;
42     }
43
44     public ErrorLogger getErrorLogger() {
45         return errorLogger;
46     }  
47
48     @Override
49     public void stop(BundleContext context) throws Exception {
50         super.stop(context);
51         ImageCache.getInstance().dispose();
52     }
53 }