X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.event%2Fsrc%2Forg%2Fsimantics%2Fevent%2FActivator.java;h=0adb51be4f6951e6040121efa41f3a09e9ec5050;hp=e8e6e2f1718bb7bc6881f30156ee8932ed4078aa;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.event/src/org/simantics/event/Activator.java b/bundles/org.simantics.event/src/org/simantics/event/Activator.java index e8e6e2f17..0adb51be4 100644 --- a/bundles/org.simantics.event/src/org/simantics/event/Activator.java +++ b/bundles/org.simantics.event/src/org/simantics/event/Activator.java @@ -1,67 +1,67 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.event; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.simantics.utils.ui.gfx.AlphaAdjustmentImageDescriptor; -import org.simantics.utils.ui.gfx.HSVAdjustmentImageDescriptor; - -/** - * @author Tuukka Lehtonen - */ -public class Activator extends AbstractUIPlugin { - - public static final String BUNDLE_ID = "org.simantics.event"; - - private static BundleContext context; - - public static ImageDescriptor HIDE_ICON; - public static ImageDescriptor UNHIDE_ICON; - public static ImageDescriptor MILESTONE_ICON; - public static ImageDescriptor DIAMOND_ICON, DIAMOND2_ICON; - public static ImageDescriptor MARK_MILESTONE_ICON; - public static ImageDescriptor UNMARK_MILESTONE_ICON; - public static ImageDescriptor SET_BASELINE_ICON; - public static ImageDescriptor REMOVE_BASELINE_ICON; - public static ImageDescriptor CLIPBOARD_ICON; - - static BundleContext getContext() { - return context; - } - - @Override - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - - Bundle bundle = bundleContext.getBundle(); - - HIDE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png")); - UNHIDE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png")), 0f, 0f, 1f), 96); - MILESTONE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")); - DIAMOND_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/diamond.png")); - DIAMOND2_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/diamond2.png")); - MARK_MILESTONE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")); - UNMARK_MILESTONE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")), 0f, 0f, 1f), 96); - SET_BASELINE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/baseline.png")); - REMOVE_BASELINE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/baseline.png")), 0f, 0f, 1f), 96); - CLIPBOARD_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/clipboard.png")); - } - - @Override - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.event; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.simantics.utils.ui.gfx.AlphaAdjustmentImageDescriptor; +import org.simantics.utils.ui.gfx.HSVAdjustmentImageDescriptor; + +/** + * @author Tuukka Lehtonen + */ +public class Activator extends AbstractUIPlugin { + + public static final String BUNDLE_ID = "org.simantics.event"; + + private static BundleContext context; + + public static ImageDescriptor HIDE_ICON; + public static ImageDescriptor UNHIDE_ICON; + public static ImageDescriptor MILESTONE_ICON; + public static ImageDescriptor DIAMOND_ICON, DIAMOND2_ICON; + public static ImageDescriptor MARK_MILESTONE_ICON; + public static ImageDescriptor UNMARK_MILESTONE_ICON; + public static ImageDescriptor SET_BASELINE_ICON; + public static ImageDescriptor REMOVE_BASELINE_ICON; + public static ImageDescriptor CLIPBOARD_ICON; + + static BundleContext getContext() { + return context; + } + + @Override + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + + Bundle bundle = bundleContext.getBundle(); + + HIDE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png")); + UNHIDE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png")), 0f, 0f, 1f), 96); + MILESTONE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")); + DIAMOND_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/diamond.png")); + DIAMOND2_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/diamond2.png")); + MARK_MILESTONE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")); + UNMARK_MILESTONE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/milestone.png")), 0f, 0f, 1f), 96); + SET_BASELINE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/baseline.png")); + REMOVE_BASELINE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(ImageDescriptor.createFromURL(bundle.getResource("icons/baseline.png")), 0f, 0f, 1f), 96); + CLIPBOARD_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/clipboard.png")); + } + + @Override + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +}