/* * Copyright (c) 2011, Municipiality of Vienna, Austria * * Licensed under the EUPL, Version 1.1 or � as soon they * will be approved by the European Commission - subsequent * versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the * Licence. * * For convenience a plain text copy of the English version * of the Licence can be found in the file LICENCE.txt in * the top-level directory of this software distribution. * * You may obtain a copy of the Licence in any of 22 European * Languages at: * * http://www.osor.eu/eupl * * Unless required by applicable law or agreed to in * writing, software distributed under the Licence is * distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. * See the Licence for the specific language governing * permissions and limitations under the Licence. */ package org.azzyzt.jee.tools.common; import org.eclipse.core.runtime.Status; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Common extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "org.azzyzt.jee.tools.common.plugin"; //$NON-NLS-1$ // The shared instance private static Common plugin; /** * The constructor */ public Common() { } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } public void log(String msg) { log(msg, null); } public void log(String msg, Exception e) { getLog().log(new Status(Status.INFO, PLUGIN_ID, Status.OK, msg, e)); } /** * Returns the shared instance * * @return the shared instance */ public static Common getDefault() { return plugin; } }