Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeneviève Bastien2014-06-03 15:27:47 -0400
committerGenevieve Bastien2014-06-04 14:23:34 -0400
commitc87a5fcadec0abba379756ee071d6c41376f7c18 (patch)
tree892d5383ab76d912d8b6bbc4839a98bd2b76890c
parentc3c922bd0a9373bae387ef9b8c80d90ed8a4db9c (diff)
downloadorg.eclipse.linuxtools-c87a5fcadec0abba379756ee071d6c41376f7c18.tar.gz
org.eclipse.linuxtools-c87a5fcadec0abba379756ee071d6c41376f7c18.tar.xz
org.eclipse.linuxtools-c87a5fcadec0abba379756ee071d6c41376f7c18.zip
TMF: Add info for output extension point in analysis module documentation
Change-Id: Ia6bf075226a58031d46954af98c192663b347177 Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Reviewed-on: https://git.eclipse.org/r/27871 Tested-by: Hudson CI
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.help/doc/Developer-Guide.mediawiki28
1 files changed, 27 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.help/doc/Developer-Guide.mediawiki b/lttng/org.eclipse.linuxtools.tmf.help/doc/Developer-Guide.mediawiki
index ad50f82343..6708d4763f 100644
--- a/lttng/org.eclipse.linuxtools.tmf.help/doc/Developer-Guide.mediawiki
+++ b/lttng/org.eclipse.linuxtools.tmf.help/doc/Developer-Guide.mediawiki
@@ -3329,12 +3329,38 @@ Note that with these extension points, it is possible to use the same module cla
Analyses will typically produce outputs the user can examine. Outputs can be a text dump, a .dot file, an XML file, a view, etc. All output types must implement the '''IAnalysisOutput''' interface.
-An output can be registered to an analysis module at any moment by calling the '''IAnalysisModule#registerOutput()''' method. Analyses themselves will know what outputs are available and may register them in the analysis constructor or after analysis completion.
+An output can be registered to an analysis module at any moment by calling the '''IAnalysisModule#registerOutput()''' method. Analyses themselves may know what outputs are available and may register them in the analysis constructor or after analysis completion.
The various concrete output types are:
* '''TmfAnalysisViewOutput''': It takes a view ID as parameter and, when selected, opens the view.
+=== Using the extension point to add outputs ===
+
+Analysis outputs can also be hooked to an analysis using the same extension point ''org.eclipse.linuxtools.tmf.core.analysis'' in the plugin.xml file. Outputs can be matched either to a specific analysis identified by an ID, or to all analysis modules extending or implementing a given class or interface.
+
+The following code shows how to add a view output to the analysis defined above directly in the plugin.xml file. This extension does not have to be in the same plugin as the extension defining the analysis. Typically, an analysis module can be defined in a core plugin, along with some outputs that do not require UI elements. Other outputs, like views, who need UI elements, will be defined in a ui plugin.
+
+<pre>
+<extension
+ point="org.eclipse.linuxtools.tmf.core.analysis">
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="my.plugin.package.ui.views.myView">
+ <analysisId
+ id="my.lttng.kernel.analysis.id">
+ </analysisId>
+ </output>
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="my.plugin.package.ui.views.myMoreGenericView">
+ <analysisModuleClass
+ class="my.plugin.package.core.MyAnalysisModuleClass">
+ </analysisModuleClass>
+ </output>
+</extension>
+</pre>
+
== Providing help for the module ==
For now, the only way to provide a meaningful help message to the user is by overriding the '''IAnalysisModule#getHelpText()''' method and return a string that will be displayed in a message box.

Back to the top