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.team;
16 import org.eclipse.jface.resource.ImageDescriptor;
17 import org.eclipse.ui.plugin.AbstractUIPlugin;
18 import org.osgi.framework.BundleContext;
19 import org.simantics.team.internal.Images;
20 import org.simantics.utils.ui.BundleUtils;
23 * The activator class controls the plug-in life cycle
25 public class Activator extends AbstractUIPlugin {
28 public static final String PLUGIN_ID = "org.simantics.team.ui";
30 // The shared instance
31 private static Activator plugin;
43 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
46 public static ImageDescriptor DOOR_IN_ICON;
47 public static ImageDescriptor DOOR_OUT_ICON;
48 public static ImageDescriptor BIN_ICON;
49 public static ImageDescriptor BIN_CLOSED_ICON;
50 public static ImageDescriptor BIN_EMPTY_ICON;
51 public static ImageDescriptor REFRESH_ICON;
52 public static ImageDescriptor CHANGE_SET_ICON;
53 public static ImageDescriptor DISPLAY_ICON;
54 public static ImageDescriptor RESOURCE_ICON;
55 public static ImageDescriptor STRING_ICON;
56 public static ImageDescriptor COMBINED_ICON;
57 public static ImageDescriptor UNDO_ICON;
58 public static ImageDescriptor REDO_ICON;
59 public static ImageDescriptor OTHER_ICON;
60 public static ImageDescriptor REMOVE_ALL_ICON;
61 public static ImageDescriptor NEXT_ICON;
62 public static ImageDescriptor PREVIOUS_ICON;
63 public static ImageDescriptor DEBUG_ICON;
64 public static ImageDescriptor EXIT_ICON;
66 public void start(BundleContext context) throws Exception {
69 DOOR_IN_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/door_out.png"));
70 DOOR_OUT_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/door_in.png"));
71 BIN_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/bin.png"));
72 BIN_CLOSED_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/bin_closed.png"));
73 BIN_EMPTY_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/bin_empty.png"));
74 REFRESH_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/arrow_refresh.png"));
75 CHANGE_SET_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/book.png");
76 DISPLAY_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/anchor.png");
77 RESOURCE_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/application.png");
78 STRING_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/star.png");
79 COMBINED_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/basket.png");
80 REDO_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_redo.png");
81 UNDO_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_undo.png");
82 OTHER_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/bell.png");
83 REMOVE_ALL_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/cross.png");
84 NEXT_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/book_next.png");
85 PREVIOUS_ICON = BundleUtils.getImageDescriptorFromPlugin("com.famfamfam.silk", "icons/book_previous.png");
86 DEBUG_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/bomb.png"));
87 EXIT_ICON = ImageDescriptor.createFromURL(new URL("platform:/plugin/com.famfamfam.silk/icons/hourglass.png"));
94 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
97 public void stop(BundleContext context) throws Exception {
98 Images.disposeInstance();
104 * Returns the shared instance
106 * @return the shared instance
108 public static Activator getDefault() {