TMF: Changed the LTTng kernel analysis module to use the output extension
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Wed, 5 Feb 2014 19:22:04 +0000 (14:22 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Thu, 20 Feb 2014 19:19:10 +0000 (14:19 -0500)
The analysis module itself has moved to the .core plugin and the views are
associated to it via the analysis output extension point.

Change-Id: Ic92478e6a67be0888c112e90769199fd4dd8c547
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/21582
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
17 files changed:
org.eclipse.linuxtools.lttng2.kernel.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.core/build.properties
org.eclipse.linuxtools.lttng2.kernel.core/plugin.properties
org.eclipse.linuxtools.lttng2.kernel.core/plugin.xml [new file with mode: 0644]
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/LttngKernelAnalysisModule.java [new file with mode: 0644]
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.lttng2.kernel.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.ui/plugin.properties
org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/Messages.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/messages.properties
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/lttng2/kernel/ui/analysis/LttngKernelAnalysisModule.java [deleted file]

index 7effe4d465fac1143f9065f7dffafbe9e3fb5dca..ccb22544495a184452cb949352439c27a933b8e4 100644 (file)
@@ -14,5 +14,6 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0"
 Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.core;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.kernel.core.tests",
  org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.kernel.core.tests",
+ org.eclipse.linuxtools.lttng2.kernel.core.analysis,
  org.eclipse.linuxtools.lttng2.kernel.core.event.matching,
  org.eclipse.linuxtools.lttng2.kernel.core.trace
index ddfbe617f6424e9ee0b8263ab5261016daa88bf4..08ffd17f7747f8270409df1ebfed9c93d2f98e0d 100644 (file)
@@ -15,5 +15,8 @@ output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               plugin.xml
 src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
index 3321510d8fe65b11d2d82d8a72c4627161300b01..1b3c83845fb5464633e01e241dea42c3437d6b45 100644 (file)
@@ -12,4 +12,6 @@
 
 #Properties file for org.eclipse.linuxtools.lttng2.kernel.core
 Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel Analysis Core Plug-in
\ No newline at end of file
+Bundle-Name = Linux Tools LTTng Kernel Analysis Core Plug-in
+
+analysis.lttngkernel = LTTng Kernel Analysis
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core/plugin.xml b/org.eclipse.linuxtools.lttng2.kernel.core/plugin.xml
new file mode 100644 (file)
index 0000000..cf7aefb
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <module
+            analysis_module="org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule"
+            automatic="true"
+            id="org.eclipse.linuxtools.lttng2.kernel.analysis"
+            name="%analysis.lttngkernel">
+         <tracetype
+               class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
+         </tracetype>
+      </module>
+   </extension>
+</plugin>
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/LttngKernelAnalysisModule.java b/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/LttngKernelAnalysisModule.java
new file mode 100644 (file)
index 0000000..5fdc13f
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+/**
+ * State System Module for lttng kernel traces
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class LttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+    /**
+     * The file name of the History Tree
+     */
+    @NonNull
+    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
+
+    /** The ID of this analysis module */
+    public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.analysis"; //$NON-NLS-1$
+
+    /**
+     * Constructor adding the views to the analysis
+     */
+    public LttngKernelAnalysisModule() {
+        super();
+    }
+
+    @Override
+    public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
+        if (!(trace instanceof LttngKernelTrace)) {
+            throw new IllegalArgumentException("LttngKernelStateSystemModule: trace should be of type LttngKernelTrace"); //$NON-NLS-1$
+        }
+        super.setTrace(trace);
+    }
+
+    @Override
+    protected LttngKernelTrace getTrace() {
+        /* Cast should be safe because we check the type at the setTrace() */
+        return (LttngKernelTrace) super.getTrace();
+    }
+
+    @Override
+    @NonNull
+    protected ITmfStateProvider createStateProvider() {
+        return new LttngKernelStateProvider(getTrace());
+    }
+
+    @Override
+    @NonNull
+    protected String getSsFileName() {
+        return HISTORY_TREE_FILE_NAME;
+    }
+
+    @Override
+    protected String getFullHelpText() {
+        return Messages.LttngKernelAnalysisModule_Help;
+    }
+
+}
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/Messages.java b/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/Messages.java
new file mode 100644 (file)
index 0000000..01696e2
--- /dev/null
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized message strings from the LTTng Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.kernel.core.analysis.messages"; //$NON-NLS-1$
+
+    public static String LttngKernelAnalysisModule_Help;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/messages.properties b/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/messages.properties
new file mode 100644 (file)
index 0000000..6933aa6
--- /dev/null
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2014 École Polytechnique de Montréal
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
index 3271f9c8c4df796ce92bf03bac8af44943485e6a..4811b27833dd36aaf521796fbb221abe8e24abc9 100644 (file)
@@ -21,5 +21,4 @@ Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.ui;x-friends:="org
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;x-internal:=true,
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;x-internal:=true,
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.lttng2.kernel.ui.analysis
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests"
index bb75d70b7f3b881920e92ffa670f171012e01cc2..9172f4976ed16a59c977b55f969e6402d1a9c212 100644 (file)
@@ -20,5 +20,3 @@ controlflow.view.name = Control Flow
 resources.view.name = Resources
 
 tracetype.type.kernel = LTTng Kernel Trace
