Mercurial > hg > de.codedo.java.editor
view src/de/codedo/java/editor/Activator.java @ 1:f7d908568cfc
Install a custom JavaElementImageProvider subclass so that the custom title image stays in place even if the editor icon is decorated e.g. by error markers.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sat, 13 Dec 2014 13:54:38 +0100 |
parents | ca07a15b6cc8 |
children |
line wrap: on
line source
package de.codedo.java.editor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "de.codedo.java.editor"; //$NON-NLS-1$ // The shared instance private static Activator Plugin; private CodedoJavaElementImageProvider _javaElementImageProvider; public static Activator getDefault() { return Plugin; } public void start(BundleContext context) throws Exception { super.start(context); Plugin = this; } public void stop(BundleContext context) throws Exception { Plugin = null; super.stop(context); } public synchronized CodedoJavaElementImageProvider getJavaElementImageProvider() { if (_javaElementImageProvider == null) { _javaElementImageProvider = new CodedoJavaElementImageProvider(); } return _javaElementImageProvider; } }