Commit | Line | Data |
---|---|---|
af3275f8 AM |
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.common.core.ScopeCoreActivator; | |
13 | import org.lttng.scope.lttng.kernel.core.views.timegraph.resources.ResourcesCpuIrqModelProvider; | |
14 | import org.lttng.scope.lttng.kernel.core.views.timegraph.resources.ResourcesIrqModelProvider; | |
15 | import org.lttng.scope.lttng.kernel.core.views.timegraph.threads.ThreadsModelProvider; | |
16 | import org.lttng.scope.tmf2.views.core.timegraph.model.provider.TimeGraphModelProviderManager; | |
17 | ||
18 | /** | |
19 | * Plugin activator | |
20 | * | |
21 | * @noreference This class should not be accessed outside of this plugin. | |
22 | */ | |
23 | public class Activator extends ScopeCoreActivator { | |
24 | ||
25 | /** | |
26 | * Return the singleton instance of this activator. | |
27 | * | |
28 | * @return The singleton instance | |
29 | */ | |
30 | public static Activator instance() { | |
31 | return ScopeCoreActivator.getInstance(Activator.class); | |
32 | } | |
33 | ||
34 | @Override | |
35 | protected void startActions() { | |
36 | /* Register the model providers shipped in this plugin */ | |
37 | TimeGraphModelProviderManager manager = TimeGraphModelProviderManager.instance(); | |
38 | manager.registerProviderFactory(() -> new ThreadsModelProvider()); | |
39 | manager.registerProviderFactory(() -> new ResourcesCpuIrqModelProvider()); | |
40 | manager.registerProviderFactory(() -> new ResourcesIrqModelProvider()); | |
41 | ||
42 | /* Register the built-in LTTng-Analyses descriptors */ | |
43 | // try { | |
44 | // LttngAnalysesLoader.load(); | |
45 | // } catch (LamiAnalysisFactoryException | IOException e) { | |
46 | // // Not the end of the world if the analyses are not available | |
47 | // logWarning("Cannot find LTTng analyses configuration files: " + e.getMessage()); //$NON-NLS-1$ | |
48 | // } | |
49 | } | |
50 | ||
51 | @Override | |
52 | protected void stopActions() { | |
53 | } | |
54 | ||
55 | } |