6061d107c7281e361bafe81bfade86270d391b8d
1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
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
10 * Geneviève Bastien - Initial implementation and API
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.analysis
.xml
.core
.tests
;
15 import java
.io
.IOException
;
18 import org
.eclipse
.core
.runtime
.FileLocator
;
19 import org
.eclipse
.core
.runtime
.IPath
;
20 import org
.eclipse
.core
.runtime
.Path
;
21 import org
.eclipse
.core
.runtime
.Plugin
;
22 import org
.osgi
.framework
.BundleContext
;
25 * The activator class controls the plug-in life cycle
27 public class Activator
extends Plugin
{
32 public static final String PLUGIN_ID
= "org.eclipse.tracecompass.tmf.analysis.xml.core.tests"; //$NON-NLS-1$
34 // The shared instance
35 private static Activator plugin
;
44 public void start(BundleContext context
) throws Exception
{
50 public void stop(BundleContext context
) throws Exception
{
56 * Returns the shared instance
58 * @return the shared instance
60 public static Activator
getDefault() {
65 * Gets the absolute path from a path relative to this plugin's root
68 * The path relative to this plugin
69 * @return The absolute path corresponding to this relative path
71 public static IPath
getAbsolutePath(Path relativePath
) {
72 Activator plugin2
= getDefault();
73 if (plugin2
== null) {
75 * Shouldn't happen but at least throw something to get the test to
80 URL location
= FileLocator
.find(plugin2
.getBundle(), relativePath
, null);
82 IPath path
= new Path(FileLocator
.toFileURL(location
).getPath());
84 } catch (IOException e
) {
This page took 0.052326 seconds and 4 git commands to generate.