Adapt new kernel.core plugins to TMF
[deliverable/tracecompass.git] / lttng / org.lttng.scope.lttng.kernel.core / src / org / lttng / scope / lttng / kernel / core / activator / internal / Activator.java
1 /*
2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
3 *
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 */
9
10 package org.lttng.scope.lttng.kernel.core.activator.internal;
11
12 import org.lttng.scope.lttng.kernel.core.views.kernel.controlflow2.ControlFlowModelProvider;
13 import org.lttng.scope.lttng.kernel.core.views.kernel.resources2.ResourcesModelProvider;
14 import org.lttng.scope.tmf2.views.core.ScopeCoreActivator;
15 import org.lttng.scope.tmf2.views.core.timegraph.model.provider.TimeGraphModelProviderManager;
16
17 /**
18 * Plugin activator
19 *
20 * @noreference This class should not be accessed outside of this plugin.
21 */
22 public class Activator extends ScopeCoreActivator {
23
24 /**
25 * Return the singleton instance of this activator.
26 *
27 * @return The singleton instance
28 */
29 public static Activator instance() {
30 return ScopeCoreActivator.getInstance(Activator.class);
31 }
32
33 @Override
34 protected void startActions() {
35 /* Register the model providers shipped in this plugin */
36 TimeGraphModelProviderManager manager = TimeGraphModelProviderManager.instance();
37 manager.registerProviderFactory(() -> new ControlFlowModelProvider());
38 manager.registerProviderFactory(() -> new ResourcesModelProvider());
39
40 /* Register the built-in LTTng-Analyses descriptors */
41 // try {
42 // LttngAnalysesLoader.load();
43 // } catch (LamiAnalysisFactoryException | IOException e) {
44 // // Not the end of the world if the analyses are not available
45 // logWarning("Cannot find LTTng analyses configuration files: " + e.getMessage()); //$NON-NLS-1$
46 // }
47 }
48
49 @Override
50 protected void stopActions() {
51 }
52
53 }
This page took 0.031805 seconds and 5 git commands to generate.