-
-analysis.lttngkernel = LTTng Kernel Analysis
index 54650a56d618c00f91076a76f9ab684b06c1d594..c28e2bc8eecb961c0e91292ef7cd4b520c34b84e 100644 (file)
    </extension>
    <extension
          point="org.eclipse.linuxtools.tmf.core.analysis">
-      <module
-            analysis_module="org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule"
-            automatic="true"
-            id="org.eclipse.linuxtools.lttng2.kernel.analysis"
-            name="%analysis.lttngkernel">
-         <tracetype
-               class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
-         </tracetype>
-      </module>
+      <output
+            class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow">
+         <analysisId
+               id="org.eclipse.linuxtools.lttng2.kernel.analysis">
+         </analysisId>
+      </output>
+      <output
+            class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.linuxtools.lttng2.kernel.ui.views.resources">
+         <analysisId
+               id="org.eclipse.linuxtools.lttng2.kernel.analysis">
+         </analysisId>
+      </output>
    </extension>
 </plugin>
index f851aa73e491cd0972dd9628d9826b4a20eedfae..7200352850e6b9b6f37570416d091d0920cd3514 100644 (file)
@@ -49,8 +49,6 @@ public class Messages extends NLS {
     public static String ResourcesView_attributeProcessName;
     public static String ResourcesView_attributeSyscallName;
 
-    public static String LttngKernelAnalysis_Help;
-
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index cfa70d242422f982f9d7e2ba6a0d0aabbaca4651..29e75b8991ee09f2551cee556c1b7837484b8694 100644 (file)
@@ -41,5 +41,3 @@ ResourcesView_attributeHoverTime=> Hover Time
 ResourcesView_attributeTidName=> TID
 ResourcesView_attributeProcessName=> Process
 ResourcesView_attributeSyscallName=> System Call
-
-LttngKernelAnalysis_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
index 3ff54d2834f7f7503d2274db2d71c12343eea6f5..34554e6f87296e2728921dff4928685c9db24298 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
index 2e0145d64af877726d6627172d9368781c1899a4..76507e106ea0f3d6df40816ea4d9f70511a8835b 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
index a6f4199f7f9c78a2dcda0799d91c1dd76226395f..5cb10e30cb1b44c3d6fc965a252d7be870a6652f 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
index 5a501439b393e05c4b1a1643ce911a1f84894c6d..03746bad9d56a521f9d08d169d298fdc18394e99 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.linuxtools.lttng2.kernel.ui.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/lttng2/kernel/ui/analysis/LttngKernelAnalysisModule.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/lttng2/kernel/ui/analysis/LttngKernelAnalysisModule.java
deleted file mode 100644 (file)
index 354b054..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.analysis;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
-import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput;
-
-/**
- * State System Module for lttng kernel traces
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class LttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
-    /**
-     * The file name of the History Tree
-     */
-    @NonNull
-    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
-
-    /** The ID of this analysis module */
-    public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.analysis"; //$NON-NLS-1$
-
-    /**
-     * Constructor adding the views to the analysis
-     */
-    public LttngKernelAnalysisModule() {
-        super();
-        this.registerOutput(new TmfAnalysisViewOutput(ControlFlowView.ID));
-        this.registerOutput(new TmfAnalysisViewOutput(ResourcesView.ID));
-    }
-
-    @Override
-    public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
-        if (!(trace instanceof LttngKernelTrace)) {
-            throw new IllegalArgumentException("LttngKernelStateSystemModule: trace should be of type LttngKernelTrace"); //$NON-NLS-1$
-        }
-        super.setTrace(trace);
-    }
-
-    @Override
-    protected LttngKernelTrace getTrace() {
-        /* Cast should be safe because we check the type at the setTrace() */
-        return (LttngKernelTrace) super.getTrace();
-    }
-
-    @Override
-    @NonNull
-    protected ITmfStateProvider createStateProvider() {
-        return new LttngKernelStateProvider(getTrace());
-    }
-
-    @Override
-    @NonNull
-    protected String getSsFileName() {
-        return HISTORY_TREE_FILE_NAME;
-    }
-
-    @Override
-    protected String getFullHelpText() {
-        return Messages.LttngKernelAnalysis_Help;
-    }
-
-}
This page took 0.035348 seconds and 5 git commands to generate.