1 /*******************************************************************************
2 * Copyright (c) 2016 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.tmf
.ctf
.ui
.swtbot
.tests
;
12 import java
.io
.IOException
;
15 import org
.eclipse
.core
.runtime
.FileLocator
;
16 import org
.eclipse
.core
.runtime
.IPath
;
17 import org
.eclipse
.core
.runtime
.Path
;
18 import org
.eclipse
.core
.runtime
.Plugin
;
19 import org
.osgi
.framework
.BundleContext
;
22 * The activator class controls the plug-in life cycle
24 public class Activator
extends Plugin
{
29 public static final String PLUGIN_ID
= "org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests"; //$NON-NLS-1$
31 // The shared instance
32 private static Activator plugin
;
41 public void start(BundleContext context
) throws Exception
{
47 public void stop(BundleContext context
) throws Exception
{
53 * Returns the shared instance
55 * @return the shared instance
57 public static Activator
getDefault() {
62 * Gets the absolute path from a path relative to this plugin's root
65 * The path relative to this plugin
66 * @return The absolute path corresponding to this relative path
68 public static IPath
getAbsolutePath(Path relativePath
) {
69 Activator plugin2
= getDefault();
70 if (plugin2
== null) {
72 * Shouldn't happen but at least throw something to get the test to
77 URL location
= FileLocator
.find(plugin2
.getBundle(), relativePath
, null);
79 IPath path
= new Path(FileLocator
.toFileURL(location
).getPath());
81 } catch (IOException e
) {
This page took 0.031666 seconds and 5 git commands to generate.