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 | ||
af3275f8 | 12 | import org.lttng.scope.lttng.kernel.core.views.timegraph.resources.ResourcesCpuIrqModelProvider; |
af3275f8 | 13 | import org.lttng.scope.lttng.kernel.core.views.timegraph.threads.ThreadsModelProvider; |
deecbf8e | 14 | import org.lttng.scope.tmf2.views.core.ScopeCoreActivator; |
af3275f8 AM |
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 ThreadsModelProvider()); | |
38 | manager.registerProviderFactory(() -> new ResourcesCpuIrqModelProvider()); | |
deecbf8e AM |
39 | // Not available in TC since the State system doesn't have aggregate attributes |
40 | // manager.registerProviderFactory(() -> new ResourcesIrqModelProvider()); | |
af3275f8 AM |
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 | } |