Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-04-27 11:40:32 +0000
committerAlexander Kurtakov2012-04-27 11:40:55 +0000
commitf09ca1d4d12c460ea4efde63b1d60fbfb79d7604 (patch)
tree9c7a3bf5076dbd4e0cbd0c745d642de8c56001b7 /gcov
parent65560da4590316f904f28767ecf6b3e420452423 (diff)
downloadorg.eclipse.linuxtools-f09ca1d4d12c460ea4efde63b1d60fbfb79d7604.tar.gz
org.eclipse.linuxtools-f09ca1d4d12c460ea4efde63b1d60fbfb79d7604.tar.xz
org.eclipse.linuxtools-f09ca1d4d12c460ea4efde63b1d60fbfb79d7604.zip
Delete the activator.
There is no need for having an activator for just getting the bundle and it's symbolic name.
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF1
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/Activator.java71
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java7
3 files changed, 4 insertions, 75 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF b/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF
index 90697ec9c5..7e928ae74f 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF
+++ b/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.linuxtools.gcov.test
Bundle-Version: 4.1.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.internal.gcov.test.Activator
Bundle-Vendor: %bundleProvider
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/Activator.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/Activator.java
deleted file mode 100644
index 19175cf465..0000000000
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 STMicroelectronics.
- * 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:
- * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.gcov.test;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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 = "org.eclipse.linuxtools.gcov.test";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
index 0c332e9ec0..86e16723a7 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
@@ -30,6 +30,7 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.hamcrest.Matcher;
+import org.osgi.framework.FrameworkUtil;
public abstract class GcovTest {
@@ -56,13 +57,13 @@ public abstract class GcovTest {
treeBot.setFocus();
treeBot = treeBot.select(projectName);
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- InputStream is = FileLocator.openStream(Activator.getDefault().getBundle(), new Path("resource/" + projectName + "/content"), false);
+ InputStream is = FileLocator.openStream(FrameworkUtil.getBundle(GcovTest.class), new Path("resource/" + projectName + "/content"), false);
LineNumberReader lnr = new LineNumberReader(new InputStreamReader(is));
String filename;
while (null != (filename = lnr.readLine())) {
final ProgressMonitor pm = new ProgressMonitor();
final IFile ifile = project.getFile(filename);
- InputStream fis = FileLocator.openStream(Activator.getDefault().getBundle(), new Path("resource/" + projectName + "/" + filename), false);
+ InputStream fis = FileLocator.openStream(FrameworkUtil.getBundle(GcovTest.class), new Path("resource/" + projectName + "/" + filename), false);
ifile.create(fis, true, pm);
bot.waitUntil(new DefaultCondition() {
@@ -187,7 +188,7 @@ public abstract class GcovTest {
bot.button("OK").click();
bot.waitUntil(new JobsRunning(STExportToCSVAction.EXPORT_TO_CSV_JOB_FAMILY), 3000);
if (testProducedReference) {
- String ref = STJunitUtils.getAbsolutePath(Activator.PLUGIN_ID, "resource/" + projectName + "/" + type + ".csv");
+ String ref = STJunitUtils.getAbsolutePath(FrameworkUtil.getBundle(GcovTest.class).getSymbolicName(), "resource/" + projectName + "/" + type + ".csv");
STJunitUtils.compareIgnoreEOL(project.getLocation() + "/" + type + "-dump.csv", ref, false);
}
}

Back to the top