Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeneviève Bastien2014-06-03 19:27:47 +0000
committerGenevieve Bastien2014-06-06 12:46:20 +0000
commit266a2dda5e14171ef9b58a0359db71f92cb80758 (patch)
tree6f1a9f09b0922534ca710c1487631627827d79ea
parent2e111d9fcdf559bf9ba0df6f74ac1e782f531097 (diff)
downloadorg.eclipse.linuxtools-266a2dda5e14171ef9b58a0359db71f92cb80758.tar.gz
org.eclipse.linuxtools-266a2dda5e14171ef9b58a0359db71f92cb80758.tar.xz
org.eclipse.linuxtools-266a2dda5e14171ef9b58a0359db71f92cb80758.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/27986 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