| package org.eclipse.swtbot.generator.jdt; |
| /******************************************************************************* |
| * Copyright (c) 2013 Red Hat Inc.. |
| * 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: |
| * Rastislav Wagner (Red Hat) - initial API and implementation |
| *******************************************************************************/ |
| |
| |
| import org.eclipse.ui.plugin.AbstractUIPlugin; |
| import org.osgi.framework.BundleContext; |
| |
| public class SWTBotGeneratorJDTPlugin extends AbstractUIPlugin { |
| |
| public static final String PLUGIN_ID = "org.eclipse.swtbot.generator.jdt"; //$NON-NLS-1$ |
| |
| private static SWTBotGeneratorJDTPlugin INSTANCE; |
| |
| public SWTBotGeneratorJDTPlugin() { |
| } |
| |
| /* |
| * (non-Javadoc) |
| * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) |
| */ |
| @Override |
| public void start(BundleContext context) throws Exception { |
| super.start(context); |
| INSTANCE = this; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) |
| */ |
| @Override |
| public void stop(BundleContext context) throws Exception { |
| INSTANCE = null; |
| super.stop(context); |
| } |
| |
| /** |
| * Returns the shared instance |
| * |
| * @return the shared instance |
| */ |
| public static SWTBotGeneratorJDTPlugin getDefault() { |
| return INSTANCE; |
| } |
| } |